From aa8e33ff0403132bd912108a97310a45112f24bc Mon Sep 17 00:00:00 2001 From: Jirka Date: Tue, 6 Sep 2022 16:57:35 +0200 Subject: [PATCH] add license note --- src/lightning_utilities/core/apply_func.py | 9 --------- src/lightning_utilities/core/enums.py | 4 ++++ src/lightning_utilities/core/imports.py | 12 +----------- src/lightning_utilities/core/inheritance.py | 4 ++++ src/lightning_utilities/core/overrides.py | 4 ++++ src/lightning_utilities/core/rank_zero.py | 4 ++++ src/lightning_utilities/dev/__main__.py | 4 ++++ src/lightning_utilities/dev/dependencies.py | 4 ++++ 8 files changed, 25 insertions(+), 20 deletions(-) diff --git a/src/lightning_utilities/core/apply_func.py b/src/lightning_utilities/core/apply_func.py index 0fcf8a8f..5b20de2c 100644 --- a/src/lightning_utilities/core/apply_func.py +++ b/src/lightning_utilities/core/apply_func.py @@ -1,16 +1,7 @@ # Copyright The PyTorch Lightning team. -# # 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 dataclasses from collections import defaultdict, OrderedDict from copy import deepcopy diff --git a/src/lightning_utilities/core/enums.py b/src/lightning_utilities/core/enums.py index 7da30bc1..f25e76f2 100644 --- a/src/lightning_utilities/core/enums.py +++ b/src/lightning_utilities/core/enums.py @@ -1,3 +1,7 @@ +# Copyright The PyTorch Lightning team. +# Licensed under the Apache License, Version 2.0 (the "License"); +# http://www.apache.org/licenses/LICENSE-2.0 +# from enum import Enum from typing import Optional diff --git a/src/lightning_utilities/core/imports.py b/src/lightning_utilities/core/imports.py index 63d26c40..a6d933cf 100644 --- a/src/lightning_utilities/core/imports.py +++ b/src/lightning_utilities/core/imports.py @@ -1,17 +1,7 @@ # Copyright The PyTorch Lightning team. -# # 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 importlib +#import importlib import operator from functools import lru_cache from importlib.util import find_spec diff --git a/src/lightning_utilities/core/inheritance.py b/src/lightning_utilities/core/inheritance.py index 499116ed..ebdcc6ef 100644 --- a/src/lightning_utilities/core/inheritance.py +++ b/src/lightning_utilities/core/inheritance.py @@ -1,3 +1,7 @@ +# Copyright The PyTorch Lightning team. +# Licensed under the Apache License, Version 2.0 (the "License"); +# http://www.apache.org/licenses/LICENSE-2.0 +# from typing import Iterator, Set, Type diff --git a/src/lightning_utilities/core/overrides.py b/src/lightning_utilities/core/overrides.py index 78d87ce7..49bd30eb 100644 --- a/src/lightning_utilities/core/overrides.py +++ b/src/lightning_utilities/core/overrides.py @@ -1,3 +1,7 @@ +# Copyright The PyTorch Lightning team. +# Licensed under the Apache License, Version 2.0 (the "License"); +# http://www.apache.org/licenses/LICENSE-2.0 +# from functools import partial from typing import Type from unittest.mock import Mock diff --git a/src/lightning_utilities/core/rank_zero.py b/src/lightning_utilities/core/rank_zero.py index 48d9ca67..c4a88c53 100644 --- a/src/lightning_utilities/core/rank_zero.py +++ b/src/lightning_utilities/core/rank_zero.py @@ -1,3 +1,7 @@ +# Copyright The PyTorch Lightning team. +# Licensed under the Apache License, Version 2.0 (the "License"); +# http://www.apache.org/licenses/LICENSE-2.0 +# """Utilities that can be used for calling functions on a particular rank.""" import logging import warnings diff --git a/src/lightning_utilities/dev/__main__.py b/src/lightning_utilities/dev/__main__.py index 3fe24f10..0ee2d792 100644 --- a/src/lightning_utilities/dev/__main__.py +++ b/src/lightning_utilities/dev/__main__.py @@ -1,3 +1,7 @@ +# Copyright The PyTorch Lightning team. +# Licensed under the Apache License, Version 2.0 (the "License"); +# http://www.apache.org/licenses/LICENSE-2.0 +# import fire from lightning_utilities.dev.dependencies import prune_pkgs_in_requirements, replace_oldest_ver diff --git a/src/lightning_utilities/dev/dependencies.py b/src/lightning_utilities/dev/dependencies.py index 8e4059d3..ec45ec72 100644 --- a/src/lightning_utilities/dev/dependencies.py +++ b/src/lightning_utilities/dev/dependencies.py @@ -1,3 +1,7 @@ +# Copyright The PyTorch Lightning team. +# Licensed under the Apache License, Version 2.0 (the "License"); +# http://www.apache.org/licenses/LICENSE-2.0 +# import glob import os.path from pprint import pprint