Skip to content

Commit

Permalink
updated the download component for mmlab
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekMS2024 committed Dec 24, 2024
1 parent 031a310 commit fa226b4
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ jobs:
inputs:
model_family: 'MmDetectionImage'
model_name: ${{parent.inputs.model_id}}
download_from_source: False
download_from_source: true
outputs:
output_dir:
type: uri_file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,11 @@ def save_as_mlflow(self):
mlflow_model_wrapper = ImagesDetectionMLflowModelWrapper(task_type=self._task)
artifacts_dict = self._prepare_artifacts_dict()
if self._task == MMLabDetectionTasks.MM_OBJECT_DETECTION.value:
pip_requirements = os.path.join(self.MODEL_DIR, "mmdet-od-requirements.txt")
conda_env_file = os.path.join(self.MODEL_DIR, "conda_od.yaml")
elif self._task == MMLabDetectionTasks.MM_INSTANCE_SEGMENTATION.value:
pip_requirements = os.path.join(self.MODEL_DIR, "mmdet-is-requirements.txt")
conda_env_file = os.path.join(self.MODEL_DIR, "conda_is.yaml")
else:
pip_requirements = None
conda_env_file = None
code_path = [
os.path.join(self.MODEL_DIR, "detection_predict.py"),
os.path.join(self.MODEL_DIR, "config.py"),
Expand All @@ -204,8 +204,8 @@ def save_as_mlflow(self):
super()._save(
mlflow_model_wrapper=mlflow_model_wrapper,
artifacts_dict=artifacts_dict,
pip_requirements=pip_requirements,
code_path=code_path,
conda_env=conda_env_file,
)

def _prepare_artifacts_dict(self) -> Dict:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
channels:
- conda-forge
dependencies:
- python=3.9.19
- pip<=24.0
- pip:
- mlflow==2.12.1
- cloudpickle==2.2.1
- datasets==2.15.0
- openmim==0.3.9
- torch==2.0.1
- torchvision==0.15.2
- transformers==4.38.2
- accelerate==0.27.2
- albumentations==1.3.0
- scikit-image==0.19.3
- simplification==0.7.10
- fairscale==0.4.13
name: mlflow-env
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
channels:
- conda-forge
dependencies:
- python=3.9.19
- pip<=24.0
- pip:
- mlflow==2.12.1
- cloudpickle==2.2.1
- datasets==2.15.0
- openmim==0.3.9
- torch==2.0.1
- torchvision==0.15.2
- transformers==4.38.2
- accelerate==0.27.2
- albumentations==1.3.0
- fairscale==0.4.13
name: mlflow-env

0 comments on commit fa226b4

Please sign in to comment.