diff --git a/LICENSE b/LICENSE index f048b6a9d..4cef7c9e1 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,20 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2021 Valence + Copyright 2023 Valence Labs + Copyright 2023 Recursion Pharmaceuticals + Copyright 2023 Graphcore Limited + + Various Academic groups have also contributed to this software under + the given license. These include, but are not limited, to the following + + 1. University of Montreal + 2. McGill University + 3. Mila - Institut Quebecois d'intelligence artificielle + 4. HEC Montreal + 5. CIFAR AI Chair + 6. New Jersey Institute of Technology + 7. RWTH Aachen 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/cleanup_files.sh b/cleanup_files.sh index 855756ae5..5d5ad0b7c 100644 --- a/cleanup_files.sh +++ b/cleanup_files.sh @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + # Delete saved files like wandb, checkpoints, profiling etc. # Usage: bash cleanup_files.sh rm -rf wandb/* diff --git a/docs/api/graphium.visualization.md b/docs/api/graphium.visualization.md deleted file mode 100644 index 71585f10b..000000000 --- a/docs/api/graphium.visualization.md +++ /dev/null @@ -1,5 +0,0 @@ -graphium.visualization -================== -Code for visualizing graphs - -::: graphium.visualization.vis_utils diff --git a/docs/design.md b/docs/design.md index a1ee4f930..380ac28e4 100644 --- a/docs/design.md +++ b/docs/design.md @@ -46,7 +46,6 @@ Below are a list of directory and their respective documentations: - [nn](https://github.com/datamol-io/graphium/tree/main/graphium/nn/README.md) - [trainer](https://github.com/datamol-io/graphium/tree/main/graphium/trainer/README.md) - [utils](https://github.com/datamol-io/graphium/tree/main/graphium/features/README.md) -- [visualization](https://github.com/datamol-io/graphium/tree/main/graphium/visualization/README.md) ## Structure of the configs diff --git a/enable_ipu.sh b/enable_ipu.sh index d63d27c51..63dd34987 100755 --- a/enable_ipu.sh +++ b/enable_ipu.sh @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Graphcore Limited. +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Graphcore Limited is not liable +for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + #!/bin/bash # Default location for the virtual environment diff --git a/graphium/config/_load.py b/graphium/config/_load.py index 15880bd82..dfbf1ca2d 100644 --- a/graphium/config/_load.py +++ b/graphium/config/_load.py @@ -1,3 +1,16 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals. +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + import importlib.resources import omegaconf diff --git a/graphium/config/_loader.py b/graphium/config/_loader.py index 259c61e34..1e542592d 100644 --- a/graphium/config/_loader.py +++ b/graphium/config/_loader.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + # Misc import os from copy import deepcopy diff --git a/graphium/config/config_convert.py b/graphium/config/config_convert.py index a6258d3ba..135e63dec 100644 --- a/graphium/config/config_convert.py +++ b/graphium/config/config_convert.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + import omegaconf diff --git a/graphium/data/collate.py b/graphium/data/collate.py index 933c7fe39..22486b034 100644 --- a/graphium/data/collate.py +++ b/graphium/data/collate.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from collections.abc import Mapping, Sequence # from pprint import pprint diff --git a/graphium/data/datamodule.py b/graphium/data/datamodule.py index 08ec7773f..4e89f6728 100644 --- a/graphium/data/datamodule.py +++ b/graphium/data/datamodule.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + import tempfile from contextlib import redirect_stderr, redirect_stdout from typing import Type, List, Dict, Union, Any, Callable, Optional, Tuple, Iterable, Literal diff --git a/graphium/data/dataset.py b/graphium/data/dataset.py index cc8b7b685..34c1b30aa 100644 --- a/graphium/data/dataset.py +++ b/graphium/data/dataset.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + import os from copy import deepcopy from functools import lru_cache diff --git a/graphium/data/multilevel_utils.py b/graphium/data/multilevel_utils.py index 48a18b044..7f9ed5813 100644 --- a/graphium/data/multilevel_utils.py +++ b/graphium/data/multilevel_utils.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + import pandas as pd import ast import numpy as np diff --git a/graphium/data/normalization.py b/graphium/data/normalization.py index 4eb4ddcc8..994e8939b 100644 --- a/graphium/data/normalization.py +++ b/graphium/data/normalization.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Optional from loguru import logger import numpy as np diff --git a/graphium/data/sampler.py b/graphium/data/sampler.py index 3fbd8d220..cd325cd9c 100644 --- a/graphium/data/sampler.py +++ b/graphium/data/sampler.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Dict, Optional from torch.utils.data.dataloader import Dataset diff --git a/graphium/data/sdf2csv.py b/graphium/data/sdf2csv.py index f64858e2f..34dc4bd2a 100644 --- a/graphium/data/sdf2csv.py +++ b/graphium/data/sdf2csv.py @@ -1,3 +1,16 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs and Recursion Pharmaceuticals are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + import datamol as dm import zipfile import pandas as pd diff --git a/graphium/data/smiles_transform.py b/graphium/data/smiles_transform.py index ecc813a1b..e498b405f 100644 --- a/graphium/data/smiles_transform.py +++ b/graphium/data/smiles_transform.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs and Recursion Pharmaceuticals are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Type, List, Dict, Union, Any, Callable, Optional, Tuple, Iterable import os diff --git a/graphium/data/utils.py b/graphium/data/utils.py index 04ad91abe..aa5151a90 100644 --- a/graphium/data/utils.py +++ b/graphium/data/utils.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Union, List, Callable, Dict, Tuple, Any, Optional import importlib.resources diff --git a/graphium/features/commute.py b/graphium/features/commute.py index 0ce198c33..a7cea768c 100644 --- a/graphium/features/commute.py +++ b/graphium/features/commute.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Tuple, Union, Dict, Any import numpy as np diff --git a/graphium/features/electrostatic.py b/graphium/features/electrostatic.py index ffd875fa7..58dc115f7 100644 --- a/graphium/features/electrostatic.py +++ b/graphium/features/electrostatic.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Tuple, Union, Dict, Any import numpy as np diff --git a/graphium/features/featurizer.py b/graphium/features/featurizer.py index d8efdb2ab..7c6afda4c 100644 --- a/graphium/features/featurizer.py +++ b/graphium/features/featurizer.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Union, List, Callable, Dict, Tuple, Any, Optional import inspect diff --git a/graphium/features/graphormer.py b/graphium/features/graphormer.py index 3b4524797..d62010801 100644 --- a/graphium/features/graphormer.py +++ b/graphium/features/graphormer.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Tuple, Union, Dict, Any import numpy as np diff --git a/graphium/features/nmp.py b/graphium/features/nmp.py index 9d13cfd7f..97cee7019 100644 --- a/graphium/features/nmp.py +++ b/graphium/features/nmp.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Tuple, Optional, Dict, Union import importlib.resources from copy import deepcopy diff --git a/graphium/features/positional_encoding.py b/graphium/features/positional_encoding.py index b2c4bf161..8acc231d8 100644 --- a/graphium/features/positional_encoding.py +++ b/graphium/features/positional_encoding.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Tuple, Union, Optional, Dict, Any, OrderedDict from copy import deepcopy import numpy as np diff --git a/graphium/features/properties.py b/graphium/features/properties.py index 04f80955c..ad4ff5e5e 100644 --- a/graphium/features/properties.py +++ b/graphium/features/properties.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Union, List, Callable import numpy as np diff --git a/graphium/features/rw.py b/graphium/features/rw.py index 0a4ff5ca0..c7eada2ba 100644 --- a/graphium/features/rw.py +++ b/graphium/features/rw.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Tuple, Union, Optional, List, Dict, Any, Iterable from scipy.sparse import issparse, spmatrix, coo_matrix diff --git a/graphium/features/spectral.py b/graphium/features/spectral.py index 1a7542143..55d8527a4 100644 --- a/graphium/features/spectral.py +++ b/graphium/features/spectral.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Tuple, Union, Dict, Any from scipy.linalg import eig from scipy.sparse import csr_matrix, diags, issparse, spmatrix diff --git a/graphium/features/transfer_pos_level.py b/graphium/features/transfer_pos_level.py index c5de0249f..4bb70e160 100644 --- a/graphium/features/transfer_pos_level.py +++ b/graphium/features/transfer_pos_level.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Tuple, Union, List, Dict, Any, Optional import numpy as np diff --git a/graphium/finetuning/finetuning.py b/graphium/finetuning/finetuning.py index 92b13a1f8..97d6d7fc7 100644 --- a/graphium/finetuning/finetuning.py +++ b/graphium/finetuning/finetuning.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Iterable, List, Dict, Tuple, Union, Callable, Any, Optional, Type from collections import OrderedDict diff --git a/graphium/finetuning/finetuning_architecture.py b/graphium/finetuning/finetuning_architecture.py index a4c2b34c1..864016141 100644 --- a/graphium/finetuning/finetuning_architecture.py +++ b/graphium/finetuning/finetuning_architecture.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Any, Dict, Optional, Union import torch diff --git a/graphium/finetuning/fingerprinting.py b/graphium/finetuning/fingerprinting.py index b93c827eb..8bfdb5d94 100644 --- a/graphium/finetuning/fingerprinting.py +++ b/graphium/finetuning/fingerprinting.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + import torch from collections import defaultdict diff --git a/graphium/finetuning/utils.py b/graphium/finetuning/utils.py index a2bd20d68..7b9f7df74 100644 --- a/graphium/finetuning/utils.py +++ b/graphium/finetuning/utils.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from copy import deepcopy from typing import Any, Dict, List, Union diff --git a/graphium/hyper_param_search/results.py b/graphium/hyper_param_search/results.py index 6aab001f3..30ab04cdc 100644 --- a/graphium/hyper_param_search/results.py +++ b/graphium/hyper_param_search/results.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + _OBJECTIVE_KEY = "objective" diff --git a/graphium/ipu/ipu_dataloader.py b/graphium/ipu/ipu_dataloader.py index 92a777f25..5aa7828f4 100644 --- a/graphium/ipu/ipu_dataloader.py +++ b/graphium/ipu/ipu_dataloader.py @@ -1,4 +1,16 @@ -# Copyright (c) 2022 Graphcore Ltd. All rights reserved. +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + from typing import Callable, Iterable, Optional, List, Tuple, Dict, Any, Union from copy import deepcopy diff --git a/graphium/ipu/ipu_losses.py b/graphium/ipu/ipu_losses.py index 5e7a93c85..6bc434ae4 100644 --- a/graphium/ipu/ipu_losses.py +++ b/graphium/ipu/ipu_losses.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + import torch from torch import Tensor from torch.nn import BCELoss, BCEWithLogitsLoss, MSELoss, L1Loss diff --git a/graphium/ipu/ipu_metrics.py b/graphium/ipu/ipu_metrics.py index ba42108c5..9029d3e00 100644 --- a/graphium/ipu/ipu_metrics.py +++ b/graphium/ipu/ipu_metrics.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Optional, Tuple, Sequence, Literal import torch diff --git a/graphium/ipu/ipu_simple_lightning.py b/graphium/ipu/ipu_simple_lightning.py index 8f85e3444..b2fca086e 100644 --- a/graphium/ipu/ipu_simple_lightning.py +++ b/graphium/ipu/ipu_simple_lightning.py @@ -1,4 +1,17 @@ -# Copyright (c) 2021 Graphcore Ltd. All rights reserved. +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + import lightning from lightning_graphcore import IPUStrategy from lightning.pytorch.loggers import WandbLogger diff --git a/graphium/ipu/ipu_utils.py b/graphium/ipu/ipu_utils.py index 8782285ca..c5140ecb5 100644 --- a/graphium/ipu/ipu_utils.py +++ b/graphium/ipu/ipu_utils.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + import os import tempfile from datetime import datetime diff --git a/graphium/ipu/ipu_wrapper.py b/graphium/ipu/ipu_wrapper.py index 4869c17eb..0ac04b883 100644 --- a/graphium/ipu/ipu_wrapper.py +++ b/graphium/ipu/ipu_wrapper.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Dict, Any, Optional, Callable, Union, Type, Tuple, Iterable from torch_geometric.data import Batch diff --git a/graphium/ipu/to_dense_batch.py b/graphium/ipu/to_dense_batch.py index 34e4349d7..9198ccf3f 100644 --- a/graphium/ipu/to_dense_batch.py +++ b/graphium/ipu/to_dense_batch.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Optional, Tuple import torch diff --git a/graphium/nn/architectures/encoder_manager.py b/graphium/nn/architectures/encoder_manager.py index 464d9e9cc..69fb8866e 100644 --- a/graphium/nn/architectures/encoder_manager.py +++ b/graphium/nn/architectures/encoder_manager.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Iterable, Dict, Any, Optional from torch_geometric.data import Batch diff --git a/graphium/nn/architectures/global_architectures.py b/graphium/nn/architectures/global_architectures.py index 1b6f44dd9..f6d5a5ed0 100644 --- a/graphium/nn/architectures/global_architectures.py +++ b/graphium/nn/architectures/global_architectures.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Iterable, List, Dict, Literal, Tuple, Union, Callable, Any, Optional, Type from torch_geometric.data import Batch from graphium.ipu.to_dense_batch import to_dense_batch diff --git a/graphium/nn/architectures/pyg_architectures.py b/graphium/nn/architectures/pyg_architectures.py index 56fe979da..3bd4d10c1 100644 --- a/graphium/nn/architectures/pyg_architectures.py +++ b/graphium/nn/architectures/pyg_architectures.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from torch import Tensor from torch.nn import Module from typing import Tuple, Union, List, Optional diff --git a/graphium/nn/base_graph_layer.py b/graphium/nn/base_graph_layer.py index fb23f8ba3..66869f888 100644 --- a/graphium/nn/base_graph_layer.py +++ b/graphium/nn/base_graph_layer.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + import abc from typing import Union, Callable, List, Optional, Mapping from copy import deepcopy diff --git a/graphium/nn/base_layers.py b/graphium/nn/base_layers.py index 1d402b760..dbc89f19f 100644 --- a/graphium/nn/base_layers.py +++ b/graphium/nn/base_layers.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Union, Callable, Optional, Type, Tuple, Iterable from copy import deepcopy from loguru import logger diff --git a/graphium/nn/ensemble_layers.py b/graphium/nn/ensemble_layers.py index 41c9a4018..7b6aa4668 100644 --- a/graphium/nn/ensemble_layers.py +++ b/graphium/nn/ensemble_layers.py @@ -1,3 +1,16 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals. +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Union, Callable, Optional, Type, Tuple, Iterable from copy import deepcopy from loguru import logger diff --git a/graphium/nn/pyg_layers/dimenet_pyg.py b/graphium/nn/pyg_layers/dimenet_pyg.py index e8954ff41..2fc6d3526 100644 --- a/graphium/nn/pyg_layers/dimenet_pyg.py +++ b/graphium/nn/pyg_layers/dimenet_pyg.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Callable, Union, Optional, Tuple from functools import partial diff --git a/graphium/nn/pyg_layers/gated_gcn_pyg.py b/graphium/nn/pyg_layers/gated_gcn_pyg.py index 348b6ad7a..d36a0ef3a 100644 --- a/graphium/nn/pyg_layers/gated_gcn_pyg.py +++ b/graphium/nn/pyg_layers/gated_gcn_pyg.py @@ -1,11 +1,16 @@ """ -Unit tests for the different layers of graphium/nn/pyg_layers/... - -The layers are not thoroughly tested due to the difficulty of testing them - -adapated from https://github.com/rampasek/GraphGPS/blob/main/graphgps/layer/gps_layer.py +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals. +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- """ + from typing import Union, Callable from functools import partial diff --git a/graphium/nn/pyg_layers/gcn_pyg.py b/graphium/nn/pyg_layers/gcn_pyg.py index a113540b2..c42520877 100644 --- a/graphium/nn/pyg_layers/gcn_pyg.py +++ b/graphium/nn/pyg_layers/gcn_pyg.py @@ -1,3 +1,16 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals. +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Callable, Union from functools import partial diff --git a/graphium/nn/pyg_layers/gin_pyg.py b/graphium/nn/pyg_layers/gin_pyg.py index 9c1a2f49a..afd43e965 100644 --- a/graphium/nn/pyg_layers/gin_pyg.py +++ b/graphium/nn/pyg_layers/gin_pyg.py @@ -1,3 +1,16 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals. +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Callable, Union, Optional from functools import partial diff --git a/graphium/nn/pyg_layers/gps_pyg.py b/graphium/nn/pyg_layers/gps_pyg.py index bc04c8288..518c581c2 100644 --- a/graphium/nn/pyg_layers/gps_pyg.py +++ b/graphium/nn/pyg_layers/gps_pyg.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + import torch from copy import deepcopy from typing import Callable, Union, Optional, Dict, Any diff --git a/graphium/nn/pyg_layers/mpnn_pyg.py b/graphium/nn/pyg_layers/mpnn_pyg.py index 73118c8f7..995475c8c 100644 --- a/graphium/nn/pyg_layers/mpnn_pyg.py +++ b/graphium/nn/pyg_layers/mpnn_pyg.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Callable, Optional, Union, Tuple, List import torch diff --git a/graphium/nn/pyg_layers/pna_pyg.py b/graphium/nn/pyg_layers/pna_pyg.py index 7ec2d5e03..2ff098b36 100644 --- a/graphium/nn/pyg_layers/pna_pyg.py +++ b/graphium/nn/pyg_layers/pna_pyg.py @@ -1,3 +1,16 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals. +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Dict, List, Optional, Union, Callable from functools import partial diff --git a/graphium/nn/pyg_layers/pooling_pyg.py b/graphium/nn/pyg_layers/pooling_pyg.py index e57596948..3147c19d1 100644 --- a/graphium/nn/pyg_layers/pooling_pyg.py +++ b/graphium/nn/pyg_layers/pooling_pyg.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + import torch import torch.nn as nn from torch import Tensor, LongTensor diff --git a/graphium/nn/pyg_layers/utils.py b/graphium/nn/pyg_layers/utils.py index 100ccec51..83dc4f737 100644 --- a/graphium/nn/pyg_layers/utils.py +++ b/graphium/nn/pyg_layers/utils.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + import math import torch import torch.nn as nn diff --git a/graphium/nn/residual_connections.py b/graphium/nn/residual_connections.py index f9cb34ee3..9f2c383de 100644 --- a/graphium/nn/residual_connections.py +++ b/graphium/nn/residual_connections.py @@ -1,3 +1,16 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals. +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + """ Different types of residual connections, including None, Simple (ResNet-like), Concat and DenseNet diff --git a/graphium/nn/utils.py b/graphium/nn/utils.py index e9ac4fa0c..90a6e2cd9 100644 --- a/graphium/nn/utils.py +++ b/graphium/nn/utils.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + import abc import inspect from numbers import Real diff --git a/graphium/trainer/losses.py b/graphium/trainer/losses.py index d70af0a03..05603d8c2 100644 --- a/graphium/trainer/losses.py +++ b/graphium/trainer/losses.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Optional import torch diff --git a/graphium/trainer/metrics.py b/graphium/trainer/metrics.py index d935401ed..22361faa6 100644 --- a/graphium/trainer/metrics.py +++ b/graphium/trainer/metrics.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Union, Callable, Optional, Dict, Any import sys diff --git a/graphium/trainer/predictor.py b/graphium/trainer/predictor.py index ccde2c953..8cfb1ad28 100644 --- a/graphium/trainer/predictor.py +++ b/graphium/trainer/predictor.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + import time from copy import deepcopy from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union diff --git a/graphium/trainer/predictor_options.py b/graphium/trainer/predictor_options.py index 25fc6fad0..04a62e84b 100644 --- a/graphium/trainer/predictor_options.py +++ b/graphium/trainer/predictor_options.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + r"""Data classes to group together related arguments for the creation of a Predictor Module.""" diff --git a/graphium/trainer/predictor_summaries.py b/graphium/trainer/predictor_summaries.py index 8ce863e74..4cec79377 100644 --- a/graphium/trainer/predictor_summaries.py +++ b/graphium/trainer/predictor_summaries.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + r"""Classes to store information about resulting evaluation metrics when using a Predictor Module.""" from typing import Any, Callable, Dict, List, Optional, Union diff --git a/graphium/utils/arg_checker.py b/graphium/utils/arg_checker.py index 22712ff58..cc5837c19 100644 --- a/graphium/utils/arg_checker.py +++ b/graphium/utils/arg_checker.py @@ -1,3 +1,16 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals. +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + """ Argument checker module """ import collections import numpy as np diff --git a/graphium/utils/command_line_utils.py b/graphium/utils/command_line_utils.py index ce02e3fb0..3e75979d3 100644 --- a/graphium/utils/command_line_utils.py +++ b/graphium/utils/command_line_utils.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + import re from collections import defaultdict from typing import List, Dict diff --git a/graphium/utils/custom_lr.py b/graphium/utils/custom_lr.py index f31a67b6a..beed53816 100644 --- a/graphium/utils/custom_lr.py +++ b/graphium/utils/custom_lr.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + import warnings from torch.optim.lr_scheduler import _LRScheduler diff --git a/graphium/utils/decorators.py b/graphium/utils/decorators.py index f75f490a5..fa366abf2 100644 --- a/graphium/utils/decorators.py +++ b/graphium/utils/decorators.py @@ -1,3 +1,16 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals. +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + class classproperty(property): r""" Decorator used to declare a class property, defined for the class diff --git a/graphium/utils/fs.py b/graphium/utils/fs.py index 35be281c4..a5ba7c5e9 100644 --- a/graphium/utils/fs.py +++ b/graphium/utils/fs.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Union from typing import Optional diff --git a/graphium/utils/hashing.py b/graphium/utils/hashing.py index 07a04f80b..a92ac0212 100644 --- a/graphium/utils/hashing.py +++ b/graphium/utils/hashing.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from typing import Any import hashlib import yaml diff --git a/graphium/utils/moving_average_tracker.py b/graphium/utils/moving_average_tracker.py index 01fc7305e..ec05e4bc4 100644 --- a/graphium/utils/moving_average_tracker.py +++ b/graphium/utils/moving_average_tracker.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from dataclasses import dataclass diff --git a/graphium/utils/mup.py b/graphium/utils/mup.py index e6bf6bf5d..f538aadc6 100644 --- a/graphium/utils/mup.py +++ b/graphium/utils/mup.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + ##### Code adapted from the `mup` package from Microsoft https://github.com/microsoft/mup from torch.nn import Linear diff --git a/graphium/utils/packing.py b/graphium/utils/packing.py index 699b4d357..6db6856b1 100644 --- a/graphium/utils/packing.py +++ b/graphium/utils/packing.py @@ -1,4 +1,16 @@ -# Copyright (c) 2022 Graphcore Ltd. All rights reserved. +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + from typing import List, Tuple, Iterable, Optional import numpy as np diff --git a/graphium/utils/read_file.py b/graphium/utils/read_file.py index 09035cb00..27d2fb216 100644 --- a/graphium/utils/read_file.py +++ b/graphium/utils/read_file.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + """ Utiles for data parsing""" import os import warnings diff --git a/graphium/utils/safe_run.py b/graphium/utils/safe_run.py index 92dce504a..2db0af4dc 100644 --- a/graphium/utils/safe_run.py +++ b/graphium/utils/safe_run.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from loguru import logger import traceback as tb diff --git a/graphium/utils/spaces.py b/graphium/utils/spaces.py index e18cd2302..88812c0be 100644 --- a/graphium/utils/spaces.py +++ b/graphium/utils/spaces.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + from copy import deepcopy import torch import torch.optim.lr_scheduler as sc diff --git a/graphium/utils/tensor.py b/graphium/utils/tensor.py index 1514e620c..87b578011 100644 --- a/graphium/utils/tensor.py +++ b/graphium/utils/tensor.py @@ -1,3 +1,17 @@ +""" +-------------------------------------------------------------------------------- +Copyright (c) 2023 Valence Labs, Recursion Pharmaceuticals and Graphcore Limited. + +Use of this software is subject to the terms and conditions outlined in the LICENSE file. +Unauthorized modification, distribution, or use is prohibited. Provided 'as is' without +warranties of any kind. + +Valence Labs, Recursion Pharmaceuticals and Graphcore Limited are not liable for any damages arising from its use. +Refer to the LICENSE file for the full terms and conditions. +-------------------------------------------------------------------------------- +""" + + import os import numpy as np import pandas as pd diff --git a/graphium/visualization/README.md b/graphium/visualization/README.md deleted file mode 100644 index f78f76ac9..000000000 --- a/graphium/visualization/README.md +++ /dev/null @@ -1,9 +0,0 @@ -