From d3df8cc9c2a1fb5956ab46d2258bfff220947e04 Mon Sep 17 00:00:00 2001 From: Sam Stites Date: Wed, 12 Jun 2024 15:49:53 -0400 Subject: [PATCH] apache 2.0 appendix instructions --- LICENSE | 2 +- combinators/__init__.py | 13 +++++++++++++ combinators/inference.py | 13 +++++++++++++ combinators/metrics.py | 13 +++++++++++++ combinators/out.py | 13 +++++++++++++ combinators/program.py | 13 +++++++++++++ combinators/resamplers.py | 13 +++++++++++++ combinators/tensor/__init__.py | 13 +++++++++++++ combinators/tensor/utils.py | 13 +++++++++++++ combinators/trace/__init__.py | 13 +++++++++++++ combinators/trace/utils.py | 13 +++++++++++++ combinators/utils.py | 13 +++++++++++++ experiments/annealing/main.py | 13 +++++++++++++ experiments/annealing/models.py | 13 +++++++++++++ experiments/annealing/objectives.py | 13 +++++++++++++ experiments/annealing/plotting.py | 13 +++++++++++++ experiments/annealing/scripts/tabulate_and_plot.py | 13 +++++++++++++ experiments/annealing/utils.py | 13 +++++++++++++ experiments/annealing/vsmc.py | 13 +++++++++++++ experiments/apgs/__init__.py | 13 +++++++++++++ experiments/apgs/affine_transformer.py | 13 +++++++++++++ experiments/apgs/dataset/simulator.py | 13 +++++++++++++ experiments/apgs/gibbs.py | 13 +++++++++++++ experiments/apgs/main.py | 13 +++++++++++++ experiments/apgs/models.py | 13 +++++++++++++ experiments/apgs/notebooks/evaluate_saved_model.py | 13 +++++++++++++ experiments/apgs/objectives.py | 13 +++++++++++++ experiments/apgs/plotting.py | 13 +++++++++++++ experiments/apgs/utils.py | 13 +++++++++++++ experiments/startup.py | 13 +++++++++++++ setup.py | 13 +++++++++++++ tests/__init__.py | 13 +++++++++++++ tests/test_adhoc_programs.py | 13 +++++++++++++ tests/test_annealing.py | 13 +++++++++++++ tests/test_inference.py | 13 +++++++++++++ tests/test_resamplers.py | 13 +++++++++++++ tests/utils.py | 13 +++++++++++++ 37 files changed, 469 insertions(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index c65d0bc3..6bc8dc22 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2024 Northeastern University + Copyright 2021-2024 Northeastern University Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/combinators/__init__.py b/combinators/__init__.py index 7c2f604b..6ff3e613 100644 --- a/combinators/__init__.py +++ b/combinators/__init__.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. #!/usr/bin/env python3 from probtorch.stochastic import ( diff --git a/combinators/inference.py b/combinators/inference.py index b9d41a62..cf9dc61c 100644 --- a/combinators/inference.py +++ b/combinators/inference.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. import torch import combinators.resamplers as resamplers diff --git a/combinators/metrics.py b/combinators/metrics.py index e30938f5..50e27c1f 100644 --- a/combinators/metrics.py +++ b/combinators/metrics.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. #!/usr/bin/env python import torch import torch.nn.functional as F diff --git a/combinators/out.py b/combinators/out.py index da0573e4..a8c5b1a7 100644 --- a/combinators/out.py +++ b/combinators/out.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from torch import Tensor from typing import Any, Optional from probtorch.stochastic import Trace diff --git a/combinators/program.py b/combinators/program.py index 609df40b..a6608a1f 100644 --- a/combinators/program.py +++ b/combinators/program.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. import torch import inspect from torch import nn, Tensor diff --git a/combinators/resamplers.py b/combinators/resamplers.py index 04454561..3d0e537c 100644 --- a/combinators/resamplers.py +++ b/combinators/resamplers.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. import torch import torch.nn.functional as F from torch import Tensor diff --git a/combinators/tensor/__init__.py b/combinators/tensor/__init__.py index e5a0d9b4..937411fd 100644 --- a/combinators/tensor/__init__.py +++ b/combinators/tensor/__init__.py @@ -1 +1,14 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. #!/usr/bin/env python3 diff --git a/combinators/tensor/utils.py b/combinators/tensor/utils.py index 5814800f..6d7e376a 100644 --- a/combinators/tensor/utils.py +++ b/combinators/tensor/utils.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. import pickle import torch from torch import Tensor diff --git a/combinators/trace/__init__.py b/combinators/trace/__init__.py index e5a0d9b4..937411fd 100644 --- a/combinators/trace/__init__.py +++ b/combinators/trace/__init__.py @@ -1 +1,14 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. #!/usr/bin/env python3 diff --git a/combinators/trace/utils.py b/combinators/trace/utils.py index 1f28dae4..16566342 100644 --- a/combinators/trace/utils.py +++ b/combinators/trace/utils.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. #!/usr/bin/env python3 import torch import inspect diff --git a/combinators/utils.py b/combinators/utils.py index 0c34d1cb..5ad9c995 100644 --- a/combinators/utils.py +++ b/combinators/utils.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. #!/usr/bin/env python3 import os import subprocess diff --git a/experiments/annealing/main.py b/experiments/annealing/main.py index 66bb38ea..424c7a69 100644 --- a/experiments/annealing/main.py +++ b/experiments/annealing/main.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. #!/usr/bin/env python3 import torch from tqdm import trange diff --git a/experiments/annealing/models.py b/experiments/annealing/models.py index 6c45766e..7b844f45 100644 --- a/experiments/annealing/models.py +++ b/experiments/annealing/models.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. #!/usr/bin/env python3 import math from typing import Union, Callable diff --git a/experiments/annealing/objectives.py b/experiments/annealing/objectives.py index 4c66dfb7..cc4a4f3d 100644 --- a/experiments/annealing/objectives.py +++ b/experiments/annealing/objectives.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. import torch import math import torch.nn.functional as F diff --git a/experiments/annealing/plotting.py b/experiments/annealing/plotting.py index a9f3917b..2626c4b8 100644 --- a/experiments/annealing/plotting.py +++ b/experiments/annealing/plotting.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. import numpy as np from matplotlib import pyplot as plt diff --git a/experiments/annealing/scripts/tabulate_and_plot.py b/experiments/annealing/scripts/tabulate_and_plot.py index 8c032dcc..c43e0e05 100644 --- a/experiments/annealing/scripts/tabulate_and_plot.py +++ b/experiments/annealing/scripts/tabulate_and_plot.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. import torch import sys import os diff --git a/experiments/annealing/utils.py b/experiments/annealing/utils.py index d61240e2..0682fc37 100644 --- a/experiments/annealing/utils.py +++ b/experiments/annealing/utils.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. #!/usr/bin/env python3 from torch import nn, Tensor, optim from typing import List diff --git a/experiments/annealing/vsmc.py b/experiments/annealing/vsmc.py index 5800dae2..4937c863 100644 --- a/experiments/annealing/vsmc.py +++ b/experiments/annealing/vsmc.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from combinators import Propose, Extend, Compose, Resample from experiments.annealing.objectives import stl_trace diff --git a/experiments/apgs/__init__.py b/experiments/apgs/__init__.py index e5a0d9b4..937411fd 100644 --- a/experiments/apgs/__init__.py +++ b/experiments/apgs/__init__.py @@ -1 +1,14 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. #!/usr/bin/env python3 diff --git a/experiments/apgs/affine_transformer.py b/experiments/apgs/affine_transformer.py index 38ad8d8c..31559f05 100644 --- a/experiments/apgs/affine_transformer.py +++ b/experiments/apgs/affine_transformer.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. import torch import torch.nn as nn from torch.nn.functional import affine_grid, grid_sample diff --git a/experiments/apgs/dataset/simulator.py b/experiments/apgs/dataset/simulator.py index 5cabff71..83c34423 100644 --- a/experiments/apgs/dataset/simulator.py +++ b/experiments/apgs/dataset/simulator.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. import os import math import time diff --git a/experiments/apgs/gibbs.py b/experiments/apgs/gibbs.py index 4a72c465..38424fc8 100644 --- a/experiments/apgs/gibbs.py +++ b/experiments/apgs/gibbs.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. import torch.nn.functional as F from combinators import Program, Compose, Propose, Resample, Extend from .utils import apg_ix diff --git a/experiments/apgs/main.py b/experiments/apgs/main.py index 96b30ebd..dd4e7e8f 100644 --- a/experiments/apgs/main.py +++ b/experiments/apgs/main.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. import os import time import argparse diff --git a/experiments/apgs/models.py b/experiments/apgs/models.py index e5cb80cb..b9e62efb 100644 --- a/experiments/apgs/models.py +++ b/experiments/apgs/models.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. import math import weakref import torch diff --git a/experiments/apgs/notebooks/evaluate_saved_model.py b/experiments/apgs/notebooks/evaluate_saved_model.py index e92f6006..70e1b783 100644 --- a/experiments/apgs/notebooks/evaluate_saved_model.py +++ b/experiments/apgs/notebooks/evaluate_saved_model.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. #!/usr/bin/env python3 import os diff --git a/experiments/apgs/objectives.py b/experiments/apgs/objectives.py index 958afe56..2ff59e4f 100644 --- a/experiments/apgs/objectives.py +++ b/experiments/apgs/objectives.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. import torch.nn.functional as F diff --git a/experiments/apgs/plotting.py b/experiments/apgs/plotting.py index 8390d5d8..9b9646b7 100644 --- a/experiments/apgs/plotting.py +++ b/experiments/apgs/plotting.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from matplotlib import gridspec, patches import matplotlib.pyplot as plt diff --git a/experiments/apgs/utils.py b/experiments/apgs/utils.py index cf02a8d4..b0199dea 100644 --- a/experiments/apgs/utils.py +++ b/experiments/apgs/utils.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. import weakref from combinators.out import GlobalStore diff --git a/experiments/startup.py b/experiments/startup.py index 07db3d73..6f41a6f0 100644 --- a/experiments/startup.py +++ b/experiments/startup.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. #!/usr/bin/env python3 """ This file is intended to be a verbose "bootstrap" script used in conjunction with a jupyter notebook. diff --git a/setup.py b/setup.py index 0a74688d..29ad0908 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Borrow from: https://github.com/navdeep-G/setup.py #!/usr/bin/env python # -*- coding: utf-8 -*- diff --git a/tests/__init__.py b/tests/__init__.py index e69de29b..8ebeda6e 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/tests/test_adhoc_programs.py b/tests/test_adhoc_programs.py index 605ad019..ad4e0f84 100644 --- a/tests/test_adhoc_programs.py +++ b/tests/test_adhoc_programs.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. """ Program introduction forms: Annotations """ import torch diff --git a/tests/test_annealing.py b/tests/test_annealing.py index 72f5bf06..db0c4744 100644 --- a/tests/test_annealing.py +++ b/tests/test_annealing.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. """ TODO: encode these into more general tests """ #!/usr/bin/env python3 from pytest import mark diff --git a/tests/test_inference.py b/tests/test_inference.py index 19bd0286..8197b095 100644 --- a/tests/test_inference.py +++ b/tests/test_inference.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. import torch from combinators.inference import Program, Compose, Extend, Propose import combinators.utils as debug diff --git a/tests/test_resamplers.py b/tests/test_resamplers.py index 38b85df8..cbb39693 100644 --- a/tests/test_resamplers.py +++ b/tests/test_resamplers.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. #!/usr/bin/env python3 import torch import torch.distributions as D diff --git a/tests/utils.py b/tests/utils.py index f6818dab..3dcbf2e7 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -1,3 +1,16 @@ +# Copyright 2021-2024 Northeastern University +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from pytest import fixture import combinators.utils as debug