Skip to content

Commit

Permalink
Merge branch 'main' into add-readme-check
Browse files Browse the repository at this point in the history
  • Loading branch information
diondrapeck authored Nov 8, 2023
2 parents 6e288be + 8240eea commit 5b352ee
Show file tree
Hide file tree
Showing 21 changed files with 166 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:

# Model import args
task_name: image-classification
download_from_source: False # True for downloading a model directly from HuggingFace
model_family: HuggingFaceImage
# # Specify the model_name instead of mlflow_model if you want to use a model from the huggingface hub
mlflow_model: ${{parent.inputs.mlflow_model_path}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ For using this component, run the shell script file `bash ./hftransformers-fridg
Currently following models are supported:
| Model Name | Source |
| ------ | ---------- |
| [microsoft-beit-base-patch16-224-pt22k-ft22k](https://ml.azure.com/registries/azureml/models/microsoft-beit-base-patch16-224-pt22k-ft22k/version/5) | azureml registry |
| [microsoft-swinv2-base-patch4-window12-192-22k](https://ml.azure.com/registries/azureml/models/microsoft-swinv2-base-patch4-window12-192-22k/version/5) | azureml registry |
| [facebook-deit-base-patch16-224](https://ml.azure.com/registries/azureml/models/facebook-deit-base-patch16-224/version/5) | azureml registry |
| [google-vit-base-patch16-224](https://ml.azure.com/registries/azureml/models/google-vit-base-patch16-224/version/5) | azureml registry |
| [microsoft-beit-base-patch16-224-pt22k-ft22k](https://ml.azure.com/registries/azureml/models/microsoft-beit-base-patch16-224-pt22k-ft22k/version/11) | azureml registry |
| [microsoft-swinv2-base-patch4-window12-192-22k](https://ml.azure.com/registries/azureml/models/microsoft-swinv2-base-patch4-window12-192-22k/version/11) | azureml registry |
| [facebook-deit-base-patch16-224](https://ml.azure.com/registries/azureml/models/facebook-deit-base-patch16-224/version/10) | azureml registry |
| [google-vit-base-patch16-224](https://ml.azure.com/registries/azureml/models/google-vit-base-patch16-224/version/10) | azureml registry |
| [Image classification models from Huggingface's Transformer library](https://huggingface.co/models?pipeline_tag=image-classification&library=transformers)| HuggingFace |
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:

# model
task_name: image-classification-multilabel
download_from_source: False # True for downloading a model directly from HuggingFace
model_family: HuggingFaceImage
# # Specify the model_name instead of mlflow_model if you want to use a model from the huggingface hub
mlflow_model: ${{parent.inputs.mlflow_model_path}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ For using this component, run the shell script file `bash ./hftransformers-fridg
Currently following models are supported:
| Model Name | Source |
| ------ | ---------- |
| [microsoft-beit-base-patch16-224-pt22k-ft22k](https://ml.azure.com/registries/azureml/models/microsoft-beit-base-patch16-224-pt22k-ft22k/version/5) | azureml registry |
| [microsoft-swinv2-base-patch4-window12-192-22k](https://ml.azure.com/registries/azureml/models/microsoft-swinv2-base-patch4-window12-192-22k/version/5) | azureml registry |
| [facebook-deit-base-patch16-224](https://ml.azure.com/registries/azureml/models/facebook-deit-base-patch16-224/version/5) | azureml registry |
| [google-vit-base-patch16-224](https://ml.azure.com/registries/azureml/models/google-vit-base-patch16-224/version/5) | azureml registry |
| [microsoft-beit-base-patch16-224-pt22k-ft22k](https://ml.azure.com/registries/azureml/models/microsoft-beit-base-patch16-224-pt22k-ft22k/version/11) | azureml registry |
| [microsoft-swinv2-base-patch4-window12-192-22k](https://ml.azure.com/registries/azureml/models/microsoft-swinv2-base-patch4-window12-192-22k/version/11) | azureml registry |
| [facebook-deit-base-patch16-224](https://ml.azure.com/registries/azureml/models/facebook-deit-base-patch16-224/version/10) | azureml registry |
| [google-vit-base-patch16-224](https://ml.azure.com/registries/azureml/models/google-vit-base-patch16-224/version/10) | azureml registry |
| [Image classification models from Huggingface's Transformer library](https://huggingface.co/models?pipeline_tag=image-classification&library=transformers)| HuggingFace |
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:

# Model import args
task_name: image-instance-segmentation
download_from_source: False # True for downloading a model directly from MMDetection
# model_name: ${{parent.inputs.model_name}}
# pytorch_model: ${{parent.inputs.pytorch_model}}
mlflow_model: ${{parent.inputs.mlflow_model}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ For using this component for instance segmentation, run the shell script file `b
Currently following models are supported:
| Model Name | Source |
| :------------: | :-------: |
| [mask_rcnn_swin-t-p4-w7_fpn_1x_coco](https://ml.azure.com/registries/azureml/models/mask_rcnn_swin-t-p4-w7_fpn_1x_coco/version/3) | azureml registry |
| [mask_rcnn_swin-t-p4-w7_fpn_1x_coco](https://ml.azure.com/registries/azureml/models/mask_rcnn_swin-t-p4-w7_fpn_1x_coco/version/8) | azureml registry |
| [Image instance-segmentation models from MMDetection](https://github.com/open-mmlab/mmdetection/blob/v2.28.2/docs/en/model_zoo.md) | MMDetection |
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:

# # Model import args
task_name: image-object-detection
download_from_source: False # True for downloading a model directly from MMDetection
# model_name: ${{parent.inputs.model_name}}
# pytorch_model: ${{parent.inputs.pytorch_model}}
mlflow_model: ${{parent.inputs.mlflow_model}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ For using this component for object detection, run the shell script file `bash .
Currently following models are supported:
| Model Name | Source |
| :------------: | :-------: |
| [deformable_detr_twostage_refine_r50_16x2_50e_coco](https://ml.azure.com/registries/azureml/models/deformable_detr_twostage_refine_r50_16x2_50e_coco/version/3) | azureml registry |
| [sparse_rcnn_r50_fpn_300_proposals_crop_mstrain_480-800_3x_coco](https://ml.azure.com/registries/azureml/models/sparse_rcnn_r50_fpn_300_proposals_crop_mstrain_480-800_3x_coco/version/3) | azureml registry |
| [sparse_rcnn_r101_fpn_300_proposals_crop_mstrain_480-800_3x_coco](https://ml.azure.com/registries/azureml/models/sparse_rcnn_r101_fpn_300_proposals_crop_mstrain_480-800_3x_coco/version/3) | azureml registry |
| [vfnet_r50_fpn_mdconv_c3-c5_mstrain_2x_coco](https://ml.azure.com/registries/azureml/models/vfnet_r50_fpn_mdconv_c3-c5_mstrain_2x_coco/version/3) | azureml registry |
| [vfnet_x101_64x4d_fpn_mdconv_c3-c5_mstrain_2x_coco](https://ml.azure.com/registries/azureml/models/vfnet_x101_64x4d_fpn_mdconv_c3-c5_mstrain_2x_coco/version/3) | azureml registry |
| [yolof_r50_c5_8x8_1x_coco](https://ml.azure.com/registries/azureml/models/yolof_r50_c5_8x8_1x_coco/version/3) | azureml registry |
| [deformable_detr_twostage_refine_r50_16x2_50e_coco](https://ml.azure.com/registries/azureml/models/deformable_detr_twostage_refine_r50_16x2_50e_coco/version/8) | azureml registry |
| [sparse_rcnn_r50_fpn_300_proposals_crop_mstrain_480-800_3x_coco](https://ml.azure.com/registries/azureml/models/sparse_rcnn_r50_fpn_300_proposals_crop_mstrain_480-800_3x_coco/version/8) | azureml registry |
| [sparse_rcnn_r101_fpn_300_proposals_crop_mstrain_480-800_3x_coco](https://ml.azure.com/registries/azureml/models/sparse_rcnn_r101_fpn_300_proposals_crop_mstrain_480-800_3x_coco/version/8) | azureml registry |
| [vfnet_r50_fpn_mdconv_c3-c5_mstrain_2x_coco](https://ml.azure.com/registries/azureml/models/vfnet_r50_fpn_mdconv_c3-c5_mstrain_2x_coco/version/8) | azureml registry |
| [vfnet_x101_64x4d_fpn_mdconv_c3-c5_mstrain_2x_coco](https://ml.azure.com/registries/azureml/models/vfnet_x101_64x4d_fpn_mdconv_c3-c5_mstrain_2x_coco/version/8) | azureml registry |
| [yolof_r50_c5_8x8_1x_coco](https://ml.azure.com/registries/azureml/models/yolof_r50_c5_8x8_1x_coco/version/8) | azureml registry |
| [Image object detection models from MMDetection](https://github.com/open-mmlab/mmdetection/blob/v2.28.2/docs/en/model_zoo.md) | MMDetection |
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ The component copies the input model folder to the component output directory wh
Please select models from AzureML Model Assets for all supported models. For MMDetection models, which are not supported in AzureML model registry, the model's config name is required, same as it's specified in MMDetection Model Zoo. For e.g. fast_rcnn_r101_fpn_1x_coco for [this config file](https://github.com/open-mmlab/mmdetection/blob/master/configs/fast_rcnn/fast_rcnn_r101_fpn_1x_coco.py). You can see the comprehensive list of model configs [here](https://github.com/open-mmlab/mmdetection/tree/v2.28.2/configs) and the documentation of model zoo [here](https://github.com/open-mmlab/mmdetection/blob/v2.28.2/docs/en/model_zoo.md).
Please note that it is the user responsibility to comply with the model's license terms.

3. __download_from_source__ (boolean, optional)
Set to True for downloading model directly from MMDetection instead of system registry.
Defaults to `False`.

# 4. Run Settings

This setting helps to choose the compute for running the component code. For the purpose of model selector, cpu compute should work. We recommend using D12 compute.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ The component copies the input model folder to the component output directory wh
is subject to third party license terms available on the HuggingFace model details page.
It is the user's responsibility to comply with the model's license terms.

3. __download_from_source__ (boolean, optional)
Set to True for downloading model directly from HuggingFace instead of system registry.
Defaults to `False`.

# 4. Run Settings

This setting helps to choose the compute for running the component code. For the purpose of model selector, cpu compute should work. We recommend using D12 compute.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,15 @@
"outputs": [],
"source": [
"# Using the same compute cluster for model evaluation as finetuning. If you want to use a different cluster, specify it below\n",
"Model_eval_cluster_name = \"sample-finetune-cluster-gpu\"\n",
"model_eval_cluster_name = \"sample-finetune-cluster-gpu\"\n",
"\n",
"try:\n",
" _ = workspace_ml_client.compute.get(Model_eval_cluster_name)\n",
" _ = workspace_ml_client.compute.get(model_eval_cluster_name)\n",
" print(\"Found existing compute target.\")\n",
"except ResourceNotFoundError:\n",
" print(\"Creating a new compute target...\")\n",
" compute_config = AmlCompute(\n",
" name=Model_eval_cluster_name,\n",
" name=model_eval_cluster_name,\n",
" type=\"amlcompute\",\n",
" size=\"Standard_NC6s_v3\",\n",
" idle_time_before_scale_down=120,\n",
Expand All @@ -235,10 +235,10 @@
"\n",
"| Model Name | Source |\n",
"| ------ | ---------- |\n",
"| [microsoft-beit-base-patch16-224-pt22k-ft22k](https://ml.azure.com/registries/azureml/models/microsoft-beit-base-patch16-224-pt22k-ft22k/version/5) | azureml registry |\n",
"| [microsoft-swinv2-base-patch4-window12-192-22k](https://ml.azure.com/registries/azureml/models/microsoft-swinv2-base-patch4-window12-192-22k/version/5) | azureml registry |\n",
"| [facebook-deit-base-patch16-224](https://ml.azure.com/registries/azureml/models/facebook-deit-base-patch16-224/version/5) | azureml registry |\n",
"| [google-vit-base-patch16-224](https://ml.azure.com/registries/azureml/models/google-vit-base-patch16-224/version/5) | azureml registry |\n",
"| [microsoft-beit-base-patch16-224-pt22k-ft22k](https://ml.azure.com/registries/azureml/models/microsoft-beit-base-patch16-224-pt22k-ft22k/version/11) | azureml registry |\n",
"| [microsoft-swinv2-base-patch4-window12-192-22k](https://ml.azure.com/registries/azureml/models/microsoft-swinv2-base-patch4-window12-192-22k/version/11) | azureml registry |\n",
"| [facebook-deit-base-patch16-224](https://ml.azure.com/registries/azureml/models/facebook-deit-base-patch16-224/version/10) | azureml registry |\n",
"| [google-vit-base-patch16-224](https://ml.azure.com/registries/azureml/models/google-vit-base-patch16-224/version/10) | azureml registry |\n",
"| [Image classification models from Huggingface's Transformer library](https://huggingface.co/models?pipeline_tag=image-classification&library=transformers)| HuggingFace |"
]
},
Expand Down Expand Up @@ -543,6 +543,7 @@
"pipeline_component_args = {\n",
" # # Model import args\n",
" \"model_family\": \"HuggingFaceImage\",\n",
" \"download_from_source\": False, # True for downloading a model directly from HuggingFace\n",
" \"mlflow_model\": foundation_model.id, # foundation_model.id is provided, only foundation_model gives UserErrorException: only path input is supported now but get: ...\n",
" # \"model_name\": huggingface_model_name, # specify the model_name instead of mlflow_model if you want to use a model from the huggingface hub\n",
" # # Finetune_args\n",
Expand Down Expand Up @@ -646,7 +647,7 @@
" transformers_pipeline_component: PipelineComponent = pipeline_component_transformers_func(\n",
" compute_model_import=model_import_cluster_name,\n",
" compute_finetune=finetune_cluster_name,\n",
" compute_model_evaluation=Model_eval_cluster_name,\n",
" compute_model_evaluation=model_eval_cluster_name,\n",
" training_data=Input(type=AssetTypes.MLTABLE, path=training_mltable_path),\n",
" validation_data=Input(type=AssetTypes.MLTABLE, path=validation_mltable_path),\n",
" # test data\n",
Expand Down Expand Up @@ -1170,5 +1171,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 4
"nbformat_minor": 2
}
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,15 @@
"outputs": [],
"source": [
"# Using the same compute cluster for model evaluation as finetuning. If you want to use a different cluster, specify it below\n",
"Model_eval_cluster_name = \"sample-finetune-cluster-gpu\"\n",
"model_eval_cluster_name = \"sample-finetune-cluster-gpu\"\n",
"\n",
"try:\n",
" _ = workspace_ml_client.compute.get(Model_eval_cluster_name)\n",
" _ = workspace_ml_client.compute.get(model_eval_cluster_name)\n",
" print(\"Found existing compute target.\")\n",
"except ResourceNotFoundError:\n",
" print(\"Creating a new compute target...\")\n",
" compute_config = AmlCompute(\n",
" name=Model_eval_cluster_name,\n",
" name=model_eval_cluster_name,\n",
" type=\"amlcompute\",\n",
" size=\"Standard_NC6s_v3\",\n",
" idle_time_before_scale_down=120,\n",
Expand All @@ -236,10 +236,10 @@
"\n",
"| Model Name | Source |\n",
"| ------ | ---------- |\n",
"| [microsoft-beit-base-patch16-224-pt22k-ft22k](https://ml.azure.com/registries/azureml/models/microsoft-beit-base-patch16-224-pt22k-ft22k/version/5) | azureml registry |\n",
"| [microsoft-swinv2-base-patch4-window12-192-22k](https://ml.azure.com/registries/azureml/models/microsoft-swinv2-base-patch4-window12-192-22k/version/5) | azureml registry |\n",
"| [facebook-deit-base-patch16-224](https://ml.azure.com/registries/azureml/models/facebook-deit-base-patch16-224/version/5) | azureml registry |\n",
"| [google-vit-base-patch16-224](https://ml.azure.com/registries/azureml/models/google-vit-base-patch16-224/version/5) | azureml registry |\n",
"| [microsoft-beit-base-patch16-224-pt22k-ft22k](https://ml.azure.com/registries/azureml/models/microsoft-beit-base-patch16-224-pt22k-ft22k/version/11) | azureml registry |\n",
"| [microsoft-swinv2-base-patch4-window12-192-22k](https://ml.azure.com/registries/azureml/models/microsoft-swinv2-base-patch4-window12-192-22k/version/11) | azureml registry |\n",
"| [facebook-deit-base-patch16-224](https://ml.azure.com/registries/azureml/models/facebook-deit-base-patch16-224/version/10) | azureml registry |\n",
"| [google-vit-base-patch16-224](https://ml.azure.com/registries/azureml/models/google-vit-base-patch16-224/version/10) | azureml registry |\n",
"| [Image classification models from Huggingface's Transformer library](https://huggingface.co/models?pipeline_tag=image-classification&library=transformers)| HuggingFace |"
]
},
Expand Down Expand Up @@ -543,6 +543,7 @@
"pipeline_component_args = {\n",
" # # Model import args\n",
" \"model_family\": \"HuggingFaceImage\",\n",
" \"download_from_source\": False, # True for downloading a model directly from HuggingFace\n",
" \"mlflow_model\": foundation_model.id, # foundation_model.id is provided, only foundation_model gives UserErrorException: only path input is supported now but get: ...\n",
" # \"model_name\": huggingface_model_name, # specify the model_name instead of mlflow_model if you want to use a model from the huggingface hub\n",
" # # Finetune_args\n",
Expand Down Expand Up @@ -646,7 +647,7 @@
" transformers_pipeline_component: PipelineComponent = pipeline_component_transformers_func(\n",
" compute_model_import=model_import_cluster_name,\n",
" compute_finetune=finetune_cluster_name,\n",
" compute_model_evaluation=Model_eval_cluster_name,\n",
" compute_model_evaluation=model_eval_cluster_name,\n",
" training_data=Input(type=AssetTypes.MLTABLE, path=training_mltable_path),\n",
" validation_data=Input(type=AssetTypes.MLTABLE, path=validation_mltable_path),\n",
" # test data\n",
Expand Down
Loading

0 comments on commit 5b352ee

Please sign in to comment.