From 118849c63cb57944452e2254984582622cf8c24c Mon Sep 17 00:00:00 2001 From: Eugene Khvedchenya Date: Mon, 7 Aug 2023 10:40:23 +0300 Subject: [PATCH 1/3] get_requirements to handle --extra-index-url correctly --- src/super_gradients/sanity_check/env_sanity_check.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/super_gradients/sanity_check/env_sanity_check.py b/src/super_gradients/sanity_check/env_sanity_check.py index 2e767ea488..e66ea30951 100644 --- a/src/super_gradients/sanity_check/env_sanity_check.py +++ b/src/super_gradients/sanity_check/env_sanity_check.py @@ -68,7 +68,9 @@ def get_requirements(use_pro_requirements: bool) -> Optional[List[str]]: with open(pro_requirements_path, "r") as f: pro_requirements = f.read().splitlines() - return requirements + pro_requirements if use_pro_requirements else requirements + lines = requirements + pro_requirements if use_pro_requirements else requirements + lines = [line for line in lines if not line.startswith("--extra-index-url")] # Remove index-url lines + return lines def check_packages(): From fdeeb4d2f6b1ca4da1d123fdcd20664bdd986450 Mon Sep 17 00:00:00 2001 From: Eugene Khvedchenya Date: Mon, 7 Aug 2023 10:15:58 +0300 Subject: [PATCH 2/3] Uninstall existing SG and install the one from checkout --- .circleci/config.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 00583749bb..ffd674a044 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -189,14 +189,23 @@ jobs: - run: name: setup custom environment variables command: | - echo 'export PYTHONPATH=/home/circleci/super_gradients' >> $BASH_ENV + # echo 'export PYTHONPATH=/home/circleci/super_gradients' >> $BASH_ENV echo 'export UPLOAD_LOGS=FALSE' >> $BASH_ENV - run: name: install package no_output_timeout: 30m command: | . venv/bin/activate - python3 -m pip install --extra-index-url https://pypi.ngc.nvidia.com .[pro] + python3 -m pip uninstall -y super_gradients + python3 -m pip install -e .[pro] --extra-index-url https://pypi.ngc.nvidia.com + + - run: + name: install pytorch quantization package + no_output_timeout: 30m + command: | + . venv/bin/activate + python3 -m pip install pytorch-quantization==2.1.2 --extra-index-url https://pypi.ngc.nvidia.com + - run: name: run tests with coverage no_output_timeout: 30m From 60a613eb6614f024dd17c382d0f07ea36dde3f89 Mon Sep 17 00:00:00 2001 From: Eugene Khvedchenya Date: Mon, 7 Aug 2023 12:02:54 +0300 Subject: [PATCH 3/3] get_requirements to handle --extra-index-url correctly --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ffd674a044..563642e96b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -180,7 +180,7 @@ jobs: python3 -m venv venv . venv/bin/activate python3 -m pip install pip==23.1.2 - cat requirements.txt | cut -f1 -d"#" | xargs -n 1 -L 1 pip install --progress-bar off + python3 -m pip install -r requirements.txt - run: name: edit package version command: | @@ -189,7 +189,6 @@ jobs: - run: name: setup custom environment variables command: | - # echo 'export PYTHONPATH=/home/circleci/super_gradients' >> $BASH_ENV echo 'export UPLOAD_LOGS=FALSE' >> $BASH_ENV - run: name: install package