-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
245 additions
and
918 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Fire | ||
tqdm | ||
PyYAML | ||
PyYAML <5.4 # todo: racing issue with cython compile | ||
wcmatch | ||
requests | ||
pip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,8 @@ jobs: | |
- job: sync_pub | ||
pool: | ||
vmImage: "Ubuntu-20.04" | ||
workspace: | ||
clean: all | ||
variables: | ||
ACCELERATOR: CPU,GPU | ||
PUB_BRANCH: publication | ||
|
@@ -24,6 +26,7 @@ jobs: | |
printf "commit hash:\n $(COMMIT_HASH)\n" | ||
printf "commit message:\n $(COMMIT_MSG)\n" | ||
displayName: "Set Git user" | ||
timeoutInMinutes: "5" | ||
- bash: | | ||
set -e | ||
git fetch --all | ||
|
@@ -36,7 +39,7 @@ jobs: | |
displayName: "Install dependencies" | ||
- bash: | | ||
current_branch=$(cut -d '/' -f3- <<< $(Build.SourceBranch)) | ||
printf "$current_branch\n" | ||
printf "Current branch: $current_branch\n" | ||
bash .actions/git-diff-sync.sh $current_branch $(PUB_BRANCH) | ||
displayName: "Compare changes & sync" | ||
|
@@ -58,15 +61,19 @@ jobs: | |
git status | ||
git commit -m "prune: $(COMMIT_HASH)" | ||
condition: gt(variables['dropped.folders'], 0) | ||
displayName: "Prune notebook" | ||
displayName: "Prune notebooks" | ||
timeoutInMinutes: "10" | ||
- bash: | | ||
set -ex | ||
git status | ||
git push https://$(PAT_GHOST)@github.com/Lightning-AI/tutorials.git $(PUB_BRANCH) | ||
displayName: "Finish push" | ||
displayName: "Finish and push" | ||
- job: papermill | ||
dependsOn: sync_pub | ||
# run if the initial job succeeded and the strategy matrix is not empty | ||
condition: and(succeeded(), ne(dependencies.sync_pub.outputs['mtrx.dirs'], '')) | ||
strategy: | ||
# generated matrix with changed notebooks, include fields: "notebook", "agent-pool" and "docker-image" | ||
matrix: $[ dependencies.sync_pub.outputs['mtrx.dirs'] ] | ||
|
@@ -85,6 +92,8 @@ jobs: | |
container: | ||
image: $(docker-image) | ||
options: "--gpus=all --shm-size=32g -v /usr/bin/docker:/tmp/docker:ro" | ||
workspace: | ||
clean: all | ||
|
||
variables: | ||
ACCELERATOR: CPU,GPU | ||
|
@@ -94,8 +103,6 @@ jobs: | |
COMMIT_HASH: "$(Build.SourceVersion)" | ||
DEVICES: $( python -c 'print("$(Agent.Name)".split("_")[-1])' ) | ||
|
||
condition: ne(dependencies.sync_pub.outputs['mtrx.dirs'], '') | ||
|
||
steps: | ||
- bash: | | ||
echo "##vso[task.setvariable variable=CUDA_VISIBLE_DEVICES]$(DEVICES)" | ||
|
@@ -115,9 +122,11 @@ jobs: | |
- bash: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Azure Pipelines" | ||
git config --global pull.ff only | ||
printf "commit hash:\n $(COMMIT_HASH)\n" | ||
printf "commit message:\n $(COMMIT_MSG)\n" | ||
displayName: "Set Git user" | ||
timeoutInMinutes: "5" | ||
- bash: | | ||
set -e | ||
git fetch --all | ||
|
@@ -128,6 +137,7 @@ jobs: | |
git show-ref $(PUB_BRANCH) | ||
git pull | ||
displayName: "Git check & switch branch" | ||
timeoutInMinutes: "5" | ||
- bash: | | ||
set -e | ||
|
@@ -136,6 +146,7 @@ jobs: | |
# todo: adjust torch ecosystem versions | ||
pip install -r requirements.txt -r _requirements/data.txt | ||
displayName: "Install dependencies" | ||
timeoutInMinutes: "15" | ||
- bash: | | ||
set -e | ||
|
@@ -146,6 +157,7 @@ jobs: | |
- bash: python .actions/assistant.py convert-ipynb $(notebook) | ||
displayName: "Generate notebook" | ||
timeoutInMinutes: "5" | ||
|
||
- bash: | | ||
set -e | ||
|
@@ -161,7 +173,8 @@ jobs: | |
displayName: "Render notebook" | ||
- bash: | | ||
set -ex | ||
git status | ||
git show-ref $(PUB_BRANCH) | ||
git push https://$(PAT_GHOST)@github.com/Lightning-AI/tutorials.git $(PUB_BRANCH) | ||
displayName: "Finish push" | ||
displayName: "Finish and push" |
Oops, something went wrong.