diff --git a/.github/workflows/assets-release.yaml b/.github/workflows/assets-release.yaml index 826ae4fb18..42816f049a 100644 --- a/.github/workflows/assets-release.yaml +++ b/.github/workflows/assets-release.yaml @@ -71,14 +71,14 @@ jobs: working-directory: ${{ env.main_dir }} - name: Upload changed assets - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: steps.find-updated-assets.outputs.updated_count > 0 with: name: ${{ env.changed_assets_artifact }} path: ${{ runner.temp }}/${{ env.changed_assets_artifact }} - name: Upload non-testable assets - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: steps.find-updated-assets.outputs.updated_count > 0 with: name: ${{ env.releasable_assets_artifact }} @@ -102,7 +102,7 @@ jobs: exit 1 - name: Upload list of assets - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.asset_list_artifact }} path: ${{ runner.temp }}/${{ env.asset_list_artifact }} @@ -179,7 +179,7 @@ jobs: steps: - name: Download releasable assets id: download-artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.releasable_assets_artifact }} path: ${{ runner.temp }}/${{ env.releasable_assets_artifact }} @@ -198,13 +198,13 @@ jobs: - name: Download releasable assets if: needs.check-release-assets.outputs.has_releasable_assets != '' id: download-artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.releasable_assets_artifact }} path: ${{ runner.temp }}/${{ env.releasable_assets_artifact }} - name: Download list of assets - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.asset_list_artifact }} path: ${{ runner.temp }}/${{ env.asset_list_artifact }} diff --git a/.github/workflows/assets-test.yaml b/.github/workflows/assets-test.yaml index 7df2da7da2..ae9cb0857c 100644 --- a/.github/workflows/assets-test.yaml +++ b/.github/workflows/assets-test.yaml @@ -158,7 +158,7 @@ jobs: run: python -u $scripts_test_dir/test_assets.py -i "${{ matrix.asset_config_path }}" -a $asset_config_filename -p $scripts_test_dir/requirements.txt -r $GITHUB_WORKSPACE/$pytest_reports - name: Upload test results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() with: name: ${{ env.pytest_reports }} @@ -179,7 +179,7 @@ jobs: steps: - name: Download test results id: download-artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.pytest_reports }} path: ${{ env.pytest_reports }} diff --git a/.github/workflows/batch-score-ci.yaml b/.github/workflows/batch-score-ci.yaml index d28101283f..d67f4c1fcd 100644 --- a/.github/workflows/batch-score-ci.yaml +++ b/.github/workflows/batch-score-ci.yaml @@ -71,7 +71,7 @@ jobs: RESOURCE_GROUP: ${{ env.resource_group }} WORKSPACE_NAME: ${{ env.workspace }} - name: Upload test results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() with: name: ${{ env.pytest_report_folder }} @@ -91,7 +91,7 @@ jobs: steps: - name: Download test results id: download-artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.pytest_report_folder }} path: ${{ env.pytest_report_folder }} diff --git a/.github/workflows/batch-score-oss-ci.yaml b/.github/workflows/batch-score-oss-ci.yaml index f41b2ce5b5..31d134ccbe 100644 --- a/.github/workflows/batch-score-oss-ci.yaml +++ b/.github/workflows/batch-score-oss-ci.yaml @@ -71,7 +71,7 @@ jobs: RESOURCE_GROUP: ${{ env.resource_group }} WORKSPACE_NAME: ${{ env.workspace }} - name: Upload test results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() with: name: ${{ env.pytest_report_folder }} @@ -91,7 +91,7 @@ jobs: steps: - name: Download test results id: download-artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.pytest_report_folder }} path: ${{ env.pytest_report_folder }} diff --git a/.github/workflows/environments-ci.yaml b/.github/workflows/environments-ci.yaml index 811e35e7c6..0f7ad68447 100644 --- a/.github/workflows/environments-ci.yaml +++ b/.github/workflows/environments-ci.yaml @@ -89,7 +89,7 @@ jobs: run: python -u $scripts_environment_dir/validate_build_logs.py -l '${{ runner.temp }}'/$build_logs_artifact_name - name: Upload build logs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() with: name: ${{ env.build_logs_artifact_name }} diff --git a/.github/workflows/model-monitoring-ci.yml b/.github/workflows/model-monitoring-ci.yml index e22e6a3761..00318d2152 100644 --- a/.github/workflows/model-monitoring-ci.yml +++ b/.github/workflows/model-monitoring-ci.yml @@ -132,7 +132,7 @@ jobs: RESOURCE_GROUP: ${{ env.resource_group }} WORKSPACE_NAME: ${{ env.workspace }} - name: Upload test results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() with: name: ${{ env.pytest_report_folder }} @@ -152,7 +152,7 @@ jobs: steps: - name: Download test results id: download-artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.pytest_report_folder }} path: ${{ env.pytest_report_folder }} diff --git a/.github/workflows/model-monitoring-gsq-ci.yml b/.github/workflows/model-monitoring-gsq-ci.yml index 4c97d832ab..100d2141f6 100644 --- a/.github/workflows/model-monitoring-gsq-ci.yml +++ b/.github/workflows/model-monitoring-gsq-ci.yml @@ -87,7 +87,7 @@ jobs: RESOURCE_GROUP: ${{ env.resource_group }} WORKSPACE_NAME: ${{ env.workspace }} - name: Upload test results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() with: name: ${{ env.pytest_report_folder }} @@ -107,7 +107,7 @@ jobs: steps: - name: Download test results id: download-artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.pytest_report_folder }} path: ${{ env.pytest_report_folder }} diff --git a/assets/evaluation_on_cloud/environments/evaluations-built-in/context/requirements.txt b/assets/evaluation_on_cloud/environments/evaluations-built-in/context/requirements.txt index 98a4e634a8..903db1dc3f 100644 --- a/assets/evaluation_on_cloud/environments/evaluations-built-in/context/requirements.txt +++ b/assets/evaluation_on_cloud/environments/evaluations-built-in/context/requirements.txt @@ -1,4 +1,4 @@ -azure-ai-evaluation=={{latest-pypi-version}} +azure-ai-evaluation==1.0.0b5 azureml-mlflow=={{latest-pypi-version}} azure-ai-ml=={{latest-pypi-version}} diff --git a/assets/models/system/Phi-4/spec.yaml b/assets/models/system/Phi-4/spec.yaml index b58f786299..5f7a821a2b 100644 --- a/assets/models/system/Phi-4/spec.yaml +++ b/assets/models/system/Phi-4/spec.yaml @@ -6,6 +6,9 @@ path: ./ properties: inference-min-sku-spec: 24|1|220|64 inference-recommended-sku: Standard_NC24ads_A100_v4, Standard_NC48ads_A100_v4, Standard_NC96ads_A100_v4, Standard_ND96asr_v4, Standard_ND96amsr_A100_v4 + finetuning-tasks: chat-completion + finetune-min-sku-spec: 24|1|220|64 + finetune-recommended-sku: Standard_NC24ads_A100_v4, Standard_NC48ads_A100_v4, Standard_NC96ads_A100_v4, Standard_ND96asr_v4, Standard_ND96amsr_A100_v4 languages: en SharedComputeCapacityEnabled: true @@ -43,6 +46,30 @@ tags: Standard_ND96asr_v4, Standard_ND96amsr_A100_v4 ] + finetune_compute_allow_list: + [ + Standard_NC24ads_A100_v4, + Standard_NC48ads_A100_v4, + Standard_NC96ads_A100_v4, + Standard_ND96asr_v4, + Standard_ND96amsr_A100_v4 + ] + model_specific_defaults: + apply_deepspeed: "true" + deepspeed_stage: 3 + apply_lora: "true" + apply_ort: "false" + precision: 16 + ignore_mismatched_sizes: "false" + num_train_epochs: 1 + per_device_train_batch_size: 1 + per_device_eval_batch_size: 1 + gradient_accumulation_steps: 1 + learning_rate: 5e-6 + lr_scheduler_type: "cosine" + logging_strategy: "steps" + logging_steps: 10 + save_total_limit: 1 benchmark: "quality" -version: 2 +version: 3 diff --git a/assets/models/system/TamGen/MLmodel b/assets/models/system/TamGen/MLmodel deleted file mode 100644 index 2ddb65a15b..0000000000 --- a/assets/models/system/TamGen/MLmodel +++ /dev/null @@ -1,22 +0,0 @@ -flavors: - python_function: - artifacts: - checkpoint: - path: artifacts/checkpoint_best.pt - uri: checkpoints/crossdock_pdb_A10/checkpoint_best.pt - gpt_dir: - path: artifacts/gpt_model - uri: gpt_model - cloudpickle_version: 3.1.0 - code: null - env: - conda: conda.yaml - virtualenv: python_env.yaml - loader_module: mlflow.pyfunc.model - python_model: python_model.pkl - python_version: 3.9.21 - streamable: false -mlflow_version: 2.19.0 -model_size_bytes: 2369527704 -model_uuid: 385934d395d944cf851a81002a1c8be4 -utc_time_created: '2025-01-08 12:54:23.079748' diff --git a/assets/models/system/aurora/description.md b/assets/models/system/aurora/description.md index 6edcd23694..9ef6bb0fb9 100644 --- a/assets/models/system/aurora/description.md +++ b/assets/models/system/aurora/description.md @@ -1,21 +1,11 @@ -Aurora: A Foundation Model for the Earth System - -Aurora is a machine learning model that can predict atmospheric variables, such as temperature. +Aurora is a machine learning model that can predict general environmental variables, such as temperature and wind speed. It is a _foundation model_, which means that it was first generally trained on a lot of data, -and then can be adapted to specialised atmospheric forecasting tasks with relatively little data. +and then can be adapted to specialised environmental forecasting tasks with relatively little data. We provide four such specialised versions: one for medium-resolution weather prediction, one for high-resolution weather prediction, one for air pollution prediction, and one for ocean wave prediction. - -## Resources - -* [Aurora Documentation for detailed instruction and examples](https://microsoft.github.io/aurora) -* [Aurora Academic Paper](https://arxiv.org/abs/2405.13063) -* [A full-fledged example that runs the model on ERA5](https://microsoft.github.io/aurora/example_era5.html). - -## Implementation - -_The package currently includes the pretrained model and the fine-tuned version for high-resolution weather forecasting._ -_We are working on the fine-tuned versions for air pollution and ocean wave forecasting, which will be included in due time._ +Currently, this implementation only includes the version for medium-term weather prediction. +Please see the documentation of the Aurora Foundry Python API linked below for +precisely which models are available. diff --git a/assets/models/system/aurora/evaluation.md b/assets/models/system/aurora/evaluation.md index cb89b48e1f..ab49cd26a0 100644 --- a/assets/models/system/aurora/evaluation.md +++ b/assets/models/system/aurora/evaluation.md @@ -3,4 +3,4 @@ These evaluations not only compare measures of accuracy, such as the root mean s but also look at the behaviour in extreme situations, like extreme heat and cold, and rare events, like Storm Ciarรกn in 2023. These evaluations are the main topic of [the paper](https://arxiv.org/pdf/2405.13063). -*Note: The documentation included in this file is for informational purposes only and is not intended to supersede the applicable license terms.* +*Note: The documentation included here is for informational purposes only and is not intended to supersede the applicable license terms.* diff --git a/assets/models/system/aurora/notes.md b/assets/models/system/aurora/notes.md index 974d78879f..44c8ffcc58 100644 --- a/assets/models/system/aurora/notes.md +++ b/assets/models/system/aurora/notes.md @@ -1,3 +1,52 @@ +## Resources + +* [Documentation of the Aurora Foundry Python API](https://microsoft.github.io/aurora/foundry/intro.html) +* [A full-fledged example that runs the model on Foundry](https://microsoft.github.io/aurora/foundry/demo_hres_t0.html). +* [Implementation of the Aurora model](https://github.com/microsoft/aurora) +* [Documentation of the Aurora implementation](https://microsoft.github.io/aurora/intro.html) +* [Paper with detailed evaluation](https://arxiv.org/abs/2405.13063) + +## Quickstart + +First install the model: + +```bash +pip install microsoft-aurora +``` + +Then you can make predictions with a Azure Foundry AI endpoint as follows: + +```python +from aurora import Batch + +from aurora.foundry import BlobStorageChannel, FoundryClient, submit + + +initial_condition = Batch(...) # Create initial condition for the model. + +for pred in submit( + initial_condition, + model_name="aurora-0.25-finetuned", + num_steps=4, # Every step predicts six hours ahead. + foundry_client=FoundryClient( + endpoint="https://endpoint/", + token="ENDPOINT_TOKEN", + ), + # Communication with the endpoint happens via an intermediate blob storage container. You + # will need to create one and generate an URL with a SAS token that has both read and write + # rights. + channel=BlobStorageChannel( + "https://storageaccount.blob.core.windows.net/container?" + ), +): + pass # Do something with `pred`, which is a `Batch`. +``` + +## License + +This model and the associated model weights are released under the license [CC-BY-NC-SA-4.0](https://spdx.org/licenses/CC-BY-NC-SA-4.0). +This means that you are free to share and adapt the material for non-commercial purposes, as long as you provide appropriate credit, indicate if changes were made, and distribute your contributions under the same license. + ## Security See [SECURITY](https://github.com/microsoft/aurora/blob/main/SECURITY.md). @@ -34,10 +83,3 @@ This project may contain trademarks or logos for projects, products, or services Authorized use of Microsoft trademarks or logos is subject to and must follow [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies. - -## FAQ - -### Why are the fine-tuned versions of Aurora for air quality and ocean wave forecasting missing? - -The package currently includes the pretrained model and the fine-tuned version for high-resolution weather forecasting. -We are working on the fine-tuned versions for air pollution and ocean wave forecasting, which will be included in due time. diff --git a/assets/models/system/aurora/spec.yaml b/assets/models/system/aurora/spec.yaml index 0ec255d61d..6a465e27de 100644 --- a/assets/models/system/aurora/spec.yaml +++ b/assets/models/system/aurora/spec.yaml @@ -6,7 +6,7 @@ path: ./ properties: languages: EN inference-min-sku-spec: 24|1|220|64 - inference-recommended-sku: Standard_NC24ads_A100_v4, Standard_NC48ads_A100_v4, Standard_NC96ads_A100_v4 + inference-recommended-sku: Standard_NC24ads_A100_v4 SharedComputeCapacityEnabled: true tags: @@ -14,14 +14,15 @@ tags: Preview: "" Featured: "" author: Microsoft - license: custom + license: cc-by-nc-sa-4.0 hiddenlayerscanned: "true" notes: "notes.md" disable-batch: true SharedComputeCapacityEnabled: "" inference_compute_allow_list: - Standard_NC24ads_A100_v4 - - Standard_NC48ads_A100_v4 - - Standard_NC96ads_A100_v4 + sku_to_num_replicas_map: + Standard_NC24ads_A100_v4: 1 + Default: 1 -version: 1 \ No newline at end of file +version: 1 diff --git a/assets/models/system/phi-3-medium-128k-instruct/spec.yaml b/assets/models/system/phi-3-medium-128k-instruct/spec.yaml index 7895bae357..6227d06af2 100644 --- a/assets/models/system/phi-3-medium-128k-instruct/spec.yaml +++ b/assets/models/system/phi-3-medium-128k-instruct/spec.yaml @@ -68,4 +68,4 @@ tags: save_total_limit: 1 max_seq_length: 4096 benchmark: "quality" -version: 6 +version: 7 diff --git a/assets/models/system/phi-3-medium-4k-instruct/spec.yaml b/assets/models/system/phi-3-medium-4k-instruct/spec.yaml index ce2fe1d9df..af15c7dbdc 100644 --- a/assets/models/system/phi-3-medium-4k-instruct/spec.yaml +++ b/assets/models/system/phi-3-medium-4k-instruct/spec.yaml @@ -71,4 +71,4 @@ tags: save_total_limit: 1 max_seq_length: 4096 benchmark: "quality" -version: 5 +version: 6 diff --git a/assets/models/system/phi-3-mini-128k-instruct/spec.yaml b/assets/models/system/phi-3-mini-128k-instruct/spec.yaml index acc795098a..58c9dc95b9 100644 --- a/assets/models/system/phi-3-mini-128k-instruct/spec.yaml +++ b/assets/models/system/phi-3-mini-128k-instruct/spec.yaml @@ -70,4 +70,4 @@ tags: logging_steps: 10 save_total_limit: 1 benchmark: "quality" -version: 12 +version: 13 diff --git a/assets/models/system/phi-3-mini-4k-instruct/spec.yaml b/assets/models/system/phi-3-mini-4k-instruct/spec.yaml index 27b215724c..932d7dcbf2 100644 --- a/assets/models/system/phi-3-mini-4k-instruct/spec.yaml +++ b/assets/models/system/phi-3-mini-4k-instruct/spec.yaml @@ -76,4 +76,4 @@ tags: logging_steps: 10 save_total_limit: 1 benchmark: "quality" -version: 14 +version: 15 diff --git a/assets/models/system/phi-3-small-128k-instruct/spec.yaml b/assets/models/system/phi-3-small-128k-instruct/spec.yaml index da653f250a..3f2f045f5a 100644 --- a/assets/models/system/phi-3-small-128k-instruct/spec.yaml +++ b/assets/models/system/phi-3-small-128k-instruct/spec.yaml @@ -64,4 +64,4 @@ tags: save_total_limit: 1 max_seq_length: 4096 benchmark: "quality" -version: 4 +version: 5 diff --git a/assets/models/system/phi-3-small-8k-instruct/spec.yaml b/assets/models/system/phi-3-small-8k-instruct/spec.yaml index 61b53f3136..2f0e98b54f 100644 --- a/assets/models/system/phi-3-small-8k-instruct/spec.yaml +++ b/assets/models/system/phi-3-small-8k-instruct/spec.yaml @@ -64,4 +64,4 @@ tags: save_total_limit: 1 max_seq_length: 4096 benchmark: "quality" -version: 5 +version: 6 diff --git a/assets/models/system/phi-3-vision-128k-instruct/spec.yaml b/assets/models/system/phi-3-vision-128k-instruct/spec.yaml index 5b81e20f30..904bb9e2cd 100644 --- a/assets/models/system/phi-3-vision-128k-instruct/spec.yaml +++ b/assets/models/system/phi-3-vision-128k-instruct/spec.yaml @@ -23,4 +23,4 @@ tags: ] inference_supported_envs: - vllm -version: 2 +version: 3 diff --git a/assets/models/system/phi-3.5-mini-128k-instruct/spec.yaml b/assets/models/system/phi-3.5-mini-128k-instruct/spec.yaml index c62b7b6293..6790a5f9c1 100644 --- a/assets/models/system/phi-3.5-mini-128k-instruct/spec.yaml +++ b/assets/models/system/phi-3.5-mini-128k-instruct/spec.yaml @@ -71,4 +71,4 @@ tags: logging_steps: 10 save_total_limit: 1 benchmark: "quality" -version: 6 +version: 7 diff --git a/assets/models/system/phi-3.5-moe-128k-instruct/spec.yaml b/assets/models/system/phi-3.5-moe-128k-instruct/spec.yaml index 5fb40b416b..98b83c607e 100644 --- a/assets/models/system/phi-3.5-moe-128k-instruct/spec.yaml +++ b/assets/models/system/phi-3.5-moe-128k-instruct/spec.yaml @@ -68,4 +68,4 @@ tags: logging_steps: 10 save_total_limit: 1 benchmark: "quality" -version: 5 +version: 6 diff --git a/assets/models/system/phi-3.5-vision-128k-instruct/spec.yaml b/assets/models/system/phi-3.5-vision-128k-instruct/spec.yaml index c1fd43435d..487ab0993a 100644 --- a/assets/models/system/phi-3.5-vision-128k-instruct/spec.yaml +++ b/assets/models/system/phi-3.5-vision-128k-instruct/spec.yaml @@ -56,4 +56,4 @@ tags: logging_steps: 10 save_total_limit: 1 benchmark: "quality" -version: 2 +version: 3 diff --git a/assets/training/finetune_acft_hf_nlp/components/finetune/chat_completion/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/finetune/chat_completion/spec.yaml index 8978b3950f..2abc2b0556 100644 --- a/assets/training/finetune_acft_hf_nlp/components/finetune/chat_completion/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/finetune/chat_completion/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: chat_completion_finetune -version: 0.0.65 +version: 0.0.67 type: command is_deterministic: True diff --git a/assets/training/finetune_acft_hf_nlp/components/finetune/question_answering/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/finetune/question_answering/spec.yaml index 4bfe5c53ee..a94858f829 100644 --- a/assets/training/finetune_acft_hf_nlp/components/finetune/question_answering/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/finetune/question_answering/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: question_answering_finetune -version: 0.0.65 +version: 0.0.67 type: command is_deterministic: True diff --git a/assets/training/finetune_acft_hf_nlp/components/finetune/summarization/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/finetune/summarization/spec.yaml index ff33c70665..0743a1eae3 100644 --- a/assets/training/finetune_acft_hf_nlp/components/finetune/summarization/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/finetune/summarization/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: summarization_finetune -version: 0.0.65 +version: 0.0.67 type: command is_deterministic: True diff --git a/assets/training/finetune_acft_hf_nlp/components/finetune/text_classification/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/finetune/text_classification/spec.yaml index ac3ae045ca..f66ef609a1 100644 --- a/assets/training/finetune_acft_hf_nlp/components/finetune/text_classification/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/finetune/text_classification/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: text_classification_finetune -version: 0.0.66 +version: 0.0.67 type: command is_deterministic: false diff --git a/assets/training/finetune_acft_hf_nlp/components/finetune/text_generation/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/finetune/text_generation/spec.yaml index a96d07f816..7b56db5758 100644 --- a/assets/training/finetune_acft_hf_nlp/components/finetune/text_generation/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/finetune/text_generation/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: text_generation_finetune -version: 0.0.65 +version: 0.0.67 type: command is_deterministic: True diff --git a/assets/training/finetune_acft_hf_nlp/components/finetune/token_classification/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/finetune/token_classification/spec.yaml index 7e53c070b4..03910bd128 100644 --- a/assets/training/finetune_acft_hf_nlp/components/finetune/token_classification/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/finetune/token_classification/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: token_classification_finetune -version: 0.0.66 +version: 0.0.67 type: command is_deterministic: false diff --git a/assets/training/finetune_acft_hf_nlp/components/finetune/translation/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/finetune/translation/spec.yaml index f0468b6515..d97a270c35 100644 --- a/assets/training/finetune_acft_hf_nlp/components/finetune/translation/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/finetune/translation/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: translation_finetune -version: 0.0.65 +version: 0.0.67 type: command is_deterministic: True diff --git a/assets/training/finetune_acft_hf_nlp/components/model_converter/common/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/model_converter/common/spec.yaml index 7dc5dccc70..acfe3cb9e2 100644 --- a/assets/training/finetune_acft_hf_nlp/components/model_converter/common/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/model_converter/common/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: ft_nlp_model_converter -version: 0.0.66 +version: 0.0.67 type: command is_deterministic: True diff --git a/assets/training/finetune_acft_hf_nlp/components/model_import/chat_completion/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/model_import/chat_completion/spec.yaml index 2b9bd857a3..31506ad3f5 100644 --- a/assets/training/finetune_acft_hf_nlp/components/model_import/chat_completion/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/model_import/chat_completion/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: chat_completion_model_import -version: 0.0.65 +version: 0.0.67 type: command is_deterministic: True diff --git a/assets/training/finetune_acft_hf_nlp/components/model_import/question_answering/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/model_import/question_answering/spec.yaml index 36d411a73d..07afcefa48 100644 --- a/assets/training/finetune_acft_hf_nlp/components/model_import/question_answering/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/model_import/question_answering/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: question_answering_model_import -version: 0.0.65 +version: 0.0.67 type: command is_deterministic: True diff --git a/assets/training/finetune_acft_hf_nlp/components/model_import/summarization/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/model_import/summarization/spec.yaml index 6abd6473e9..8dfc4b66e5 100644 --- a/assets/training/finetune_acft_hf_nlp/components/model_import/summarization/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/model_import/summarization/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: summarization_model_import -version: 0.0.65 +version: 0.0.67 type: command is_deterministic: True diff --git a/assets/training/finetune_acft_hf_nlp/components/model_import/text_classification/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/model_import/text_classification/spec.yaml index b971deaf3e..78d583417d 100644 --- a/assets/training/finetune_acft_hf_nlp/components/model_import/text_classification/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/model_import/text_classification/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: text_classification_model_import -version: 0.0.66 +version: 0.0.67 type: command is_deterministic: True diff --git a/assets/training/finetune_acft_hf_nlp/components/model_import/text_generation/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/model_import/text_generation/spec.yaml index a509935a13..562352d69f 100644 --- a/assets/training/finetune_acft_hf_nlp/components/model_import/text_generation/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/model_import/text_generation/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: text_generation_model_import -version: 0.0.65 +version: 0.0.67 type: command is_deterministic: True diff --git a/assets/training/finetune_acft_hf_nlp/components/model_import/token_classification/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/model_import/token_classification/spec.yaml index a1c7808fbb..d96b8bdf08 100644 --- a/assets/training/finetune_acft_hf_nlp/components/model_import/token_classification/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/model_import/token_classification/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: token_classification_model_import -version: 0.0.66 +version: 0.0.67 type: command is_deterministic: True diff --git a/assets/training/finetune_acft_hf_nlp/components/model_import/translation/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/model_import/translation/spec.yaml index 8b1e956839..fb52ba94da 100644 --- a/assets/training/finetune_acft_hf_nlp/components/model_import/translation/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/model_import/translation/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: translation_model_import -version: 0.0.65 +version: 0.0.67 type: command is_deterministic: True diff --git a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/chat_completion/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/chat_completion/spec.yaml index c2e8cf772d..893ff31192 100644 --- a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/chat_completion/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/chat_completion/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json name: chat_completion_pipeline -version: 0.0.67 +version: 0.0.68 type: pipeline display_name: Chat Completion Pipeline description: Pipeline Component to finetune Hugging Face pretrained models for chat completion task. The component supports optimizations such as LoRA, Deepspeed and ONNXRuntime for performance enhancement. See [docs](https://aka.ms/azureml/components/chat_completion_pipeline) to learn more. @@ -495,7 +495,7 @@ outputs: jobs: ft_nlp_common_validation: type: command - component: azureml:ft_nlp_common_validation:0.0.65 + component: azureml:ft_nlp_common_validation:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -532,7 +532,7 @@ jobs: auto_find_batch_size: '${{parent.inputs.auto_find_batch_size}}' chat_completion_model_import: type: command - component: azureml:chat_completion_model_import:0.0.65 + component: azureml:chat_completion_model_import:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -543,7 +543,7 @@ jobs: validation_output: '${{parent.jobs.ft_nlp_common_validation.outputs.validation_info}}' chat_completion_datapreprocess: type: command - component: azureml:chat_completion_datapreprocess:0.0.65 + component: azureml:chat_completion_datapreprocess:0.0.67 compute: '${{parent.inputs.compute_preprocess}}' resources: instance_type: '${{parent.inputs.instance_type_preprocess}}' @@ -560,7 +560,7 @@ jobs: model_selector_output: '${{parent.jobs.chat_completion_model_import.outputs.output_dir}}' chat_completion_finetune: type: command - component: azureml:chat_completion_finetune:0.0.65 + component: azureml:chat_completion_finetune:0.0.67 compute: '${{parent.inputs.compute_finetune}}' distribution: type: pytorch @@ -618,7 +618,7 @@ jobs: # mlflow_model_folder: '${{parent.outputs.mlflow_model_folder}}' ft_nlp_model_converter: type: command - component: azureml:ft_nlp_model_converter:0.0.65 + component: azureml:ft_nlp_model_converter:0.0.67 compute: '${{parent.inputs.compute_finetune}}' resources: instance_type: '${{parent.inputs.instance_type_finetune}}' @@ -627,30 +627,30 @@ jobs: # converted_model: '${{parent.jobs.chat_completion_finetune.outputs.mlflow_model_folder}}' outputs: mlflow_model_folder: '${{parent.outputs.mlflow_model_folder}}' - # model_prediction: - # type: command - # component: azureml:model_prediction_with_container:0.0.2 - # compute: '${{parent.inputs.compute_model_evaluation}}' - # resources: - # instance_type: '${{parent.inputs.instance_type_model_evaluation}}' - # inputs: - # task: chat-completion - # test_data: '${{parent.jobs.chat_completion_datapreprocess.outputs.output_dir}}' - # label_column_name: messages - # mlflow_model: '${{parent.jobs.ft_nlp_model_converter.outputs.mlflow_model_folder}}' - # evaluation_config_params: '${{parent.inputs.evaluation_config_params}}' - # compute_metrics: - # type: command - # component: azureml:compute_metrics:0.0.31 - # compute: '${{parent.inputs.compute_model_evaluation}}' - # resources: - # instance_type: '${{parent.inputs.instance_type_model_evaluation}}' - # inputs: - # task: chat-completion - # ground_truth: '${{parent.jobs.model_prediction.outputs.ground_truth}}' - # prediction: '${{parent.jobs.model_prediction.outputs.predictions}}' - # prediction_probabilities: '${{parent.jobs.model_prediction.outputs.prediction_probabilities}}' - # evaluation_config: '${{parent.inputs.evaluation_config}}' - # evaluation_config_params: '${{parent.inputs.evaluation_config_params}}' - # outputs: - # evaluation_result: '${{parent.outputs.evaluation_result}}' + model_prediction: + type: command + component: azureml:model_prediction_with_container:0.0.5 + compute: '${{parent.inputs.compute_model_evaluation}}' + resources: + instance_type: '${{parent.inputs.instance_type_model_evaluation}}' + inputs: + task: chat-completion + test_data: '${{parent.jobs.chat_completion_datapreprocess.outputs.output_dir}}' + label_column_name: messages + mlflow_model: '${{parent.jobs.ft_nlp_model_converter.outputs.mlflow_model_folder}}' + evaluation_config_params: '${{parent.inputs.evaluation_config_params}}' + compute_metrics: + type: command + component: azureml:compute_metrics:0.0.35 + compute: '${{parent.inputs.compute_model_evaluation}}' + resources: + instance_type: '${{parent.inputs.instance_type_model_evaluation}}' + inputs: + task: chat-completion + ground_truth: '${{parent.jobs.model_prediction.outputs.ground_truth}}' + prediction: '${{parent.jobs.model_prediction.outputs.predictions}}' + prediction_probabilities: '${{parent.jobs.model_prediction.outputs.prediction_probabilities}}' + evaluation_config: '${{parent.inputs.evaluation_config}}' + evaluation_config_params: '${{parent.inputs.evaluation_config_params}}' + outputs: + evaluation_result: '${{parent.outputs.evaluation_result}}' diff --git a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/nlp_multiclass/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/nlp_multiclass/spec.yaml index 6bd52a4da4..604f319e5a 100644 --- a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/nlp_multiclass/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/nlp_multiclass/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json name: nlp_textclassification_multiclass -version: 0.0.3 +version: 0.0.4 type: pipeline display_name: PipelineComponent for AutoML NLP Multiclass TextClassification description: Pipeline component for AutoML NLP Multiclass Text classification @@ -230,7 +230,7 @@ jobs: huggingface_id: ${{parent.inputs.model_name}} preprocess: type: command - component: azureml:nlp_multiclass_datapreprocessing:0.0.2 + component: azureml:nlp_multiclass_datapreprocessing:0.0.3 compute: ${{parent.inputs.compute_preprocess}} inputs: label_column_name: ${{parent.inputs.label_column_name}} diff --git a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/nlp_multilabel/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/nlp_multilabel/spec.yaml index 079a5d33db..27b4b0615d 100644 --- a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/nlp_multilabel/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/nlp_multilabel/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json name: nlp_textclassification_multilabel -version: 0.0.3 +version: 0.0.4 type: pipeline display_name: PipelineComponent for AutoML NLP Multilabel TextClassification description: Pipeline component for AutoML NLP Multilabel Text classification @@ -230,7 +230,7 @@ jobs: huggingface_id: ${{parent.inputs.model_name}} preprocess: type: command - component: azureml:nlp_multilabel_datapreprocessing:0.0.2 + component: azureml:nlp_multilabel_datapreprocessing:0.0.3 compute: ${{parent.inputs.compute_preprocess}} inputs: label_column_name: ${{parent.inputs.label_column_name}} diff --git a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/question_answering/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/question_answering/spec.yaml index 716858dae0..9bf6f7309c 100644 --- a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/question_answering/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/question_answering/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json name: question_answering_pipeline -version: 0.0.67 +version: 0.0.68 type: pipeline display_name: Question Answering Pipeline description: Pipeline Component to finetune Hugging Face pretrained models for extractive question answering task. The component supports optimizations such as LoRA, Deepspeed and ONNXRuntime for performance enhancement. See [docs](https://aka.ms/azureml/components/question_answering_pipeline) to learn more. @@ -541,7 +541,7 @@ outputs: jobs: ft_nlp_common_validation: type: command - component: azureml:ft_nlp_common_validation:0.0.64 + component: azureml:ft_nlp_common_validation:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -578,7 +578,7 @@ jobs: auto_find_batch_size: '${{parent.inputs.auto_find_batch_size}}' question_answering_model_import: type: command - component: azureml:question_answering_model_import:0.0.65 + component: azureml:question_answering_model_import:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -589,7 +589,7 @@ jobs: validation_output: '${{parent.jobs.ft_nlp_common_validation.outputs.validation_info}}' question_answering_datapreprocess: type: command - component: azureml:question_answering_datapreprocess:0.0.65 + component: azureml:question_answering_datapreprocess:0.0.67 compute: '${{parent.inputs.compute_preprocess}}' resources: instance_type: '${{parent.inputs.instance_type_preprocess}}' @@ -614,7 +614,7 @@ jobs: model_selector_output: '${{parent.jobs.question_answering_model_import.outputs.output_dir}}' question_answering_finetune: type: command - component: azureml:question_answering_finetune:0.0.65 + component: azureml:question_answering_finetune:0.0.67 compute: '${{parent.inputs.compute_finetune}}' distribution: type: pytorch @@ -671,7 +671,7 @@ jobs: pytorch_model_folder: '${{parent.outputs.pytorch_model_folder}}' ft_nlp_model_converter: type: command - component: azureml:ft_nlp_model_converter:0.0.64 + component: azureml:ft_nlp_model_converter:0.0.67 compute: '${{parent.inputs.compute_finetune}}' resources: instance_type: '${{parent.inputs.instance_type_finetune}}' @@ -681,7 +681,7 @@ jobs: mlflow_model_folder: '${{parent.outputs.mlflow_model_folder}}' model_prediction: type: command - component: azureml:model_prediction:0.0.35 + component: azureml:model_prediction_with_container:0.0.5 compute: '${{parent.inputs.compute_model_evaluation}}' resources: instance_type: '${{parent.inputs.instance_type_model_evaluation}}' @@ -690,10 +690,7 @@ jobs: test_data: '${{parent.jobs.question_answering_datapreprocess.outputs.output_dir}}' label_column_name: '${{parent.inputs.answers_key}}' input_column_names: "'${{parent.inputs.question_key}}','${{parent.inputs.context_key}}'" - batch_size: '${{parent.inputs.per_device_train_batch_size}}' - device: auto mlflow_model: '${{parent.jobs.ft_nlp_model_converter.outputs.mlflow_model_folder}}' - evaluation_config: '${{parent.inputs.evaluation_config}}' evaluation_config_params: '${{parent.inputs.evaluation_config_params}}' compute_metrics: type: command diff --git a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/summarization/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/summarization/spec.yaml index 19188e6962..2e548b3958 100644 --- a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/summarization/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/summarization/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json name: summarization_pipeline -version: 0.0.67 +version: 0.0.68 type: pipeline display_name: Summarization Pipeline description: Pipeline Component to finetune Hugging Face pretrained models for summarization task. The component supports optimizations such as LoRA, Deepspeed and ONNXRuntime for performance enhancement. See [docs](https://aka.ms/azureml/components/summarization_pipeline) to learn more. @@ -512,7 +512,7 @@ outputs: jobs: ft_nlp_common_validation: type: command - component: azureml:ft_nlp_common_validation:0.0.64 + component: azureml:ft_nlp_common_validation:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -549,7 +549,7 @@ jobs: auto_find_batch_size: '${{parent.inputs.auto_find_batch_size}}' summarization_model_import: type: command - component: azureml:summarization_model_import:0.0.65 + component: azureml:summarization_model_import:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -560,7 +560,7 @@ jobs: validation_output: '${{parent.jobs.ft_nlp_common_validation.outputs.validation_info}}' summarization_datapreprocess: type: command - component: azureml:summarization_datapreprocess:0.0.65 + component: azureml:summarization_datapreprocess:0.0.67 compute: '${{parent.inputs.compute_preprocess}}' resources: instance_type: '${{parent.inputs.instance_type_preprocess}}' @@ -580,7 +580,7 @@ jobs: model_selector_output: '${{parent.jobs.summarization_model_import.outputs.output_dir}}' summarization_finetune: type: command - component: azureml:summarization_finetune:0.0.65 + component: azureml:summarization_finetune:0.0.67 compute: '${{parent.inputs.compute_finetune}}' distribution: type: pytorch @@ -637,7 +637,7 @@ jobs: pytorch_model_folder: '${{parent.outputs.pytorch_model_folder}}' ft_nlp_model_converter: type: command - component: azureml:ft_nlp_model_converter:0.0.64 + component: azureml:ft_nlp_model_converter:0.0.67 compute: '${{parent.inputs.compute_finetune}}' resources: instance_type: '${{parent.inputs.instance_type_finetune}}' @@ -647,7 +647,7 @@ jobs: mlflow_model_folder: '${{parent.outputs.mlflow_model_folder}}' model_prediction: type: command - component: azureml:model_prediction:0.0.35 + component: azureml:model_prediction_with_container:0.0.5 compute: '${{parent.inputs.compute_model_evaluation}}' resources: instance_type: '${{parent.inputs.instance_type_model_evaluation}}' @@ -656,10 +656,7 @@ jobs: test_data: '${{parent.jobs.summarization_datapreprocess.outputs.output_dir}}' label_column_name: '${{parent.inputs.summary_key}}' input_column_names: '${{parent.inputs.document_key}}' - batch_size: '${{parent.inputs.per_device_train_batch_size}}' - device: auto mlflow_model: '${{parent.jobs.ft_nlp_model_converter.outputs.mlflow_model_folder}}' - evaluation_config: '${{parent.inputs.evaluation_config}}' evaluation_config_params: '${{parent.inputs.evaluation_config_params}}' compute_metrics: type: command diff --git a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_classification/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_classification/spec.yaml index dcc86a991f..ac57df59c2 100644 --- a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_classification/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_classification/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json name: text_classification_pipeline -version: 0.0.67 +version: 0.0.68 type: pipeline display_name: Text Classification Pipeline description: Pipeline component to finetune Hugging Face pretrained models for text classification task. The component supports optimizations such as LoRA, Deepspeed and ONNXRuntime for performance enhancement. See [docs](https://aka.ms/azureml/components/text_classification_pipeline) to learn more. @@ -514,7 +514,7 @@ outputs: jobs: ft_nlp_common_validation: type: command - component: azureml:ft_nlp_common_validation:0.0.64 + component: azureml:ft_nlp_common_validation:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -551,7 +551,7 @@ jobs: auto_find_batch_size: '${{parent.inputs.auto_find_batch_size}}' text_classification_model_import: type: command - component: azureml:text_classification_model_import:0.0.65 + component: azureml:text_classification_model_import:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -562,7 +562,7 @@ jobs: validation_output: '${{parent.jobs.ft_nlp_common_validation.outputs.validation_info}}' text_classification_datapreprocess: type: command - component: azureml:text_classification_datapreprocess:0.0.65 + component: azureml:text_classification_datapreprocess:0.0.67 compute: '${{parent.inputs.compute_preprocess}}' resources: instance_type: '${{parent.inputs.instance_type_preprocess}}' @@ -583,7 +583,7 @@ jobs: model_selector_output: '${{parent.jobs.text_classification_model_import.outputs.output_dir}}' text_classification_finetune: type: command - component: azureml:text_classification_finetune:0.0.65 + component: azureml:text_classification_finetune:0.0.67 compute: '${{parent.inputs.compute_finetune}}' distribution: type: pytorch @@ -640,7 +640,7 @@ jobs: pytorch_model_folder: '${{parent.outputs.pytorch_model_folder}}' ft_nlp_model_converter: type: command - component: azureml:ft_nlp_model_converter:0.0.64 + component: azureml:ft_nlp_model_converter:0.0.67 compute: '${{parent.inputs.compute_finetune}}' resources: instance_type: '${{parent.inputs.instance_type_finetune}}' @@ -650,7 +650,7 @@ jobs: mlflow_model_folder: '${{parent.outputs.mlflow_model_folder}}' model_prediction: type: command - component: azureml:model_prediction:0.0.35 + component: azureml:model_prediction_with_container:0.0.5 compute: '${{parent.inputs.compute_model_evaluation}}' resources: instance_type: '${{parent.inputs.instance_type_model_evaluation}}' @@ -659,10 +659,7 @@ jobs: test_data: '${{parent.jobs.text_classification_datapreprocess.outputs.output_dir}}' label_column_name: '${{parent.inputs.label_key}}' input_column_names: "'${{parent.inputs.sentence1_key}}','${{parent.inputs.sentence2_key}}'" - batch_size: '${{parent.inputs.per_device_train_batch_size}}' - device: auto mlflow_model: '${{parent.jobs.ft_nlp_model_converter.outputs.mlflow_model_folder}}' - evaluation_config: '${{parent.inputs.evaluation_config}}' evaluation_config_params: '${{parent.inputs.evaluation_config_params}}' compute_metrics: type: command diff --git a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation/spec.yaml index f5372b2c39..3076464df3 100644 --- a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json name: text_generation_pipeline -version: 0.0.67 +version: 0.0.68 type: pipeline display_name: Text Generation Pipeline description: Pipeline component for text generation @@ -528,7 +528,7 @@ outputs: jobs: ft_nlp_common_validation: type: command - component: azureml:ft_nlp_common_validation:0.0.64 + component: azureml:ft_nlp_common_validation:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -566,7 +566,7 @@ jobs: auto_find_batch_size: '${{parent.inputs.auto_find_batch_size}}' text_generation_model_import: type: command - component: azureml:text_generation_model_import:0.0.65 + component: azureml:text_generation_model_import:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -578,7 +578,7 @@ jobs: system_properties: '${{parent.inputs.system_properties}}' text_generation_datapreprocess: type: command - component: azureml:text_generation_datapreprocess:0.0.65 + component: azureml:text_generation_datapreprocess:0.0.67 compute: '${{parent.inputs.compute_preprocess}}' resources: instance_type: '${{parent.inputs.instance_type_preprocess}}' @@ -598,7 +598,7 @@ jobs: system_properties: '${{parent.inputs.system_properties}}' text_generation_finetune: type: command - component: azureml:text_generation_finetune:0.0.65 + component: azureml:text_generation_finetune:0.0.67 compute: '${{parent.inputs.compute_finetune}}' distribution: type: pytorch @@ -656,7 +656,7 @@ jobs: pytorch_model_folder: '${{parent.outputs.pytorch_model_folder}}' ft_nlp_model_converter: type: command - component: azureml:ft_nlp_model_converter:0.0.64 + component: azureml:ft_nlp_model_converter:0.0.67 compute: '${{parent.inputs.compute_finetune}}' resources: instance_type: '${{parent.inputs.instance_type_finetune}}' @@ -667,7 +667,7 @@ jobs: mlflow_model_folder: '${{parent.outputs.mlflow_model_folder}}' model_prediction: type: command - component: azureml:model_prediction:0.0.35 + component: azureml:model_prediction_with_container:0.0.5 compute: '${{parent.inputs.compute_model_evaluation}}' resources: instance_type: '${{parent.inputs.instance_type_model_evaluation}}' @@ -676,10 +676,7 @@ jobs: test_data: '${{parent.jobs.text_generation_datapreprocess.outputs.output_dir}}' label_column_name: '${{parent.inputs.ground_truth_key}}' input_column_names: '${{parent.inputs.text_key}}' - batch_size: '${{parent.inputs.per_device_train_batch_size}}' - device: auto mlflow_model: '${{parent.jobs.ft_nlp_model_converter.outputs.mlflow_model_folder}}' - evaluation_config: '${{parent.inputs.evaluation_config}}' evaluation_config_params: '${{parent.inputs.evaluation_config_params}}' compute_metrics: type: command diff --git a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_basic_high/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_basic_high/spec.yaml index 8d21c7242a..a49519ddea 100644 --- a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_basic_high/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_basic_high/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json name: text_generation_pipeline_singularity_basic_high -version: 0.0.67 +version: 0.0.68 type: pipeline display_name: Text Generation Pipeline Singularity Basic High description: Pipeline component for text generation @@ -520,7 +520,7 @@ outputs: jobs: ft_nlp_common_validation: type: command - component: azureml:ft_nlp_common_validation:0.0.64 + component: azureml:ft_nlp_common_validation:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -563,7 +563,7 @@ jobs: auto_find_batch_size: '${{parent.inputs.auto_find_batch_size}}' text_generation_model_import: type: command - component: azureml:text_generation_model_import:0.0.65 + component: azureml:text_generation_model_import:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -580,7 +580,7 @@ jobs: system_properties: '${{parent.inputs.system_properties}}' text_generation_datapreprocess: type: command - component: azureml:text_generation_datapreprocess:0.0.65 + component: azureml:text_generation_datapreprocess:0.0.67 compute: '${{parent.inputs.compute_preprocess}}' resources: instance_type: '${{parent.inputs.instance_type_preprocess}}' @@ -605,7 +605,7 @@ jobs: system_properties: '${{parent.inputs.system_properties}}' text_generation_finetune: type: command - component: azureml:text_generation_finetune:0.0.65 + component: azureml:text_generation_finetune:0.0.67 compute: '${{parent.inputs.compute_finetune}}' distribution: type: pytorch @@ -667,7 +667,7 @@ jobs: pytorch_model_folder: '${{parent.outputs.pytorch_model_folder}}' ft_nlp_model_converter: type: command - component: azureml:ft_nlp_model_converter:0.0.64 + component: azureml:ft_nlp_model_converter:0.0.67 compute: '${{parent.inputs.compute_finetune}}' resources: instance_type: '${{parent.inputs.instance_type_finetune}}' diff --git a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_basic_low/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_basic_low/spec.yaml index c3fe0d9432..0de4831a0a 100644 --- a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_basic_low/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_basic_low/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json name: text_generation_pipeline_singularity_basic_low -version: 0.0.67 +version: 0.0.68 type: pipeline display_name: Text Generation Pipeline Singularity Basic Low description: Pipeline component for text generation @@ -520,7 +520,7 @@ outputs: jobs: ft_nlp_common_validation: type: command - component: azureml:ft_nlp_common_validation:0.0.64 + component: azureml:ft_nlp_common_validation:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -563,7 +563,7 @@ jobs: auto_find_batch_size: '${{parent.inputs.auto_find_batch_size}}' text_generation_model_import: type: command - component: azureml:text_generation_model_import:0.0.65 + component: azureml:text_generation_model_import:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -580,7 +580,7 @@ jobs: system_properties: '${{parent.inputs.system_properties}}' text_generation_datapreprocess: type: command - component: azureml:text_generation_datapreprocess:0.0.65 + component: azureml:text_generation_datapreprocess:0.0.67 compute: '${{parent.inputs.compute_preprocess}}' resources: instance_type: '${{parent.inputs.instance_type_preprocess}}' @@ -605,7 +605,7 @@ jobs: system_properties: '${{parent.inputs.system_properties}}' text_generation_finetune: type: command - component: azureml:text_generation_finetune:0.0.65 + component: azureml:text_generation_finetune:0.0.67 compute: '${{parent.inputs.compute_finetune}}' distribution: type: pytorch @@ -667,7 +667,7 @@ jobs: pytorch_model_folder: '${{parent.outputs.pytorch_model_folder}}' ft_nlp_model_converter: type: command - component: azureml:ft_nlp_model_converter:0.0.64 + component: azureml:ft_nlp_model_converter:0.0.67 compute: '${{parent.inputs.compute_finetune}}' resources: instance_type: '${{parent.inputs.instance_type_finetune}}' diff --git a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_basic_medium/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_basic_medium/spec.yaml index 5c382a31cd..68d6667efc 100644 --- a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_basic_medium/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_basic_medium/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json name: text_generation_pipeline_singularity_basic_medium -version: 0.0.67 +version: 0.0.68 type: pipeline display_name: Text Generation Pipeline Singularity Basic Medium description: Pipeline component for text generation @@ -520,7 +520,7 @@ outputs: jobs: ft_nlp_common_validation: type: command - component: azureml:ft_nlp_common_validation:0.0.64 + component: azureml:ft_nlp_common_validation:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -563,7 +563,7 @@ jobs: auto_find_batch_size: '${{parent.inputs.auto_find_batch_size}}' text_generation_model_import: type: command - component: azureml:text_generation_model_import:0.0.65 + component: azureml:text_generation_model_import:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -580,7 +580,7 @@ jobs: system_properties: '${{parent.inputs.system_properties}}' text_generation_datapreprocess: type: command - component: azureml:text_generation_datapreprocess:0.0.65 + component: azureml:text_generation_datapreprocess:0.0.67 compute: '${{parent.inputs.compute_preprocess}}' resources: instance_type: '${{parent.inputs.instance_type_preprocess}}' @@ -605,7 +605,7 @@ jobs: system_properties: '${{parent.inputs.system_properties}}' text_generation_finetune: type: command - component: azureml:text_generation_finetune:0.0.65 + component: azureml:text_generation_finetune:0.0.67 compute: '${{parent.inputs.compute_finetune}}' distribution: type: pytorch @@ -667,7 +667,7 @@ jobs: pytorch_model_folder: '${{parent.outputs.pytorch_model_folder}}' ft_nlp_model_converter: type: command - component: azureml:ft_nlp_model_converter:0.0.64 + component: azureml:ft_nlp_model_converter:0.0.67 compute: '${{parent.inputs.compute_finetune}}' resources: instance_type: '${{parent.inputs.instance_type_finetune}}' diff --git a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_premium_high/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_premium_high/spec.yaml index 2e805e81cb..9aaad747de 100644 --- a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_premium_high/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_premium_high/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json name: text_generation_pipeline_singularity_premium_high -version: 0.0.67 +version: 0.0.68 type: pipeline display_name: Text Generation Pipeline Singularity Premium High description: Pipeline component for text generation @@ -520,7 +520,7 @@ outputs: jobs: ft_nlp_common_validation: type: command - component: azureml:ft_nlp_common_validation:0.0.64 + component: azureml:ft_nlp_common_validation:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -563,7 +563,7 @@ jobs: auto_find_batch_size: '${{parent.inputs.auto_find_batch_size}}' text_generation_model_import: type: command - component: azureml:text_generation_model_import:0.0.65 + component: azureml:text_generation_model_import:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -580,7 +580,7 @@ jobs: system_properties: '${{parent.inputs.system_properties}}' text_generation_datapreprocess: type: command - component: azureml:text_generation_datapreprocess:0.0.65 + component: azureml:text_generation_datapreprocess:0.0.67 compute: '${{parent.inputs.compute_preprocess}}' resources: instance_type: '${{parent.inputs.instance_type_preprocess}}' @@ -605,7 +605,7 @@ jobs: system_properties: '${{parent.inputs.system_properties}}' text_generation_finetune: type: command - component: azureml:text_generation_finetune:0.0.65 + component: azureml:text_generation_finetune:0.0.67 compute: '${{parent.inputs.compute_finetune}}' distribution: type: pytorch @@ -667,7 +667,7 @@ jobs: pytorch_model_folder: '${{parent.outputs.pytorch_model_folder}}' ft_nlp_model_converter: type: command - component: azureml:ft_nlp_model_converter:0.0.64 + component: azureml:ft_nlp_model_converter:0.0.67 compute: '${{parent.inputs.compute_finetune}}' resources: instance_type: '${{parent.inputs.instance_type_finetune}}' diff --git a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_premium_low/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_premium_low/spec.yaml index a164cb576b..a1ec8fdf9d 100644 --- a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_premium_low/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_premium_low/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json name: text_generation_pipeline_singularity_premium_low -version: 0.0.67 +version: 0.0.68 type: pipeline display_name: Text Generation Pipeline Singularity Premium Low description: Pipeline component for text generation @@ -520,7 +520,7 @@ outputs: jobs: ft_nlp_common_validation: type: command - component: azureml:ft_nlp_common_validation:0.0.64 + component: azureml:ft_nlp_common_validation:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -563,7 +563,7 @@ jobs: auto_find_batch_size: '${{parent.inputs.auto_find_batch_size}}' text_generation_model_import: type: command - component: azureml:text_generation_model_import:0.0.65 + component: azureml:text_generation_model_import:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -580,7 +580,7 @@ jobs: system_properties: '${{parent.inputs.system_properties}}' text_generation_datapreprocess: type: command - component: azureml:text_generation_datapreprocess:0.0.65 + component: azureml:text_generation_datapreprocess:0.0.67 compute: '${{parent.inputs.compute_preprocess}}' resources: instance_type: '${{parent.inputs.instance_type_preprocess}}' @@ -605,7 +605,7 @@ jobs: system_properties: '${{parent.inputs.system_properties}}' text_generation_finetune: type: command - component: azureml:text_generation_finetune:0.0.65 + component: azureml:text_generation_finetune:0.0.67 compute: '${{parent.inputs.compute_finetune}}' distribution: type: pytorch @@ -667,7 +667,7 @@ jobs: pytorch_model_folder: '${{parent.outputs.pytorch_model_folder}}' ft_nlp_model_converter: type: command - component: azureml:ft_nlp_model_converter:0.0.64 + component: azureml:ft_nlp_model_converter:0.0.67 compute: '${{parent.inputs.compute_finetune}}' resources: instance_type: '${{parent.inputs.instance_type_finetune}}' diff --git a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_premium_medium/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_premium_medium/spec.yaml index 89c042cdc5..761454b49f 100644 --- a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_premium_medium/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_premium_medium/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json name: text_generation_pipeline_singularity_premium_medium -version: 0.0.67 +version: 0.0.68 type: pipeline display_name: Text Generation Pipeline Singularity Premium Medium description: Pipeline component for text generation @@ -520,7 +520,7 @@ outputs: jobs: ft_nlp_common_validation: type: command - component: azureml:ft_nlp_common_validation:0.0.64 + component: azureml:ft_nlp_common_validation:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -563,7 +563,7 @@ jobs: auto_find_batch_size: '${{parent.inputs.auto_find_batch_size}}' text_generation_model_import: type: command - component: azureml:text_generation_model_import:0.0.65 + component: azureml:text_generation_model_import:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -580,7 +580,7 @@ jobs: system_properties: '${{parent.inputs.system_properties}}' text_generation_datapreprocess: type: command - component: azureml:text_generation_datapreprocess:0.0.65 + component: azureml:text_generation_datapreprocess:0.0.67 compute: '${{parent.inputs.compute_preprocess}}' resources: instance_type: '${{parent.inputs.instance_type_preprocess}}' @@ -605,7 +605,7 @@ jobs: system_properties: '${{parent.inputs.system_properties}}' text_generation_finetune: type: command - component: azureml:text_generation_finetune:0.0.65 + component: azureml:text_generation_finetune:0.0.67 compute: '${{parent.inputs.compute_finetune}}' distribution: type: pytorch @@ -667,7 +667,7 @@ jobs: pytorch_model_folder: '${{parent.outputs.pytorch_model_folder}}' ft_nlp_model_converter: type: command - component: azureml:ft_nlp_model_converter:0.0.64 + component: azureml:ft_nlp_model_converter:0.0.67 compute: '${{parent.inputs.compute_finetune}}' resources: instance_type: '${{parent.inputs.instance_type_finetune}}' diff --git a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_standard_high/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_standard_high/spec.yaml index c354fb778f..9d1fc3c0c7 100644 --- a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_standard_high/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_standard_high/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json name: text_generation_pipeline_singularity_standard_high -version: 0.0.67 +version: 0.0.68 type: pipeline display_name: Text Generation Pipeline Singularity Standard High description: Pipeline component for text generation @@ -520,7 +520,7 @@ outputs: jobs: ft_nlp_common_validation: type: command - component: azureml:ft_nlp_common_validation:0.0.64 + component: azureml:ft_nlp_common_validation:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -563,7 +563,7 @@ jobs: auto_find_batch_size: '${{parent.inputs.auto_find_batch_size}}' text_generation_model_import: type: command - component: azureml:text_generation_model_import:0.0.65 + component: azureml:text_generation_model_import:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -580,7 +580,7 @@ jobs: system_properties: '${{parent.inputs.system_properties}}' text_generation_datapreprocess: type: command - component: azureml:text_generation_datapreprocess:0.0.65 + component: azureml:text_generation_datapreprocess:0.0.67 compute: '${{parent.inputs.compute_preprocess}}' resources: instance_type: '${{parent.inputs.instance_type_preprocess}}' @@ -605,7 +605,7 @@ jobs: system_properties: '${{parent.inputs.system_properties}}' text_generation_finetune: type: command - component: azureml:text_generation_finetune:0.0.65 + component: azureml:text_generation_finetune:0.0.67 compute: '${{parent.inputs.compute_finetune}}' distribution: type: pytorch @@ -667,7 +667,7 @@ jobs: pytorch_model_folder: '${{parent.outputs.pytorch_model_folder}}' ft_nlp_model_converter: type: command - component: azureml:ft_nlp_model_converter:0.0.64 + component: azureml:ft_nlp_model_converter:0.0.67 compute: '${{parent.inputs.compute_finetune}}' resources: instance_type: '${{parent.inputs.instance_type_finetune}}' diff --git a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_standard_low/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_standard_low/spec.yaml index 39127a4e7a..77ab07def5 100644 --- a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_standard_low/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_standard_low/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json name: text_generation_pipeline_singularity_standard_low -version: 0.0.67 +version: 0.0.68 type: pipeline display_name: Text Generation Pipeline Singularity Standard Low description: Pipeline component for text generation @@ -520,7 +520,7 @@ outputs: jobs: ft_nlp_common_validation: type: command - component: azureml:ft_nlp_common_validation:0.0.64 + component: azureml:ft_nlp_common_validation:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -563,7 +563,7 @@ jobs: auto_find_batch_size: '${{parent.inputs.auto_find_batch_size}}' text_generation_model_import: type: command - component: azureml:text_generation_model_import:0.0.65 + component: azureml:text_generation_model_import:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -580,7 +580,7 @@ jobs: system_properties: '${{parent.inputs.system_properties}}' text_generation_datapreprocess: type: command - component: azureml:text_generation_datapreprocess:0.0.65 + component: azureml:text_generation_datapreprocess:0.0.67 compute: '${{parent.inputs.compute_preprocess}}' resources: instance_type: '${{parent.inputs.instance_type_preprocess}}' @@ -605,7 +605,7 @@ jobs: system_properties: '${{parent.inputs.system_properties}}' text_generation_finetune: type: command - component: azureml:text_generation_finetune:0.0.65 + component: azureml:text_generation_finetune:0.0.67 compute: '${{parent.inputs.compute_finetune}}' distribution: type: pytorch @@ -667,7 +667,7 @@ jobs: pytorch_model_folder: '${{parent.outputs.pytorch_model_folder}}' ft_nlp_model_converter: type: command - component: azureml:ft_nlp_model_converter:0.0.64 + component: azureml:ft_nlp_model_converter:0.0.67 compute: '${{parent.inputs.compute_finetune}}' resources: instance_type: '${{parent.inputs.instance_type_finetune}}' diff --git a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_standard_medium/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_standard_medium/spec.yaml index a1acc6a90a..1f1244dcd7 100644 --- a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_standard_medium/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/text_generation_singularity_standard_medium/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json name: text_generation_pipeline_singularity_standard_medium -version: 0.0.67 +version: 0.0.68 type: pipeline display_name: Text Generation Pipeline Singularity Standard Medium description: Pipeline component for text generation @@ -520,7 +520,7 @@ outputs: jobs: ft_nlp_common_validation: type: command - component: azureml:ft_nlp_common_validation:0.0.64 + component: azureml:ft_nlp_common_validation:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -563,7 +563,7 @@ jobs: auto_find_batch_size: '${{parent.inputs.auto_find_batch_size}}' text_generation_model_import: type: command - component: azureml:text_generation_model_import:0.0.65 + component: azureml:text_generation_model_import:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -580,7 +580,7 @@ jobs: system_properties: '${{parent.inputs.system_properties}}' text_generation_datapreprocess: type: command - component: azureml:text_generation_datapreprocess:0.0.65 + component: azureml:text_generation_datapreprocess:0.0.67 compute: '${{parent.inputs.compute_preprocess}}' resources: instance_type: '${{parent.inputs.instance_type_preprocess}}' @@ -605,7 +605,7 @@ jobs: system_properties: '${{parent.inputs.system_properties}}' text_generation_finetune: type: command - component: azureml:text_generation_finetune:0.0.65 + component: azureml:text_generation_finetune:0.0.67 compute: '${{parent.inputs.compute_finetune}}' distribution: type: pytorch @@ -667,7 +667,7 @@ jobs: pytorch_model_folder: '${{parent.outputs.pytorch_model_folder}}' ft_nlp_model_converter: type: command - component: azureml:ft_nlp_model_converter:0.0.64 + component: azureml:ft_nlp_model_converter:0.0.67 compute: '${{parent.inputs.compute_finetune}}' resources: instance_type: '${{parent.inputs.instance_type_finetune}}' diff --git a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/token_classification/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/token_classification/spec.yaml index ba70a47860..8adda93279 100644 --- a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/token_classification/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/token_classification/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json name: token_classification_pipeline -version: 0.0.67 +version: 0.0.68 type: pipeline display_name: Token Classification Pipeline description: Pipeline component to finetune Hugging Face pretrained models for token classification task. The component supports optimizations such as LoRA, Deepspeed and ONNXRuntime for performance enhancement. See [docs](https://aka.ms/azureml/components/token_classification_pipeline) to learn more. @@ -507,7 +507,7 @@ outputs: jobs: ft_nlp_common_validation: type: command - component: azureml:ft_nlp_common_validation:0.0.64 + component: azureml:ft_nlp_common_validation:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -544,7 +544,7 @@ jobs: auto_find_batch_size: '${{parent.inputs.auto_find_batch_size}}' token_classification_model_import: type: command - component: azureml:token_classification_model_import:0.0.65 + component: azureml:token_classification_model_import:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -555,7 +555,7 @@ jobs: validation_output: '${{parent.jobs.ft_nlp_common_validation.outputs.validation_info}}' token_classification_datapreprocess: type: command - component: azureml:token_classification_datapreprocess:0.0.65 + component: azureml:token_classification_datapreprocess:0.0.67 compute: '${{parent.inputs.compute_preprocess}}' resources: instance_type: '${{parent.inputs.instance_type_preprocess}}' @@ -574,7 +574,7 @@ jobs: model_selector_output: '${{parent.jobs.token_classification_model_import.outputs.output_dir}}' token_classification_finetune: type: command - component: azureml:token_classification_finetune:0.0.65 + component: azureml:token_classification_finetune:0.0.67 compute: '${{parent.inputs.compute_finetune}}' distribution: type: pytorch @@ -631,7 +631,7 @@ jobs: pytorch_model_folder: '${{parent.outputs.pytorch_model_folder}}' ft_nlp_model_converter: type: command - component: azureml:ft_nlp_model_converter:0.0.64 + component: azureml:ft_nlp_model_converter:0.0.67 compute: '${{parent.inputs.compute_finetune}}' resources: instance_type: '${{parent.inputs.instance_type_finetune}}' @@ -641,7 +641,7 @@ jobs: mlflow_model_folder: '${{parent.outputs.mlflow_model_folder}}' model_prediction: type: command - component: azureml:model_prediction:0.0.35 + component: azureml:model_prediction_with_container:0.0.5 compute: '${{parent.inputs.compute_model_evaluation}}' resources: instance_type: '${{parent.inputs.instance_type_model_evaluation}}' @@ -650,10 +650,7 @@ jobs: test_data: '${{parent.jobs.token_classification_datapreprocess.outputs.output_dir}}' label_column_name: '${{parent.inputs.tag_key}}' input_column_names: '${{parent.inputs.token_key}}' - batch_size: '${{parent.inputs.per_device_train_batch_size}}' - device: auto mlflow_model: '${{parent.jobs.ft_nlp_model_converter.outputs.mlflow_model_folder}}' - evaluation_config: '${{parent.inputs.evaluation_config}}' evaluation_config_params: '${{parent.inputs.evaluation_config_params}}' compute_metrics: type: command diff --git a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/translation/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/translation/spec.yaml index 8bfe32bc35..80cbfc57dd 100644 --- a/assets/training/finetune_acft_hf_nlp/components/pipeline_components/translation/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/translation/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json name: translation_pipeline -version: 0.0.67 +version: 0.0.68 type: pipeline display_name: Translation Pipeline description: Pipeline component to finetune Hugging Face pretrained models for translation task. The component supports optimizations such as LoRA, Deepspeed and ONNXRuntime for performance enhancement. See [docs](https://aka.ms/azureml/components/translation_pipeline) to learn more. @@ -504,7 +504,7 @@ outputs: jobs: ft_nlp_common_validation: type: command - component: azureml:ft_nlp_common_validation:0.0.64 + component: azureml:ft_nlp_common_validation:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -541,7 +541,7 @@ jobs: auto_find_batch_size: '${{parent.inputs.auto_find_batch_size}}' translation_model_import: type: command - component: azureml:translation_model_import:0.0.65 + component: azureml:translation_model_import:0.0.67 compute: '${{parent.inputs.compute_model_import}}' resources: instance_type: '${{parent.inputs.instance_type_model_import}}' @@ -552,7 +552,7 @@ jobs: validation_output: '${{parent.jobs.ft_nlp_common_validation.outputs.validation_info}}' translation_datapreprocess: type: command - component: azureml:translation_datapreprocess:0.0.65 + component: azureml:translation_datapreprocess:0.0.67 compute: '${{parent.inputs.compute_preprocess}}' resources: instance_type: '${{parent.inputs.instance_type_preprocess}}' @@ -571,7 +571,7 @@ jobs: model_selector_output: '${{parent.jobs.translation_model_import.outputs.output_dir}}' translation_finetune: type: command - component: azureml:translation_finetune:0.0.65 + component: azureml:translation_finetune:0.0.67 compute: '${{parent.inputs.compute_finetune}}' distribution: type: pytorch @@ -628,7 +628,7 @@ jobs: pytorch_model_folder: '${{parent.outputs.pytorch_model_folder}}' ft_nlp_model_converter: type: command - component: azureml:ft_nlp_model_converter:0.0.64 + component: azureml:ft_nlp_model_converter:0.0.67 compute: '${{parent.inputs.compute_finetune}}' resources: instance_type: '${{parent.inputs.instance_type_finetune}}' @@ -638,7 +638,7 @@ jobs: mlflow_model_folder: '${{parent.outputs.mlflow_model_folder}}' model_prediction: type: command - component: azureml:model_prediction:0.0.35 + component: azureml:model_prediction_with_container:0.0.5 compute: '${{parent.inputs.compute_model_evaluation}}' resources: instance_type: '${{parent.inputs.instance_type_model_evaluation}}' @@ -647,10 +647,7 @@ jobs: test_data: '${{parent.jobs.translation_datapreprocess.outputs.output_dir}}' label_column_name: '${{parent.inputs.target_lang}}' input_column_names: '${{parent.inputs.source_lang}}' - batch_size: '${{parent.inputs.per_device_train_batch_size}}' - device: auto mlflow_model: '${{parent.jobs.ft_nlp_model_converter.outputs.mlflow_model_folder}}' - evaluation_config: '${{parent.inputs.evaluation_config}}' evaluation_config_params: '${{parent.inputs.evaluation_config_params}}' compute_metrics: type: command diff --git a/assets/training/finetune_acft_hf_nlp/components/preprocess/chat_completion/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/preprocess/chat_completion/spec.yaml index d5d17c72bf..05bd2d9ecd 100644 --- a/assets/training/finetune_acft_hf_nlp/components/preprocess/chat_completion/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/preprocess/chat_completion/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: chat_completion_datapreprocess -version: 0.0.65 +version: 0.0.67 type: command is_deterministic: True diff --git a/assets/training/finetune_acft_hf_nlp/components/preprocess/question_answering/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/preprocess/question_answering/spec.yaml index 7931496535..2f8cfadda6 100644 --- a/assets/training/finetune_acft_hf_nlp/components/preprocess/question_answering/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/preprocess/question_answering/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: question_answering_datapreprocess -version: 0.0.65 +version: 0.0.67 type: command is_deterministic: True diff --git a/assets/training/finetune_acft_hf_nlp/components/preprocess/summarization/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/preprocess/summarization/spec.yaml index 952d762f58..ddd77a7638 100644 --- a/assets/training/finetune_acft_hf_nlp/components/preprocess/summarization/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/preprocess/summarization/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: summarization_datapreprocess -version: 0.0.65 +version: 0.0.67 type: command is_deterministic: True diff --git a/assets/training/finetune_acft_hf_nlp/components/preprocess/text_classification/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/preprocess/text_classification/spec.yaml index fb52f2e7ee..9d3bda9104 100644 --- a/assets/training/finetune_acft_hf_nlp/components/preprocess/text_classification/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/preprocess/text_classification/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: text_classification_datapreprocess -version: 0.0.65 +version: 0.0.67 type: command is_deterministic: True diff --git a/assets/training/finetune_acft_hf_nlp/components/preprocess/text_generation/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/preprocess/text_generation/spec.yaml index 4163b8a0dd..580c4f5f35 100644 --- a/assets/training/finetune_acft_hf_nlp/components/preprocess/text_generation/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/preprocess/text_generation/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: text_generation_datapreprocess -version: 0.0.65 +version: 0.0.67 type: command is_deterministic: True diff --git a/assets/training/finetune_acft_hf_nlp/components/preprocess/token_classification/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/preprocess/token_classification/spec.yaml index 90a4227920..cfcd715e79 100644 --- a/assets/training/finetune_acft_hf_nlp/components/preprocess/token_classification/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/preprocess/token_classification/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: token_classification_datapreprocess -version: 0.0.65 +version: 0.0.67 type: command is_deterministic: True diff --git a/assets/training/finetune_acft_hf_nlp/components/preprocess/translation/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/preprocess/translation/spec.yaml index f870097cb3..9d4d2b17d6 100644 --- a/assets/training/finetune_acft_hf_nlp/components/preprocess/translation/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/preprocess/translation/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: translation_datapreprocess -version: 0.0.65 +version: 0.0.67 type: command is_deterministic: True diff --git a/assets/training/finetune_acft_hf_nlp/components/validation/common/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/validation/common/spec.yaml index 7f36eee96e..ead7371ab9 100644 --- a/assets/training/finetune_acft_hf_nlp/components/validation/common/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components/validation/common/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: ft_nlp_common_validation -version: 0.0.65 +version: 0.0.67 type: command is_deterministic: True diff --git a/assets/training/model_evaluation/components/distributed_model_prediction/spec.yaml b/assets/training/model_evaluation/components/distributed_model_prediction/spec.yaml index 215f391200..e489b69cec 100644 --- a/assets/training/model_evaluation/components/distributed_model_prediction/spec.yaml +++ b/assets/training/model_evaluation/components/distributed_model_prediction/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json name: model_prediction_with_container -version: 0.0.4 +version: 0.0.5 type: command display_name: Distributed Model Prediction description: "Optimized Distributed inference component for LLMs." diff --git a/assets/training/model_evaluation/src_distributed/model_prediction.py b/assets/training/model_evaluation/src_distributed/model_prediction.py index 7d819b9f6a..c2e8d69f2b 100644 --- a/assets/training/model_evaluation/src_distributed/model_prediction.py +++ b/assets/training/model_evaluation/src_distributed/model_prediction.py @@ -89,6 +89,7 @@ def postprocess(self, result): """ y_pred_df, y_test_df, perf_df, y_pred_proba_df = pd.DataFrame(), pd.DataFrame(), pd.DataFrame(), pd.DataFrame() for y_pred, y_test, perf, pred_probas in result: + logger.info(f"Type here as well: {type(y_test)}") y_pred_df = pd.concat([y_pred_df, y_pred], axis=0) y_test_df = pd.concat([y_test_df, y_test], axis=0) perf_df = pd.concat([perf_df, perf], axis=0) @@ -121,8 +122,8 @@ def _make_chat_completion_data(self, input_df, last_chats, col_name): input_rows = input_df.values.tolist() for ind, datarow in enumerate(input_rows): conversation = datarow[0] - conversation.append({"role":"assistant", "content":last_chats[ind]}) - appended_data[col_name].append(conversation) + updated_conversation = conversation + [{"role":"assistant", "content":last_chats[ind]}] + appended_data[col_name].append(updated_conversation) return pd.DataFrame(appended_data) @@ -153,7 +154,10 @@ def predict_single(self, data): else: input_texts = [i[0] if len(i) == 1 else [j.strip() for j in i] for i in input_texts] if self.task_type == SupportedTask.TEXT_GENERATION: - self.extra_params.update({"return_full_text": False}) + if "return_full_text" not in self.extra_params: + self.extra_params["return_full_text"] = False + if self.task_type == SupportedTask.QnA: + self.extra_params.update({"truncation":"longest_first"}) data = { "input_data": { "input_string": input_texts, @@ -162,6 +166,17 @@ def predict_single(self, data): } payload = MIRPayload.from_dict(data) payload.update_params(get_generator_params(payload.params)) + try: + inference_results = self.engine.run(payload) + except: + try: + logger.info("Failed with longest_first") + payload.params["truncation"] = "only_second" + inference_results = self.engine.run(payload) + except: + logger.info("Failed with only first") + payload.params["truncation"] = "only_first" + inference_results = self.engine.run(payload) @@ -181,8 +196,19 @@ def predict_single(self, data): start_ms = time.time() * 1000 inference_results = self.engine.run(payload) end_ms = time.time() * 1000 - outputs = [res.response for i, res in enumerate(inference_results)] + if self.task_type == SupportedTask.TEXT_GENERATION: + outputs = [] + for gt, res in zip(input_texts, inference_results): + if gt in res.response: + outputs.append(res.response[len(gt):]) + else: + outputs.append(res.response) + else: + outputs = [res.response for i, res in enumerate(inference_results)] pred_probas = [res.scores for res in inference_results] + + + perf_data = [{ PerformanceColumns.BATCH_SIZE_COLUMN_NAME: len(input_texts), PerformanceColumns.START_TIME_COLUMN_NAME: datetime.fromtimestamp(start_ms / 1000, timezone.utc).isoformat(), @@ -195,12 +221,15 @@ def predict_single(self, data): } for gt, pred in zip(input_texts, outputs)] pred_proba_df = pd.DataFrame(pred_probas, index=X_test.index) perf_data = pd.DataFrame(perf_data) + if self.task_type == SupportedTask.CHAT_COMPLETION or self.task_type == TaskType.CONVERSATIONAL: - pred_df = self._make_chat_completion_data(X_test, outputs, + pred_df = self._make_chat_completion_data(X_test.copy(deep=True), outputs, col_name=ChatCompletionConstants.OUTPUT_FULL_CONVERSATION) pred_df[ChatCompletionConstants.OUTPUT] = outputs - y_test = self._make_chat_completion_data(X_test, y_test, col_name="ground_truth") + y_test = pd.DataFrame(y_test, columns=["ground_truth"], index=X_test.index) + # y_test = self._make_chat_completion_data(X_test.copy(deep=True), y_test, col_name="ground_truth") return pred_df, y_test, perf_data, pred_proba_df + pred_df = pd.DataFrame(outputs, index=X_test.index, columns=["prediction"]) if isinstance(y_test, pd.Series): y_test = y_test.to_frame() @@ -460,15 +489,11 @@ def main(): data_path = args.data logger.info(f"Torch Current Device Count:{torch.cuda.device_count()}") - logger.info(f"Got Params: {args.parameters}") - logger.info(f"Params type: {type(args.parameters)}") - #logger.info(f"Evaled params: {eval(args.parameters)}") extra_params.update(json.loads(args.parameters)) + logger.info(f"Got Model Path: {args.mlflow_model}") - task_type = args.task - input_column_names, label_column_name, extra_y_test_cols = validate_and_get_columns(vars(args)) try: @@ -555,15 +580,12 @@ def main(): predictor = Predictor(g_fmscorer, task_type, extra_params, num_replicas, label_column_name, tokenizer, extra_y_test_cols) collated_res = [{} for i in range(distributed_state.num_processes)] with distributed_state.split_between_processes(full_data) as proc_data: - #indices = proc_data[0].index y_pred_proc, y_test_proc, y_perf_proc, y_pred_proba = predictor.predict(proc_data) - #logger.info(f"Indices: {indices}") proc_res = {"predictions": y_pred_proc, "ground_truth": y_test_proc, "perf": y_perf_proc, "pred_probas": y_pred_proba} dist.all_gather_object(object_list=collated_res, obj=proc_res) logger.info("Waiting for all processes.....") distributed_state.wait_for_everyone() logger.info(f"Collated Results Lengths: {[len(i) for i in collated_res]}") - logger.info(f"Type of each key: {[(k, type(v), len(v)) for k, v in collated_res[0].items()]}") y_pred_df, y_test_df, y_perf_df, y_pred_proba_df = _gather_predictions(collated_res) if task_type != SupportedTask.CHAT_COMPLETION and task_type != TaskType.CONVERSATIONAL: diff --git a/assets/training/scripts/_component_upgrade/README.md b/assets/training/scripts/_component_upgrade/README.md new file mode 100644 index 0000000000..2b5ae799e4 --- /dev/null +++ b/assets/training/scripts/_component_upgrade/README.md @@ -0,0 +1,8 @@ +# Introduction +This doc talks about the pre-requisites for component release: + +- From the root of this repo, run the following to install the dependencies: `conda env create -f assets/training/scripts/_component_upgrade/dev_conda_env.yaml`. +- From the root of this repo, run the following to upgrade the components: `python assets/training/scripts/_component_upgrade/main.py`. +- After successful completion, the script will: + - print the regular expression, copy this since this wil be required in the build pipeline. + - generate changes. Create a PR and merge your changes into main branch. Wait for 10 minutes after PR merge and then kick off the build pipeline. diff --git a/assets/training/scripts/_component_upgrade/components.yaml b/assets/training/scripts/_component_upgrade/components.yaml new file mode 100644 index 0000000000..c83a40d3fc --- /dev/null +++ b/assets/training/scripts/_component_upgrade/components.yaml @@ -0,0 +1,72 @@ +# This file contains the list of component's name from spec.yaml that needs to be auto upgraded. + +# Instructions: +# - Add the component name from the spec.yaml file that needs to be auto upgraded. +# - pipeline component must be mentioned after all of its sub-components have been mentioned. + +component: + # Forecasting + - automl_hts_inference_setup_step + - automl_hts_prs_inference_step + - automl_hts_inference_collect_step + - automl_hts_inference + - automl_hts_training_setup_step + - automl_hts_automl_training_step + - automl_hts_data_aggregation_step + - automl_hts_training_collect_step + - automl_hts_training + - automl_many_models_inference_setup_step + - automl_many_models_inference_step + - automl_many_models_inference_collect_step + - automl_many_models_inference + - automl_many_models_training_setup_step + - automl_many_models_training_step + - automl_many_models_training_collection_step + - automl_many_models_training + - automl_tabular_data_partitioning + - automl_forecasting_inference + + # FT Common + - finetune_common_validation + + # FT Vision + - transformers_image_classification_finetune + - mmdetection_image_objectdetection_instancesegmentation_finetune + - image_framework_selector + - transformers_image_classification_model_import + - mmdetection_image_objectdetection_instancesegmentation_model_import + - image_model_output_selector + - train_image_classification_model + - train_instance_segmentation_model + - train_object_detection_model + - image_classification_pipeline + - transformers_image_classification_pipeline + - image_instance_segmentation_pipeline + - mmdetection_image_objectdetection_instancesegmentation_pipeline + - image_object_detection_pipeline + + # FT NLP + - text_classification_finetune + - token_classification_finetune + - text_classification_model_import + - token_classification_model_import + - nlp_multiclass_datapreprocessing + - nlp_multilabel_datapreprocessing + - nlp_ner_datapreprocessing + - nlp_textclassification_multiclass + - nlp_textclassification_multilabel + - nlp_textclassification_ner + + # Distillation + - batch_benchmark_config_generator + - batch_score_oss + - oss_distillation_generate_data + - oss_distillation_generate_data_batch_preprocess + - oss_distillation_generate_data_batch_postprocess + - oss_distillation_data_generation_batch_scoring_selector + - oss_distillation_data_generation_file_selector + - oss_distillation_data_generation_validation_file_checker + - oss_distillation_validate_pipeline + - oss_distillation_batchscoring_datagen_pipeline + - oss_distillation_seq_scoring_pipeline + - oss_distillation_pipeline \ No newline at end of file diff --git a/assets/training/scripts/_component_upgrade/dev_conda_env.yaml b/assets/training/scripts/_component_upgrade/dev_conda_env.yaml new file mode 100644 index 0000000000..3452c5298f --- /dev/null +++ b/assets/training/scripts/_component_upgrade/dev_conda_env.yaml @@ -0,0 +1,13 @@ +channels: + - conda-forge +dependencies: + - python=3.11.0 + - pip + - pip: + ## src requirements + - azure-ai-ml + - azure-identity + - azure-core + - tqdm + - pyyaml +name: component_upgrade diff --git a/assets/training/scripts/_component_upgrade/main.py b/assets/training/scripts/_component_upgrade/main.py new file mode 100644 index 0000000000..b6d8613453 --- /dev/null +++ b/assets/training/scripts/_component_upgrade/main.py @@ -0,0 +1,245 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + +""" +Script to upgrade components before release. + +This script updates all the required parts in a component and finally +prints the regular expression to be used in the release. Components +are read from components.yaml file. +""" + +import os +import re +from typing import List, Union, Dict, Any, Tuple, Optional, Set +from concurrent.futures import ThreadPoolExecutor +from pathlib import Path +import time + +from tqdm import tqdm +from yaml import safe_load +from azure.ai.ml.constants._common import AzureMLResourceType +from azure.ai.ml.constants._component import NodeType +from azure.ai.ml import MLClient +from azure.identity import DefaultAzureCredential +from azure.core.exceptions import ResourceNotFoundError + + +ASSETS_DIR = Path(__file__).resolve().parents[3] +REG_ML_CLIENT = MLClient(credential=DefaultAzureCredential(), registry_name="azureml") +FIRST_VERSION = "0.0.1" +CACHE: Dict[str, str] = {} + +_components_yaml_path = Path(__file__).resolve().parents[0] / "components.yaml" +with open(_components_yaml_path, "r") as file: + OWNED_COMPONENT_NAMES: Set[str] = set(safe_load(file)["component"]) + + +def _get_components_spec_path() -> List[str]: + """Get all components spec path that requires update.""" + # get required components' spec paths + component_paths = [] + for root, _, files in os.walk(ASSETS_DIR): + if "spec.yaml" in files: + asset_path = os.path.join(root, "spec.yaml") + with open(asset_path, "r") as file: + spec = safe_load(file) + if spec.get("name", None) not in OWNED_COMPONENT_NAMES: + continue + component_paths.append(asset_path) + return component_paths + + +def _get_bumped_version(version: str, increment: bool = True) -> str: + """ + Return bumped version. + + :param version: Version to bump. + :param increment: If True, increment the last part of the version. Else, decrement the last part of the version. + :return: Bumped version. + """ + version_arr = list(map(int, version.split("."))) + if increment: + version_arr[-1] += 1 + else: + version_arr[-1] -= 1 + return ".".join(map(str, version_arr)) + + +def _get_asset_latest_version( + asset_name: str, + asset_type: Union[AzureMLResourceType.COMPONENT, AzureMLResourceType.ENVIRONMENT], +) -> Optional[str]: + """Get component latest version.""" + global CACHE + if asset_name in CACHE: + return str(CACHE[asset_name]) + try: + if asset_type == AzureMLResourceType.COMPONENT: + asset = REG_ML_CLIENT.components.get(name=asset_name, label="latest") + elif asset_type == AzureMLResourceType.ENVIRONMENT: + asset = REG_ML_CLIENT.environments.get(name=asset_name, label="latest") + except ResourceNotFoundError: + return None + CACHE[asset_name] = asset.version + return asset.version + + +def __replace_pipeline_comp_job_version(match: re.Match) -> str: + """Replace version for job in pipeline component.""" + component_name_with_registry = match.group(1) + _component_name = component_name_with_registry.split(":")[-1] + latest_version = _get_asset_latest_version( + asset_name=_component_name, + asset_type=AzureMLResourceType.COMPONENT, + ) + if latest_version is None: + new_version = match.group(2) + new_version = new_version if new_version is not None else FIRST_VERSION + else: + if _component_name in OWNED_COMPONENT_NAMES: + new_version = _get_bumped_version(latest_version) + else: + new_version = latest_version + return f"component: {component_name_with_registry}:{new_version}" + + +def _upgrade_component_env(spec: Dict[str, Any], spec_str: str) -> str: + """Upgrade component's environment.""" + type = spec["type"] + + if type == NodeType.COMMAND or type == NodeType.PARALLEL: + if type == NodeType.COMMAND: + env_arr = spec["environment"].split("/") + elif type == NodeType.PARALLEL: + env_arr = spec["task"]["environment"].split("/") + else: + raise ValueError(f"Invalid type {type}.") + + latest_version = _get_asset_latest_version( + asset_name=env_arr[-3], + asset_type=AzureMLResourceType.ENVIRONMENT, + ) + if latest_version is None: + latest_version = env_arr[-1] + + if env_arr[-1] == "latest": + env_arr[-2] = "versions" + env_arr[-1] = latest_version + spec_str = re.sub( + pattern=r"environment: .*", + repl=f"environment: {'/'.join(env_arr)}", + string=spec_str, + ) + + elif type == NodeType.PIPELINE: + spec_str = re.sub( + pattern=r"component: ([^:@\s]+:[^:@\s]+)(?::(\d+\.\d+\.\d+)|@latest)?", + repl=__replace_pipeline_comp_job_version, + string=spec_str, + ) + + return spec_str + + +def _upgrade_component( + component_path: str, +) -> Tuple[bool, Union[str, None], str, Optional[str]]: + """Upgrade component spec. + + :param component_path: Path to component spec. + :return: Tuple of (error, error_message, component_path, component_name). + """ + is_error = False + error = None + name = None + try: + with open(component_path, "r") as file: + spec = safe_load(file) + file.seek(0) + spec_str = file.read() + name = spec["name"] + + # bump component version + latest_version = _get_asset_latest_version( + asset_name=name, + asset_type=AzureMLResourceType.COMPONENT, + ) + if latest_version is None: + new_version = FIRST_VERSION + else: + new_version = _get_bumped_version(latest_version) + spec["version"] = new_version + spec_str = re.sub( + pattern=r"version: .*", repl=f"version: {new_version}", string=spec_str + ) + + # bump component's environment only where version is hardcoded + spec_str = _upgrade_component_env(spec, spec_str) + + with open(component_path, "w") as file: + file.write(spec_str) + except Exception as e: + is_error = True + error = str(e) + return is_error, error, component_path, name + + +def main() -> None: + """Entry function.""" + component_spec_paths = _get_components_spec_path() + + max_allowed_threads = 1 + print( + f"\nUpgrading {len(component_spec_paths)} components with {max_allowed_threads} thread(s)... " + "\nPlease wait and check for errors." + ) + + start_time = time.time() + with ThreadPoolExecutor(max_workers=max_allowed_threads) as executor: + results = list( + tqdm( + executor.map(_upgrade_component, component_spec_paths), + total=len(component_spec_paths), + ) + ) + end_time = time.time() + + # check for errors + error_count = 0 + error_mssgs = [] + regex = "component/(" + for is_error, error_mssg, _, comp_name in results: + if is_error: + error_count += 1 + mssg = ( + f"#{error_count}. Error in upgrading component '{comp_name}'. " + f"Error details: \n\n{error_mssg}" + ) + error_mssgs.append(mssg) + else: + regex += f"{comp_name}|" + # remove the last "|" and add the end of the regex + regex = regex[:-1] + ")/.+" + + # print errors + if error_count > 0: + print(f"\U0001F61E Errors found {error_count}:") + print( + "------------------------------------ERRORS------------------------------------" + ) + print("\n".join(error_mssgs)) + print( + "\n\nPlease fix the errors and re-run the script to get the regular expression." + ) + else: + print( + "\U0001F603 No errors found! Took {:.2f} seconds.".format( + end_time - start_time + ) + ) + print(f"\n\nRegular Expression: {regex}") + + +if __name__ == "__main__": + main() diff --git a/scripts/azureml-assets/CHANGELOG.md b/scripts/azureml-assets/CHANGELOG.md index 5b0b0a0589..f6619f0fd1 100644 --- a/scripts/azureml-assets/CHANGELOG.md +++ b/scripts/azureml-assets/CHANGELOG.md @@ -2,6 +2,10 @@ ### ๐Ÿš€ New Features +## 1.16.69 (2025-01-21) +### ๐Ÿ› Bugs Fixed +- [#3779](https://github.com/Azure/azureml-assets/pull/3779) Add azure-identity dependency to fix issue with azure-ai-ml dependency + ## 1.16.68 (2025-01-02) ### ๐Ÿš€ New Features - [#3714](https://github.com/Azure/azureml-assets/pull/3714) Block environment/image releases based on Ubuntu 20.04 diff --git a/scripts/azureml-assets/setup.py b/scripts/azureml-assets/setup.py index 8e92235660..818db935fb 100644 --- a/scripts/azureml-assets/setup.py +++ b/scripts/azureml-assets/setup.py @@ -7,7 +7,7 @@ setup( name="azureml-assets", - version="1.16.68", + version="1.16.69", description="Utilities for publishing assets to Azure Machine Learning system registries.", author="Microsoft Corp", packages=find_packages(), @@ -19,6 +19,7 @@ "marshmallow>=3.19", "tenacity>=8.2.2", "azure-ai-ml>=1.9.0", + "azure-identity>=1.16.0", ], python_requires=">=3.8,<4.0", license="MIT",