Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
8e57a2e
First commit for forked branch.
ybagdasa Mar 10, 2025
1e02cc5
Deleted the zip file download in inference.py. Updated urls in large_…
ybagdasa Mar 12, 2025
3ac9f28
Implemented unit testing and added sample_data.
ybagdasa Mar 25, 2025
0676427
Applied changes from isort, black, flake in runtests.sh. Ran pytype s…
ybagdasa Mar 25, 2025
f7e9de6
Removed configargparser and added PNG naming instructions in readme.
ybagdasa Mar 25, 2025
0b8f1ef
Merge branch 'dev' into 730-retinalOCT_RPD_segmentation. Upstream
ybagdasa Mar 25, 2025
30dabf9
Moved large_files.yaml into retinalOCT_RPD_Segmentation into bundle r…
ybagdasa Apr 1, 2025
efb5da8
Updated dependencies. Updated depreciated pandas api. Updated install…
ybagdasa Apr 29, 2025
b831e50
Merge from upstream.
ybagdasa Apr 29, 2025
7cd1394
fix isort and update cit for detectron2
yiheng-wang-nv May 16, 2025
d171542
Fixed pre-commit and flake8 errors. Added torchvision to metadata.json.
ybagdasa May 16, 2025
50238f8
Merge branch '730-retinalOCT_RPD_segmentation' of github.com:uw-biome…
ybagdasa May 16, 2025
e271884
fix pre-commit and black checks
yiheng-wang-nv May 19, 2025
db0d0d6
skip part of tests and rrevert changes in UNEST bundles
yiheng-wang-nv May 19, 2025
ea0ef49
Fixed flake8 errors. runtests.sh failing at ptype.
ybagdasa May 19, 2025
992391e
enable different py env for ci tests
yiheng-wang-nv May 29, 2025
52cce77
fix precommit
yiheng-wang-nv May 29, 2025
03525b8
add conda init for cpu test
yiheng-wang-nv May 29, 2025
ee65966
update premerge cpu script
yiheng-wang-nv May 29, 2025
33cc537
add conda init
yiheng-wang-nv May 29, 2025
f767da8
adjust conda init way
yiheng-wang-nv May 29, 2025
a07021c
update init conda env
yiheng-wang-nv May 29, 2025
310742b
Merge branch 'dev' into 730-retinalOCT_RPD_segmentation
yiheng-wang-nv Jun 3, 2025
e74f971
Added docstrings and fixed all flake8 errors.
ybagdasa Jun 6, 2025
d260ea2
Added setuptools==75.8.0 to dependencies to build detectron2 with pyt…
ybagdasa Jun 6, 2025
6160e06
Changed "format" in metadata.json to "magnitude"
ybagdasa Jun 20, 2025
bb88574
Updated required packages in metadata.json.
ybagdasa Jun 20, 2025
d8b3899
Merge branch 'dev' into 730-retinalOCT_RPD_segmentation
yiheng-wang-nv Jun 27, 2025
a707723
Updated README and bundle requirements.
ybagdasa Jul 7, 2025
ca50689
Merge branch '730-retinalOCT_RPD_segmentation' of github.com:uw-biome…
ybagdasa Jul 7, 2025
32a2d10
Merge branch 'dev' into 730-retinalOCT_RPD_segmentation
yiheng-wang-nv Jul 22, 2025
763ccc8
Fixed pre-commit eof line.
ybagdasa Jul 23, 2025
dc0c0b2
Merge branch '730-retinalOCT_RPD_segmentation' of github.com:uw-biome…
ybagdasa Jul 23, 2025
9ba8107
revert py39 changes
yiheng-wang-nv Aug 11, 2025
5faa761
revert py39 changes
yiheng-wang-nv Aug 11, 2025
accbffc
add customized detectron2
yiheng-wang-nv Aug 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 59 additions & 12 deletions .github/workflows/premerge-cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,76 @@ jobs:
premerge-cpu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.10.14
python-version: 3.10.14 # This will be the default Python

- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
# The python-version here is for Conda's base, if activated.
# We set auto-activate-base to false, so actions/setup-python's version remains default.
python-version: 3.10.14
auto-activate-base: false # Crucial: ensures the Python 3.10 from actions/setup-python is the default

- name: cache weekly timestamp
id: pip-cache
id: pip-cache-ts
run: |
echo "::set-output name=datew::$(date '+%Y-%V')"
- name: cache for pip
echo "datew=$(date '+%Y-%V')" >> $GITHUB_OUTPUT

