Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NNI's CI #32

Draft
wants to merge 35 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
86fb9b9
Add NNI's CI
ultmaster Jan 27, 2022
2f28790
Try to build wheel
ultmaster Jan 27, 2022
8f63a3e
try again
ultmaster Jan 27, 2022
1beb67b
rename
Borda Jan 27, 2022
1f56ebd
@ultmaster this is the hack, you do any change you want plus add two …
Borda Jan 27, 2022
e109f37
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 27, 2022
c5df869
Fix command
ultmaster Jan 27, 2022
2c6fb6e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 27, 2022
eced16e
try extra dep
ultmaster Jan 27, 2022
73cc402
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 27, 2022
427d0ba
try dev build
ultmaster Jan 27, 2022
57f08e9
Merge branch 'nni' of https://github.com/ultmaster/ecosystem-ci into nni
ultmaster Jan 27, 2022
3050531
trigger
ultmaster Jan 27, 2022
0760269
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 27, 2022
c41122a
Fix dependencies
ultmaster Jan 27, 2022
eb04a31
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 27, 2022
28d945b
Try with release version first
ultmaster Jan 27, 2022
beaac77
Merge branch 'nni' of https://github.com/ultmaster/ecosystem-ci into nni
ultmaster Jan 27, 2022
1f06ffd
trigger
ultmaster Jan 27, 2022
41dadd9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 27, 2022
8c01427
Merge branch 'main' into nni
Borda Feb 3, 2022
9ade165
docker
Borda Feb 3, 2022
ace4832
restruct
Borda Feb 3, 2022
76270dd
if
Borda Feb 3, 2022
7ec9a7b
cmd
Borda Feb 3, 2022
f3649dc
numpy
Borda Feb 3, 2022
137a56e
Merge branch 'main' into nni
Borda Feb 4, 2022
0f6f502
load conf
Borda Feb 4, 2022
9cf67dd
requirements_file
Borda Feb 4, 2022
8e39d1d
install
Borda Feb 4, 2022
980148e
remove_dir
Borda Feb 4, 2022
2c84f66
...
Borda Feb 4, 2022
13bf915
Merge branch 'main' into nni
Borda Aug 20, 2022
b925c86
Merge branch 'main' into nni
Borda Oct 25, 2022
5539cd8
Merge branch 'main' into nni
Borda Jan 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .azure/ci-testig-parameterized.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ jobs:
- "PyTorchLightning/flash_pl-develop.yaml"
- "PyTorchLightning/flash_pl-release.yaml"
- "microsoft/deepspeed-release.yaml"
- "microsoft/nni-release.yaml"
2 changes: 1 addition & 1 deletion .github/workflows/dockers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

- uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
if: ${{ github.repository_owner == 'PyTorchLightning' }}
if: ${{ github.repository_owner == 'PyTorchLightning' && github.event_name == 'push' }}
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
Expand Down
2 changes: 1 addition & 1 deletion actions/_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ target_repository:
# OPTIONAL, define installing package extras
install_extras: all
# OPTIONAL, install additional requirements
# install_file: requirements.txt
# install_files: requirements.txt
# copy some test from the target repository
copy_tests:
- integrations
Expand Down
24 changes: 16 additions & 8 deletions actions/assistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,20 @@ def _install_repo(repo: Dict[str, str], remove_dir: bool = True) -> List[str]:
if "checkout" in repo:
assert isinstance(repo["checkout"], str)
cmds.append(f"git checkout {repo['checkout']}")
pip_install = "."
if "install_extras" in repo:
pip_install += f"[{AssistantCLI._extras(repo['install_extras'])}]"
cmds.append(f"pip install --quiet {pip_install}")
if "install_file" in repo:
assert isinstance(repo["install_file"], str)
cmds.append(f"pip install --quiet --upgrade -r {repo['install_file']}")

cmds += AssistantCLI.before_commands(repo, stage="install", as_append=True)
Borda marked this conversation as resolved.
Show resolved Hide resolved

if "install_files" in repo:
files = repo["install_files"]
files = [files] if isinstance(files, str) else files
cmds.append(f"pip install --quiet --upgrade {' '.join([f'-r {fn}' for fn in files])}")
if "install_command" in repo:
cmds.append(repo["install_command"])
Borda marked this conversation as resolved.
Show resolved Hide resolved
else:
pip_install = "."
if "install_extras" in repo:
pip_install += f"[{AssistantCLI._extras(repo['install_extras'])}]"
cmds.append(f"pip install --quiet {pip_install}")
cmds.append("cd ..")
if remove_dir:
cmds.append(f"rm -rf {repo_name}")
Expand Down Expand Up @@ -242,7 +249,8 @@ def prepare_env(config_file: str = "config.yaml", path_root: str = _PATH_ROOT) -
is_file = os.path.splitext(test)[-1] != ""
copy_flag = "-r" if not is_file else ""
script.append(f'cp {copy_flag} "{repo_test}" "{os.path.join(AssistantCLI._FOLDER_TESTS, test)}"')
script.append(f'rm -rf "{repo_name}"')
if repo.get("remove_dir", True):
script.append(f'rm -rf "{repo_name}"')

reqs = config.get("dependencies", [])
for req in reqs:
Expand Down
2 changes: 1 addition & 1 deletion configs/SeanNaren/deepspeech-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ target_repository:
- data/an4.py
- tests/smoke_test.py
- labels.json
install_file: requirements.txt
install_files: requirements.txt

contact:
slack:
Expand Down
37 changes: 37 additions & 0 deletions configs/microsoft/nni-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
target_repository:
HTTPS: https://github.com/microsoft/nni.git
# checkout a particular branch or a tag
checkout: master
before_install:
- if [ -x "$(command -v nvidia-smi)" ]; then mv dependencies/recommended_gpu.txt dependencies/recommended.txt; fi
# NNI needs custom install. `python setup.py install` or `pip install .` won't work.
install_files:
- dependencies/develop.txt
- dependencies/required.txt
- dependencies/required_extra.txt
- dependencies/recommended.txt
install_command: python setup.py develop
# development build. Cannot remove dir
remove_dir: false
# copy some tests from the target repository
copy_tests:
# only retiarii uses pytorch-lightning for now
# might add more in future
- test/ut/retiarii
- test/ut/__init__.py

before_install:
- pip install numpy

dependencies:
- name: pytorch-lightning
HTTPS: https://github.com/PyTorchLightning/pytorch-lightning.git
checkout: release/1.5.x
install_extras: loggers

testing:
dirs:
- test/ut

runtimes:
- {os: "ubuntu-latest", python-version: "3.8"}
2 changes: 1 addition & 1 deletion configs/vturrisi/solo-learn_pl-develop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ target_repository:
# OPTIONAL, define installing package extras
install_extras: umap
# OPTIONAL, install additional requirements
# install_file: requirements.txt
# install_files: requirements.txt
# copy some test from the target repository
copy_tests:
- tests
Expand Down
2 changes: 1 addition & 1 deletion configs/vturrisi/solo-learn_pl-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ target_repository:
# OPTIONAL, define installing package extras
install_extras: umap
# OPTIONAL, install additional requirements
# install_file: requirements.txt
# install_files: requirements.txt
# copy some test from the target repository
copy_tests:
- tests
Expand Down