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

Feature/sg 1147 notebooks in repo #1493

Merged
merged 10 commits into from
Oct 4, 2023
62 changes: 62 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ parameters:
type: boolean
description: If true will run sanity_test flow
default: false
run_and_convert_notebooks_to_docs:
type: boolean
description: If true will run run_and_convert_notebooks_to_docs flow
default: false
skip_md_files:
type: boolean
default: true
Expand Down Expand Up @@ -561,6 +565,49 @@ jobs:
event: fail
template: basic_fail_1 # see https://github.com/CircleCI-Public/slack-orb/wiki#templates.

run_and_convert_notebooks_to_docs:
docker:
- image: 307629990626.dkr.ecr.us-east-1.amazonaws.com/deci/infra/circleci/runner/sg-gpu:<< pipeline.parameters.sg_docker_version >>
BloodAxe marked this conversation as resolved.
Show resolved Hide resolved
resource_class: deci-ai/sg-gpu-on-premise
parameters:
sg_existing_env_path:
type: string
default: "/env/persistent_env"
sg_new_env_name:
type: string
default: "${CIRCLE_BUILD_NUM}"
sg_new_env_python_version:
type: string
default: "python3.8"
steps:
- checkout
- run:
name: install requirements and execute notebooks
command: |
<< parameters.sg_new_env_python_version >> -m venv << parameters.sg_new_env_name >>
source << parameters.sg_new_env_name >>/bin/activate
python3.8 -m pip install --upgrade setuptools pip wheel
python3.8 -m pip install -r requirements.txt
python3.8 -m pip install -r requirements.dev.txt
python3.8 -m pip install .
python3.8 -m pip install torch torchvision torchaudio
python3.8 -m pip install pytorch-quantization==2.1.2 --extra-index-url https://pypi.ngc.nvidia.com
shaydeci marked this conversation as resolved.
Show resolved Hide resolved
python3.8 -m pip install onnx_graphsurgeon==0.3.27 --extra-index-url https://pypi.ngc.nvidia.com
python3.8 -m ipykernel install --name << parameters.sg_new_env_name >> --user
make run_and_convert_notebooks_to_docs

- run:
name: Remove new environment when failed
command: "rm -r << parameters.sg_new_env_name >>"
when: on_fail

- slack/notify:
channel: "sg-integration-tests"
event: fail
template: basic_fail_1 # see https://github.com/CircleCI-Public/slack-orb/wiki#templates.



recipe_sanity_tests_classification_pt1:
docker:
- image: 307629990626.dkr.ecr.us-east-1.amazonaws.com/deci/infra/circleci/runner/sg-gpu:<< pipeline.parameters.sg_docker_version >>
Expand Down Expand Up @@ -846,6 +893,16 @@ workflows:
- recipe_accuracy_tests:
context:
- slack
- run_and_convert_notebooks_to_docs:
context:
- slack

run_and_convert_notebooks_to_docs:
when: << pipeline.parameters.run_and_convert_notebooks_to_docs >>
jobs:
- run_and_convert_notebooks_to_docs:
context:
- slack

release:
unless:
Expand Down Expand Up @@ -896,6 +953,10 @@ workflows:
context:
- slack
<<: *release_tag_filter
- run_and_convert_notebooks_to_docs:
context:
- slack
<<: *release_tag_filter
- release_version:
py_version: "3.8"
requires:
Expand All @@ -907,6 +968,7 @@ workflows:
- recipe_sanity_tests_segmentation
- recipe_sanity_tests_detection
- recipe_sanity_tests_pose_estimation
- run_and_convert_notebooks_to_docs
<<: *release_tag_filter
- deci-common/pip_upload_package_from_codeartifact_to_global_pypi:
package_name: "super-gradients"
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ sweeper_test:
exit 1; \
fi


examples_to_docs:
# This Makefile target runs notebooks listed below and converts them to markdown files in documentation/source/
run_and_convert_notebooks_to_docs:
jupyter nbconvert --to markdown --output-dir="documentation/source/" --execute src/super_gradients/examples/model_export/models_export.ipynb
BloodAxe marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 2 additions & 0 deletions requirements.dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ flake8==5.0.4
black==22.10.0
pre-commit==2.20.0
gitpython>=3.1.0
ipykernel
nbconvert==7.8.0