- name: Get pip cache directory
id: pip-cache-dir
# This runs using the default Python (3.10)
shell: bash
run: echo "dir=$(python -m pip cache dir)" >> $GITHUB_OUTPUT

- name: Cache pip dependencies (for Python 3.10 global env)
uses: actions/cache@v4
id: cache-pip
with:
path: ${{ steps.pip-cache-dir.outputs.dir }}
key: ${{ runner.os }}-pip-3.10-${{ steps.pip-cache-ts.outputs.datew }}-${{ hashFiles('**/requirements.txt', '**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-3.10-${{ steps.pip-cache-ts.outputs.datew }}-

# Cache Conda packages (for environments your bash script might create)
# setup-miniconda action sets MINICONDA_PATH_0 environment variable
- name: Cache Conda packages
uses: actions/cache@v4
id: cache
id: cache-conda
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }}
- name: Install dependencies
path: ${{ env.MINICONDA_PATH_0 }}/pkgs
key: ${{ runner.os }}-conda-pkgs-${{ steps.pip-cache-ts.outputs.datew }}-${{ hashFiles('**/environment*.yml', '**/requirements*.txt') }} # Adjust hashFiles as needed
restore-keys: |
${{ runner.os }}-conda-pkgs-${{ steps.pip-cache-ts.outputs.datew }}-

- name: Install global Python dependencies (using Python 3.10)
shell: bash
run: |
python -m pip install --upgrade pip wheel
python -m pip install --upgrade setuptools
- name: check

- name: Check environment
shell: bash
run: |
echo "Default Python version:"
python --version
echo "Conda executable path:"
command -v conda
conda info
# This ensures conda command is available, but the default python is still 3.10

- name: Run check script
# The shell: bash -el {0} can be helpful if conda init modified shell profiles
# and your script needs to `conda activate` sub-environments.
shell: bash -el {0}
run: |
# clean up temporary files
$(pwd)/runtests.sh --clean
df -h
bash $(pwd)/ci/run_premerge_cpu.sh changed
shell: bash
bash $(pwd)/ci/run_premerge_cpu.sh
12 changes: 10 additions & 2 deletions ci/bundle_custom_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,16 @@
"maisi_ct_generative",
"cxr_image_synthesis_latent_diffusion_model",
"brain_image_synthesis_latent_diffusion_model",
"retinalOCT_RPD_segmentation",
]

# This list is used for our CI tests to determine whether a bundle contains the preferred files.
# If a bundle does not have any of the preferred files, please add the bundle name into the list.
exclude_verify_preferred_files_list = ["pediatric_abdominal_ct_segmentation", "maisi_ct_generative"]
exclude_verify_preferred_files_list = [
"pediatric_abdominal_ct_segmentation",
"maisi_ct_generative",
"retinalOCT_RPD_segmentation",
]

# This list is used for our CI tests to determine whether a bundle needs to be tested with
# the `verify_export_torchscript` function in `verify_bundle.py`.
Expand All @@ -47,6 +52,7 @@
"mednist_ddpm",
"cxr_image_synthesis_latent_diffusion_model",
"brain_image_synthesis_latent_diffusion_model",
"retinalOCT_RPD_segmentation",
]

# This list is used for our CI tests to determine whether a bundle needs to be tested after downloading
Expand All @@ -58,7 +64,9 @@
# This dict is used for our CI tests to install required dependencies that cannot be installed by `pip install` directly.
# If a bundle has this kind of dependencies, please add the bundle name (key), and the path of the install script (value)
# into the dict.
install_dependency_dict = {}
install_dependency_dict = {
"retinalOCT_RPD_segmentation": "ci/install_scripts/install_retinalOCT_RPD_segmentation_dependency.sh"
}

# This list is used for our CI tests to determine whether a bundle supports TensorRT export. Related
# test will be employed for bundles in the dict.
Expand Down
4 changes: 4 additions & 0 deletions ci/get_bundle_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

ALLOW_MONAI_RC = os.environ.get("ALLOW_MONAI_RC", "false").lower() in ("true", "1", "t", "y", "yes")

special_dependencies_list = ["detectron2"]


def increment_version(version):
"""
Expand Down Expand Up @@ -79,6 +81,8 @@ def get_requirements(bundle, models_path, requirements_file):
if package_key in metadata.keys():
optional_dict = metadata[package_key]
for name, version in optional_dict.items():
if name in special_dependencies_list:
continue
libs.append(f"{name}=={version}")

if len(libs) > 0:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# ensure that using evironment with python==3.9
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git@65184fc057d4fab080a98564f6b60fae0b94edc4'
Loading
Loading