diff --git a/src/net.rs b/src/net.rs index 12ce62c5..ec32efeb 100644 --- a/src/net.rs +++ b/src/net.rs @@ -1,3 +1,9 @@ +// Copyright (c) Meta Platforms, Inc. and affiliates. +// All rights reserved. +// +// This source code is licensed under the BSD-style license found in the +// LICENSE file in the root directory of this source tree. + use std::time::Duration; use anyhow::Result; diff --git a/src/retry.rs b/src/retry.rs index 6a84cff6..a4143c6f 100644 --- a/src/retry.rs +++ b/src/retry.rs @@ -1,3 +1,9 @@ +// Copyright (c) Meta Platforms, Inc. and affiliates. +// All rights reserved. +// +// This source code is licensed under the BSD-style license found in the +// LICENSE file in the root directory of this source tree. + use std::future::Future; use std::pin::Pin; use std::time::Duration; diff --git a/src/timeout.rs b/src/timeout.rs index da8af4fb..d5963950 100644 --- a/src/timeout.rs +++ b/src/timeout.rs @@ -1,3 +1,9 @@ +// Copyright (c) Meta Platforms, Inc. and affiliates. +// All rights reserved. +// +// This source code is licensed under the BSD-style license found in the +// LICENSE file in the root directory of this source tree. + use std::time::Duration; use anyhow::Result; diff --git a/tools/linter/adapters/pyre_linter.py b/tools/linter/adapters/pyre_linter.py index 99f2c3b8..47b2f4e7 100644 --- a/tools/linter/adapters/pyre_linter.py +++ b/tools/linter/adapters/pyre_linter.py @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + import argparse import concurrent.futures import json diff --git a/tools/linter/adapters/rust_linter.py b/tools/linter/adapters/rust_linter.py index 9c8e9201..08a8f95f 100644 --- a/tools/linter/adapters/rust_linter.py +++ b/tools/linter/adapters/rust_linter.py @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + from __future__ import annotations import argparse diff --git a/torchft/_test/diloco_trainer.py b/torchft/_test/diloco_trainer.py index 812604e1..51a6fe4a 100644 --- a/torchft/_test/diloco_trainer.py +++ b/torchft/_test/diloco_trainer.py @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + import copy import logging import os diff --git a/torchft/_torchft.pyi b/torchft/_torchft.pyi index 95dbfd5b..228d5a35 100644 --- a/torchft/_torchft.pyi +++ b/torchft/_torchft.pyi @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + from dataclasses import dataclass from datetime import timedelta from typing import Hashable, List, Optional diff --git a/torchft/checkpointing/_rwlock.py b/torchft/checkpointing/_rwlock.py index 54b6d088..4bddc62e 100644 --- a/torchft/checkpointing/_rwlock.py +++ b/torchft/checkpointing/_rwlock.py @@ -1,4 +1,9 @@ -# -*- coding: utf-8 -*- +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + """rwlock.py Adapted from: https://github.com/tylerneylon/rwlock/blob/main/rwlock.py diff --git a/torchft/checkpointing/_serialization.py b/torchft/checkpointing/_serialization.py index d242fb91..4d4991ce 100644 --- a/torchft/checkpointing/_serialization.py +++ b/torchft/checkpointing/_serialization.py @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + import io import warnings from typing import IO diff --git a/torchft/checkpointing/http_transport_bench.py b/torchft/checkpointing/http_transport_bench.py index f002895c..211914ec 100644 --- a/torchft/checkpointing/http_transport_bench.py +++ b/torchft/checkpointing/http_transport_bench.py @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + import logging import sys from datetime import timedelta diff --git a/torchft/checkpointing/pg_transport.py b/torchft/checkpointing/pg_transport.py index 0c792af6..ca95d98e 100644 --- a/torchft/checkpointing/pg_transport.py +++ b/torchft/checkpointing/pg_transport.py @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + import logging import pickle import time diff --git a/torchft/checkpointing/pg_transport_bench.py b/torchft/checkpointing/pg_transport_bench.py index 9cb76d60..be2c0995 100644 --- a/torchft/checkpointing/pg_transport_bench.py +++ b/torchft/checkpointing/pg_transport_bench.py @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + import logging import sys from concurrent.futures import ThreadPoolExecutor diff --git a/torchft/checkpointing/pg_transport_test.py b/torchft/checkpointing/pg_transport_test.py index bd634658..af3f9865 100644 --- a/torchft/checkpointing/pg_transport_test.py +++ b/torchft/checkpointing/pg_transport_test.py @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + import sys from datetime import timedelta from unittest import skipIf, skipUnless, TestCase diff --git a/torchft/checkpointing/rwlock_test.py b/torchft/checkpointing/rwlock_test.py index 49af8f6f..9169332b 100644 --- a/torchft/checkpointing/rwlock_test.py +++ b/torchft/checkpointing/rwlock_test.py @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + import pytest from torchft.checkpointing._rwlock import RWLock diff --git a/torchft/checkpointing/transport_test.py b/torchft/checkpointing/transport_test.py index c33801a3..b6edeb8b 100644 --- a/torchft/checkpointing/transport_test.py +++ b/torchft/checkpointing/transport_test.py @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + import threading import traceback from concurrent.futures import as_completed, ThreadPoolExecutor diff --git a/torchft/coordination.py b/torchft/coordination.py index 0173b8e9..c0a6d634 100644 --- a/torchft/coordination.py +++ b/torchft/coordination.py @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + """ Coordination (Low Level API) ============================ diff --git a/torchft/diloco_regression_test.py b/torchft/diloco_regression_test.py index 3d2236a5..1db8bc12 100644 --- a/torchft/diloco_regression_test.py +++ b/torchft/diloco_regression_test.py @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + import argparse import copy import json diff --git a/torchft/examples/slurm/punisher.py b/torchft/examples/slurm/punisher.py index 328d9f41..c362e955 100644 --- a/torchft/examples/slurm/punisher.py +++ b/torchft/examples/slurm/punisher.py @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + import argparse import logging import random diff --git a/torchft/examples/slurm/runner.py b/torchft/examples/slurm/runner.py index 4111b3db..dac3c949 100644 --- a/torchft/examples/slurm/runner.py +++ b/torchft/examples/slurm/runner.py @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + import argparse import logging import os diff --git a/torchft/futures.py b/torchft/futures.py index c45a4a36..c7d74c12 100644 --- a/torchft/futures.py +++ b/torchft/futures.py @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + import asyncio import os import queue diff --git a/torchft/futures_test.py b/torchft/futures_test.py index 679d497e..1d52b1a1 100644 --- a/torchft/futures_test.py +++ b/torchft/futures_test.py @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + import threading from datetime import timedelta from unittest import skipUnless, TestCase diff --git a/torchft/http.py b/torchft/http.py index a93a84b2..f45fcb04 100644 --- a/torchft/http.py +++ b/torchft/http.py @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + import socket from http.server import ThreadingHTTPServer diff --git a/torchft/lighthouse_test.py b/torchft/lighthouse_test.py index 067a6222..d81a5f39 100644 --- a/torchft/lighthouse_test.py +++ b/torchft/lighthouse_test.py @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + import time from datetime import timedelta from unittest import TestCase diff --git a/torchft/local_sgd_integ_test.py b/torchft/local_sgd_integ_test.py index 25df3622..94cbbc5b 100644 --- a/torchft/local_sgd_integ_test.py +++ b/torchft/local_sgd_integ_test.py @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + import copy import logging import os diff --git a/torchft/manager_integ_test.py b/torchft/manager_integ_test.py index 30d2ef4c..0b1e1714 100644 --- a/torchft/manager_integ_test.py +++ b/torchft/manager_integ_test.py @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + import copy import logging import threading diff --git a/torchft/multiprocessing.py b/torchft/multiprocessing.py index 7ead1e98..37bf727c 100644 --- a/torchft/multiprocessing.py +++ b/torchft/multiprocessing.py @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + import queue import time from datetime import timedelta diff --git a/torchft/otel.py b/torchft/otel.py index 4dcc1878..9f927a5b 100644 --- a/torchft/otel.py +++ b/torchft/otel.py @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + import json import logging import os diff --git a/torchft/torchx.py b/torchft/torchx.py index 42d3f154..9d823c9e 100644 --- a/torchft/torchx.py +++ b/torchft/torchx.py @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + """ This is a file for TorchX components used for testing torchft. """ diff --git a/torchft/work.py b/torchft/work.py index 9c6ff03a..47d95f94 100644 --- a/torchft/work.py +++ b/torchft/work.py @@ -1,3 +1,9 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + from contextlib import nullcontext from datetime import timedelta from typing import Optional