Skip to content

Commit

Permalink
Feature/sg 1059 fix ci (#1350)
Browse files Browse the repository at this point in the history
* get_requirements to handle --extra-index-url correctly

* Uninstall existing SG and install the one from checkout

* get_requirements to handle --extra-index-url correctly

---------

Co-authored-by: Louis-Dupont <35190946+Louis-Dupont@users.noreply.github.com>
  • Loading branch information
BloodAxe and Louis-Dupont committed Aug 7, 2023
1 parent 9b0964f commit ef886cd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
14 changes: 11 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -189,14 +189,22 @@ 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
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
Expand Down
4 changes: 3 additions & 1 deletion src/super_gradients/sanity_check/env_sanity_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit ef886cd

Please sign in to comment.