diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e975086..01e3a78b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,7 +68,7 @@ jobs: pip install wheel setuptools pip -Uqq pip install -r ./scripts/requirements.txt -f https://download.pytorch.org/whl/cpu/torch_stable.html -q pip uninstall -y tqdm - npm i -g pnpm + npm install pnpm@7 -g pnpm i --frozen-lockfile --color - name: Download datasets @@ -104,7 +104,7 @@ jobs: pnpm-and-pip-cache- - run: pip install -Uq pip wheel && bash scripts/run_code_style.sh install - - run: npm i -g pnpm + - run: npm install pnpm@7 -g - run: pnpm i --frozen-lockfile --color - run: pnpm lint - run: python scripts/check_copies.py diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a3ce5ea8..ac138fe0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -78,11 +78,11 @@ To add a new template, 5. Once everything looks good, put the template name with respective filenames (in array format) in the `templates.json` in `src/templates` directory. This is required to tell Code-Generator to fetch the files from this template. -6. In the `README.md`, copy the training launch code from `src/template-common/README.md`. +6. In the `README.md`, copy the training launch code from `src/templates/template-common/README.md`. -7. For the `requirements.txt`, copy from the `src/template-common/requirements.txt`. +7. For the `requirements.txt`, copy from the `src/templates/template-common/requirements.txt`. -8. For the `utils.py`, copy the starter code from the `src/template-common/utils.py`. +8. For the `utils.py`, copy the starter code from the `src/templates/template-common/utils.py`. 9. You can check if the copied codes needed are up-to-date with the base codes with: `python scripts/check_copies.py` diff --git a/src/templates/template-vision-segmentation/data.py b/src/templates/template-vision-segmentation/data.py index 59729c67..9eada3e8 100644 --- a/src/templates/template-vision-segmentation/data.py +++ b/src/templates/template-vision-segmentation/data.py @@ -85,9 +85,9 @@ def setup_data(config: Namespace): download=False, ) except RuntimeError as e: - raise e( + raise RuntimeError( "Dataset not found. You can use `download_datasets` from data.py function to download it." - ) + ) from e dataset_eval = VOCSegmentationPIL( root=config.data_path, year="2012", image_set="val", download=False diff --git a/src/templates/template-vision-segmentation/requirements.txt b/src/templates/template-vision-segmentation/requirements.txt index 4370eb9b..40373974 100644 --- a/src/templates/template-vision-segmentation/requirements.txt +++ b/src/templates/template-vision-segmentation/requirements.txt @@ -2,7 +2,7 @@ torch>=1.10.2 torchvision>=0.11.3 pytorch-ignite>=0.4.8 pyyaml -albumentations +albumentations>=1.3.0 image_dataset_viz #::: if (['neptune', 'polyaxon'].includes(it.logger)) { :::#