Unverified Commit e14cca44 authored by Riyasat Ohib's avatar Riyasat Ohib Committed by GitHub
Browse files

Adding experimental wgit to the repo with wgit command (#991)

* [feat] Adding wgit within fairscale/experimental/wgit.

* [feat] adding experimental wgit
parent 7510150b
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.
from .cli import main
__version__ = "0.0.1"
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.
from .cli import main
if __name__ == "__main__":
main()
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.
import argparse
def main(argv=None):
desc = "WeiGit checkpoint tracking"
parser = argparse.ArgumentParser(description=desc)
# flags
parser.add_argument("-i", "--init", action="store_true", help="Initialize a weigit repository!")
args = parser.parse_args(argv)
if args.init:
print("Hello World, Wgit has been initialized!")
if __name__ == "__main__":
main()
......@@ -69,6 +69,7 @@ if __name__ == "__main__":
author_email="todo@fb.com",
long_description="FairScale is a PyTorch extension library for high performance and large scale training on one or multiple machines/nodes. This library extends basic PyTorch capabilities while adding new experimental ones.",
long_description_content_type="text/markdown",
entry_points={"console_scripts": ["wgit = experimental.wgit.__main__:main"]},
classifiers=[
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
......
......@@ -23,3 +23,4 @@ tests/optim/test_oss_adascale.py
tests/optim/test_ddp_adascale.py
tests/experimental/nn/data_parallel/test_gossip.py
tests/nn/data_parallel/test_fsdp_hf_transformer_eval.py
tests/experimental/wgit/cli/test_cli.py
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.
import experimental.wgit.cli as cli
def test_cli_init(capsys):
cli.main(["--init"])
out, err = capsys.readouterr()
assert out == "Hello World, Wgit has been initialized!\n"
assert err == ""
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment