Skip to content

Commit

Permalink
Update changelog, removed meta.yml and requirements cleanup (#853)
Browse files Browse the repository at this point in the history
* update changelog

* [skip ci] removed requirements-test.txt

* [skip ci] updating changelog

* [skip ci] add PR numbers

* replacing requirements-test.txt by requirements-dev.txt

* [skip ci] changing requirements-test to requirements-dev in pre-commit and requirements-benchmarks

* [skip ci] mark manual static analysis checks as deprecated

* empty commit to trigger ci

* [skip ci] updating changelog

* [skip ci] addressing comments

* addressing more comments
  • Loading branch information
Anupam Bhatnagar committed Nov 17, 2021
1 parent ba5785f commit 2bfa5a6
Show file tree
Hide file tree
Showing 11 changed files with 80 additions and 103 deletions.
38 changes: 19 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ install_dep_1_8_1: &install_dep_1_8_1
if [ -f /home/circleci/venv/check_version.py ]; then python /home/circleci/venv/check_version.py torch eq 1.8 && exit 0; fi
# start installing
pip install --progress-bar off torch==1.8.1+cu102 torchvision==0.9.1+cu102 -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html
pip install --progress-bar off -r requirements-test.txt
pip install --progress-bar off -r requirements-dev.txt
pip install --progress-bar off -r requirements-benchmarks.txt
python -c 'import torch; print("Torch version:", torch.__version__)'
python -c 'import torch; assert torch.__version__.split(".")[:2] == ["1", "8"], "wrong torch version"'
Expand All @@ -103,7 +103,7 @@ install_dep_1_10_0: &install_dep_1_10_0
if [ -f /home/circleci/venv/check_version.py ]; then python /home/circleci/venv/check_version.py torch eq 1.10 && exit 0; fi
# start installing
pip install --progress-bar off torch==1.10.0+cu111 torchvision==0.11.1+cu111 -f https://download.pytorch.org/whl/torch_stable.html
pip install --progress-bar off -r requirements-test.txt
pip install --progress-bar off -r requirements-dev.txt
pip install --progress-bar off -r requirements-benchmarks.txt
python -c 'import torch; print("Torch version:", torch.__version__)'
python -c 'import torch; assert torch.__version__.split(".")[:2] == ["1", "10"], "wrong torch version"'
Expand All @@ -118,7 +118,7 @@ install_dep_pytorch_nightly: &install_dep_pytorch_nightly
if [ -f /home/circleci/venv/check_version.py ]; then python /home/circleci/venv/check_version.py torch eq 1.10 && exit 0; fi
# start installing
pip install --progress-bar off --pre torch==1.11.0.dev20211101+cu111 torchvision==0.12.0.dev20211101+cu111 -f https://download.pytorch.org/whl/nightly/cu111/torch_nightly.html
pip install --progress-bar off -r requirements-test.txt
pip install --progress-bar off -r requirements-dev.txt
pip install --progress-bar off -r requirements-benchmarks.txt
python -c 'import torch; print("Torch version:", torch.__version__)'
python -c 'import torch; assert torch.__version__.split(".")[:2] == ["1", "11"], "wrong torch version"'
Expand Down Expand Up @@ -247,14 +247,14 @@ jobs:
# Cache the venv directory that contains dependencies
- restore_cache:
keys:
- cache-key-cpu-py37-torch-1-10-0-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-test.txt"}}
- cache-key-cpu-py37-torch-1-10-0-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}

- <<: *install_dep_1_10_0

- save_cache:
paths:
- ~/venv
key: cache-key-cpu-py37-torch-1-10-0-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-test.txt"}}
key: cache-key-cpu-py37-torch-1-10-0-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}

- <<: *install_repo
- <<: *run_unittests
Expand All @@ -276,13 +276,13 @@ jobs:
# Cache the venv directory that contains dependencies
- restore_cache:
keys:
- cache-key-cpu-py38-torch-1-10-0-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-test.txt"}}
- cache-key-cpu-py38-torch-1-10-0-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}
- <<: *install_dep_1_10_0

- save_cache:
paths:
- ~/venv
key: cache-key-cpu-py38-torch-1-10-0-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-test.txt"}}
key: cache-key-cpu-py38-torch-1-10-0-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}

- <<: *install_repo
- <<: *run_unittests
Expand All @@ -304,14 +304,14 @@ jobs:
# Cache the venv directory that contains dependencies
- restore_cache:
keys:
- cache-key-cpu-py39-torch-1-10-0-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-test.txt"}}
- cache-key-cpu-py39-torch-1-10-0-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}

- <<: *install_dep_1_10_0

- save_cache:
paths:
- ~/venv
key: cache-key-cpu-py39-torch-1-10-0-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-test.txt"}}
key: cache-key-cpu-py39-torch-1-10-0-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}

- <<: *install_repo
- <<: *run_unittests
Expand Down Expand Up @@ -344,14 +344,14 @@ jobs:
# Cache the venv directory that contains dependencies
- restore_cache:
keys:
- cache-key-py-3-9-7-gpu-torch-1-8-1-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-test.txt"}}
- cache-key-py-3-9-7-gpu-torch-1-8-1-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}

- <<: *install_dep_1_8_1

- save_cache:
paths:
- ~/venv
key: cache-key-py-3-9-7-gpu-torch-1-8-1-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-test.txt"}}
key: cache-key-py-3-9-7-gpu-torch-1-8-1-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}

- <<: *install_repo

Expand Down Expand Up @@ -387,14 +387,14 @@ jobs:
# Cache the venv directory that contains dependencies
- restore_cache:
keys:
- cache-key-py-3-9-7-gpu-torch-1-10-0-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-test.txt"}}
- cache-key-py-3-9-7-gpu-torch-1-10-0-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}

- <<: *install_dep_1_10_0

- save_cache:
paths:
- ~/venv
key: cache-key-py-3-9-7-gpu-torch-1-10-0-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-test.txt"}}
key: cache-key-py-3-9-7-gpu-torch-1-10-0-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}

- <<: *install_repo

Expand Down Expand Up @@ -428,14 +428,14 @@ jobs:
# Cache the venv directory that contains dependencies
- restore_cache:
keys:
- cache-key-py-3-9-7-gpu-pytorch-nightly-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-test.txt"}}
- cache-key-py-3-9-7-gpu-pytorch-nightly-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}

- <<: *install_dep_pytorch_nightly

- save_cache:
paths:
- ~/venv
key: cache-key-py-3-9-7-gpu-pytorch-nightly-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-test.txt"}}
key: cache-key-py-3-9-7-gpu-pytorch-nightly-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}

- <<: *install_repo

Expand Down Expand Up @@ -463,7 +463,7 @@ jobs:
# Cache the venv directory that contains dependencies
- restore_cache:
keys:
- cache-key-py-3-9-7-benchmarks-torch-1-10-0-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-test.txt"}}
- cache-key-py-3-9-7-benchmarks-torch-1-10-0-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}

# Cache the MNIST directory that contains benchmark data
- restore_cache:
Expand All @@ -475,7 +475,7 @@ jobs:
- save_cache:
paths:
- ~/venv
key: cache-key-py-3-9-7-benchmarks-torch-1-10-0-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-test.txt"}}
key: cache-key-py-3-9-7-benchmarks-torch-1-10-0-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}

- <<: *install_repo

Expand Down Expand Up @@ -512,7 +512,7 @@ jobs:
# Cache the venv directory that contains dependencies
- restore_cache:
keys:
- cache-key-py-3-9-7-benchmarks-torch-1-10-0-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-test.txt"}}
- cache-key-py-3-9-7-benchmarks-torch-1-10-0-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}


# Cache the MNIST directory that contains benchmark data
Expand All @@ -525,7 +525,7 @@ jobs:
- save_cache:
paths:
- ~/venv
key: cache-key-py-3-9-7-benchmarks-torch-1-10-0-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-test.txt"}}
key: cache-key-py-3-9-7-benchmarks-torch-1-10-0-cuda-11-2-{{.Environment.CACHE_VERSION }}-{{checksum "setup.py"}}-{{checksum "requirements-dev.txt"}}

- <<: *install_repo

Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# If you change the versions below, please make sure they are in-sync
# with requirements-test.txt
# with requirements-dev.txt

exclude: 'build|stubs'

Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.4.3] - TBD

### Added
- Sharded Grad Scaler works with cpu offload in mixed and full precision. [#831]

### Changed
- Cleanup: Moving forward we would be testing all of our code with Python 3.9.7, CUDA 11.2 and the following three versions of PyTorch [#847]:
- the most recent stable version
- the most recent LTS version
- a recent nightly build

## [0.4.2] - 2021-11-08
### Fixed
- FSDP: Fixed an pre-backward hook bug for certain type of models and FSDP config. [#833]
Expand Down
23 changes: 17 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ outlined on that page and do not file a public issue.
~$ python3 -m venv venv2
~$ source venv2/bin/activate
(venv2) ~$ cd git/fairscale/
(venv2) ~/git/fairscale $ pip3 install -r requirements-test.txt
(venv2) ~/git/fairscale $ pip3 install -r requirements-dev.txt
```

## Coding Style
Expand All @@ -57,19 +57,23 @@ outlined on that page and do not file a public issue.
and less development overhead in maintaining an importing list.
* Please setup pre-commit before opening up your PR.

### Pre-commit
### Pre-Commit (Recommended)

We use pre-commit to maintain the coding style. Pre-Commit checks are run via Github Actions on every
commit. To install all the relevant libraries and run the pre-commit tests locally, execute the following
commands:

```
pip install -r requirements-dev.txt
pre-commit install
```

After the above, your `git commit` command will automatically trigger pre-commit
checks, which are static code analysis tools we use.
After the above, your `git commit` command will automatically trigger pre-commit checks.

### Run statis analysis by hand (without using pre-commit)
### Running static code analysis manually (Deprecated)

Note that, trailing spaces are not checked by the manual commands below, but they are checked by the pre-commit hooks above.
Note that, trailing spaces are not checked by the manual commands below, but they are checked by the
pre-commit hooks we use above.

```
black .
Expand All @@ -80,6 +84,13 @@ mypy --ignore-missing-imports --scripts-are-modules --pretty .

## Testing

FairScale code is tested on Python 3.9.7, CUDA 11.2 and the following three PyTorch versions:
- the latest stable version
- the latest LTS version
- a recent nightly release

See the [README](https://github.com/facebookresearch/fairscale/blob/main/README.md#testing) for the exact version numbers.

### Unit tests

```
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ At a high level, we want ML researchers to:
## Testing

We use circleci to test FairScale with the following PyTorch versions (with CUDA 11.2):
* the most recent PyTorch stable release
* the most recent PyTorch LTS release
* a recent PyTorch nightly release
* the latest stable release (1.10)
* the latest LTS release (1.8)
* a recent nightly release (1.11.0.dev20211101+cu111)

Please create an [issue](https://github.com/facebookresearch/fairscale/issues) if you are having trouble with installation.

Expand Down
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Update the CHANGELOG.md
- Update "what's new" in README.md
- If needed, update the PyTorch versions in README.md in the Testing section.
- Update `fairscale/__init__.py` and `docs/source/conf.py` for the new version number
- git commit the change with title like "[chore] 0.3.1 release"
- make a tag, like `git tag v0.3.1`
Expand Down
42 changes: 0 additions & 42 deletions conda.recipe/meta.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/source/installation_instructions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ from source using the instructions below.

### Requirements

* PyTorch>= 1.7.1
* PyTorch>= 1.8.1

### Installing the pip package (stable)

Expand Down
2 changes: 1 addition & 1 deletion requirements-benchmarks.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Bring in everything that tests depends on.
-r requirements-test.txt
-r requirements-dev.txt

# Benchmark dependencies.
torchtext == 0.6.0
Expand Down
27 changes: 26 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Core deps.
-r requirements.txt

# For pre-commit hooks.
# Tools for static checking.
# - flake8-annotations is needed to avoid F811 error with overload
# function typing with mypy.
# - if you change versions below, please make sure it is in-sync with
# .pre-commit-config.yaml for pre-commit.
black == 21.10b0
flake8 == 4.0.1
flake8-annotations == 2.7.0
isort == 5.10.1
mypy == 0.910
pre-commit >= 2.15.0

# Tools for unit tests & coverage.
pytest == 5.4.1
pytest-cov == 2.10.0
pytest-timeout == 1.4.2
remote-pdb >= 2.1.0
parameterized >= 0.8.1

# Tools for testing docs
docutils == 0.17

# For torch.cuda.list_gpu_processes()
pynvml == 8.0.4

# For mypy typing
numpy >= 1.21
29 changes: 0 additions & 29 deletions requirements-test.txt

This file was deleted.

0 comments on commit 2bfa5a6

Please sign in to comment.