Skip to content

Commit

Permalink
add license comment to all files
Browse files Browse the repository at this point in the history
  • Loading branch information
janfb committed Apr 29, 2024
1 parent c294ade commit 7d02d26
Show file tree
Hide file tree
Showing 94 changed files with 155 additions and 74 deletions.
2 changes: 1 addition & 1 deletion sbi/__version__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

VERSION = (0, 22, 0)

Expand Down
2 changes: 1 addition & 1 deletion sbi/analysis/conditional_density.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import Any, Callable, List, Optional, Tuple, Union
from warnings import warn
Expand Down
2 changes: 1 addition & 1 deletion sbi/analysis/plot.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

import collections
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
Expand Down
2 changes: 1 addition & 1 deletion sbi/analysis/sensitivity_analysis.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

import logging
from copy import deepcopy
Expand Down
2 changes: 1 addition & 1 deletion sbi/analysis/tensorboard_output.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>
"""Utils for processing tensorboard event data."""

import inspect
Expand Down
3 changes: 3 additions & 0 deletions sbi/diagnostics/sbc.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

import warnings
from typing import Callable, Dict, List, Sequence, Tuple, Union

Expand Down
3 changes: 3 additions & 0 deletions sbi/inference/abc/abc_base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

"""Base class for Approximate Bayesian Computation methods."""

import logging
Expand Down
3 changes: 3 additions & 0 deletions sbi/inference/abc/mcabc.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

"""Monte-Carlo Approximate Bayesian Computation (Rejection ABC)."""

from typing import Any, Callable, Dict, Optional, Tuple, Union
Expand Down
3 changes: 3 additions & 0 deletions sbi/inference/abc/smcabc.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

"""Sequential Monte Carlo Approximate Bayesian Computation."""

from typing import Any, Callable, Dict, Optional, Tuple, Union
Expand Down
2 changes: 1 addition & 1 deletion sbi/inference/base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from abc import ABC, abstractmethod
from copy import deepcopy
Expand Down
2 changes: 1 addition & 1 deletion sbi/inference/posteriors/base_posterior.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

import inspect
from abc import ABC, abstractmethod
Expand Down
3 changes: 2 additions & 1 deletion sbi/inference/posteriors/direct_posterior.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import Optional, Union

import torch
Expand Down
3 changes: 2 additions & 1 deletion sbi/inference/posteriors/importance_posterior.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import Any, Callable, Optional, Tuple, Union

import torch
Expand Down
3 changes: 2 additions & 1 deletion sbi/inference/posteriors/mcmc_posterior.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from functools import partial
from math import ceil
from typing import Any, Callable, Dict, Optional, Union
Expand Down
3 changes: 2 additions & 1 deletion sbi/inference/posteriors/rejection_posterior.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from functools import partial
from typing import Any, Callable, Optional, Union
from warnings import warn
Expand Down
2 changes: 1 addition & 1 deletion sbi/inference/posteriors/vi_posterior.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

import copy
from copy import deepcopy
Expand Down
3 changes: 3 additions & 0 deletions sbi/inference/potentials/base_potential.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from abc import ABCMeta, abstractmethod
from typing import Optional

Expand Down
2 changes: 1 addition & 1 deletion sbi/inference/potentials/likelihood_based_potential.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import Callable, Optional, Tuple

Expand Down
2 changes: 1 addition & 1 deletion sbi/inference/potentials/posterior_based_potential.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import Callable, Optional, Tuple

Expand Down
2 changes: 1 addition & 1 deletion sbi/inference/potentials/ratio_based_potential.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import Callable, Optional, Tuple

Expand Down
3 changes: 1 addition & 2 deletions sbi/inference/snle/mnle.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.

# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from copy import deepcopy
from typing import Any, Callable, Dict, Optional, Union
Expand Down
3 changes: 1 addition & 2 deletions sbi/inference/snle/snle_a.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.

# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import Callable, Optional, Union

Expand Down
3 changes: 1 addition & 2 deletions sbi/inference/snle/snle_base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.

# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from abc import ABC
from copy import deepcopy
Expand Down
2 changes: 1 addition & 1 deletion sbi/inference/snpe/snpe_a.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

import warnings
from copy import deepcopy
Expand Down
3 changes: 1 addition & 2 deletions sbi/inference/snpe/snpe_b.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.

# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import Callable, Optional, Union

Expand Down
3 changes: 2 additions & 1 deletion sbi/inference/snpe/snpe_base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

import time
from abc import ABC, abstractmethod
from copy import deepcopy
Expand Down
3 changes: 1 addition & 2 deletions sbi/inference/snpe/snpe_c.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.

# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import Callable, Dict, Optional, Union

Expand Down
3 changes: 3 additions & 0 deletions sbi/inference/snre/bnre.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import Callable, Dict, Optional, Union

import torch
Expand Down
3 changes: 3 additions & 0 deletions sbi/inference/snre/snre_a.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import Any, Callable, Dict, Optional, Union

import torch
Expand Down
3 changes: 3 additions & 0 deletions sbi/inference/snre/snre_b.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import Callable, Dict, Optional, Union

import torch
Expand Down
3 changes: 3 additions & 0 deletions sbi/inference/snre/snre_base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from abc import ABC, abstractmethod
from copy import deepcopy
from typing import Any, Callable, Dict, Optional, Union
Expand Down
3 changes: 3 additions & 0 deletions sbi/inference/snre/snre_c.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import Callable, Dict, Optional, Tuple, Union

import torch
Expand Down
2 changes: 1 addition & 1 deletion sbi/neural_nets/classifier.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import Optional

Expand Down
3 changes: 3 additions & 0 deletions sbi/neural_nets/density_estimators/base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import Optional, Tuple

import torch
Expand Down
3 changes: 3 additions & 0 deletions sbi/neural_nets/density_estimators/nflows_flow.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import Tuple

import torch
Expand Down
3 changes: 3 additions & 0 deletions sbi/neural_nets/density_estimators/zuko_flow.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import Tuple

import torch
Expand Down
2 changes: 1 addition & 1 deletion sbi/neural_nets/embedding_nets.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import List, Optional, Tuple, Union

Expand Down
2 changes: 1 addition & 1 deletion sbi/neural_nets/flow.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from functools import partial
from typing import List, Optional, Sequence, Tuple, Union
Expand Down
2 changes: 1 addition & 1 deletion sbi/neural_nets/mdn.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import Optional

Expand Down
2 changes: 1 addition & 1 deletion sbi/neural_nets/mnle.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

import warnings
from typing import Optional
Expand Down
3 changes: 3 additions & 0 deletions sbi/samplers/importance/importance_sampling.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from math import sqrt
from typing import Tuple

Expand Down
3 changes: 3 additions & 0 deletions sbi/samplers/importance/sir.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import Any, Callable

import torch
Expand Down
2 changes: 1 addition & 1 deletion sbi/samplers/mcmc/init_strategy.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import Any, Callable

Expand Down
2 changes: 1 addition & 1 deletion sbi/samplers/mcmc/slice_numpy.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

import os
import sys
Expand Down
1 change: 0 additions & 1 deletion sbi/sbi_types.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.


from typing import NewType, Optional, Sequence, Tuple, TypeVar, Union

import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion sbi/simulators/linear_gaussian.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>


from typing import Tuple, Union
Expand Down
2 changes: 1 addition & 1 deletion sbi/simulators/simutils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>


import contextlib
Expand Down
2 changes: 1 addition & 1 deletion sbi/utils/analysis_utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import Callable, Optional, Union

Expand Down
2 changes: 1 addition & 1 deletion sbi/utils/conditional_density_utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from copy import deepcopy
from typing import Callable, List, Optional, Tuple, Union
Expand Down
2 changes: 1 addition & 1 deletion sbi/utils/get_nn_models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import Any, Callable, Optional
from warnings import warn
Expand Down
2 changes: 1 addition & 1 deletion sbi/utils/io.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

"""Utility functions for input/output."""

Expand Down
3 changes: 3 additions & 0 deletions sbi/utils/kde.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import Optional, Union

import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion sbi/utils/metrics.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import Any, Dict, Optional, Union

Expand Down
2 changes: 1 addition & 1 deletion sbi/utils/posterior_ensemble.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

import warnings
from typing import List, Optional, Union
Expand Down
3 changes: 3 additions & 0 deletions sbi/utils/potentialutils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed
# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>

from typing import Callable, Dict, Union

import numpy as np
Expand Down
Loading

0 comments on commit 7d02d26

Please sign in to comment.