From 32f4026d7e7e2e1847f1b33e059f94643403e5be Mon Sep 17 00:00:00 2001 From: Anubha Jain <41411445+Anubha98@users.noreply.github.com> Date: Thu, 5 Dec 2024 12:26:17 +0530 Subject: [PATCH 01/31] llama-2-7b-chat-ft_config_update (#3648) Co-authored-by: Anubha Jain --- assets/models/system/Llama-2-7b-chat/spec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/models/system/Llama-2-7b-chat/spec.yaml b/assets/models/system/Llama-2-7b-chat/spec.yaml index 1e76fb2bc6..24b3e88396 100644 --- a/assets/models/system/Llama-2-7b-chat/spec.yaml +++ b/assets/models/system/Llama-2-7b-chat/spec.yaml @@ -61,4 +61,4 @@ tags: notes: "notes.md" evaluation: "evaluation.md" -version: 26 +version: 27 From 4e069548f351c20c793b5d4683d550a4b9f071ff Mon Sep 17 00:00:00 2001 From: Aishwary Gupta Date: Thu, 5 Dec 2024 23:14:43 +0530 Subject: [PATCH 02/31] Upgrade ubuntu base image for acft-hf-nlp-data-import Env to 22.04 (#3652) --- .../environments/data_import/context/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/training/finetune_acft_hf_nlp/environments/data_import/context/Dockerfile b/assets/training/finetune_acft_hf_nlp/environments/data_import/context/Dockerfile index a9eec64372..6ebc9c8384 100644 --- a/assets/training/finetune_acft_hf_nlp/environments/data_import/context/Dockerfile +++ b/assets/training/finetune_acft_hf_nlp/environments/data_import/context/Dockerfile @@ -1,5 +1,5 @@ # openmpi image -FROM mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04:{{latest-image-tag}} +FROM mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu22.04:{{latest-image-tag}} USER root From 2663ddc478f9f6be032c7e6d815d95536ce6d707 Mon Sep 17 00:00:00 2001 From: cassieesvelt <73311224+cassieesvelt@users.noreply.github.com> Date: Thu, 5 Dec 2024 15:55:40 -0800 Subject: [PATCH 03/31] fix name (#3654) --- assets/models/system/financial-reports-analysis/spec.yaml | 2 +- assets/models/system/supply-chain-trade-regulations/spec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/models/system/financial-reports-analysis/spec.yaml b/assets/models/system/financial-reports-analysis/spec.yaml index 6019babda2..2ac655c474 100644 --- a/assets/models/system/financial-reports-analysis/spec.yaml +++ b/assets/models/system/financial-reports-analysis/spec.yaml @@ -10,7 +10,7 @@ properties: SharedComputeCapacityEnabled: true tags: - author: microsoft + author: Microsoft Preview: "" Featured: "" languages: "en" diff --git a/assets/models/system/supply-chain-trade-regulations/spec.yaml b/assets/models/system/supply-chain-trade-regulations/spec.yaml index 35d3b6f031..e43f1385d6 100644 --- a/assets/models/system/supply-chain-trade-regulations/spec.yaml +++ b/assets/models/system/supply-chain-trade-regulations/spec.yaml @@ -10,7 +10,7 @@ properties: SharedComputeCapacityEnabled: true tags: - author: microsoft + author: Microsoft Preview: "" Featured: "" languages: "en" From df367ba6ac0cb8bd3f4380fdbf2e7746c6446e10 Mon Sep 17 00:00:00 2001 From: runhli <87873226+runhli@users.noreply.github.com> Date: Thu, 5 Dec 2024 16:46:33 -0800 Subject: [PATCH 04/31] bump azureml rag version to 0.2.37 (#3653) * bump azureml rag version to 0.2.37 * upgrade component version * update --- .../rag/components/crack_and_chunk/spec.yaml | 2 +- .../rag/components/crack_and_chunk_and_embed/spec.yaml | 2 +- .../components/crack_chunk_embed_index_and_register/spec.yaml | 2 +- .../large_language_models/rag/components/crawl_url/spec.yaml | 2 +- .../rag/components/create_faiss_index/spec.yaml | 2 +- .../rag/components/create_promptflow/spec.yaml | 2 +- .../rag/components/data_import_acs/spec.yaml | 2 +- .../rag/components/generate_embeddings/spec.yaml | 2 +- .../rag/components/generate_embeddings_parallel/spec.yaml | 2 +- .../large_language_models/rag/components/git_clone/spec.yaml | 2 +- .../rag/components/image_embed_index/spec.yaml | 2 +- .../rag/components/qa_data_generation/spec.yaml | 2 +- .../rag/components/register_mlindex_asset/spec.yaml | 2 +- .../rag/components/register_qa_data_asset/spec.yaml | 2 +- .../rag/components/update_acs_index/spec.yaml | 2 +- .../components/update_azure_cosmos_mongo_vcore_index/spec.yaml | 2 +- .../rag/components/update_milvus_index/spec.yaml | 2 +- .../rag/components/update_pinecone_index/spec.yaml | 2 +- .../rag/components/validate_deployments/spec.yaml | 2 +- .../rag/environments/rag/context/conda_dependencies.yaml | 2 +- .../rag_embeddings/context/conda_dependencies.yaml | 3 +-- 21 files changed, 21 insertions(+), 22 deletions(-) diff --git a/assets/large_language_models/rag/components/crack_and_chunk/spec.yaml b/assets/large_language_models/rag/components/crack_and_chunk/spec.yaml index ef1ebe4e0f..8363a3c15e 100644 --- a/assets/large_language_models/rag/components/crack_and_chunk/spec.yaml +++ b/assets/large_language_models/rag/components/crack_and_chunk/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.74 +version: 0.0.75 name: llm_rag_crack_and_chunk display_name: LLM - Crack and Chunk Data is_deterministic: true diff --git a/assets/large_language_models/rag/components/crack_and_chunk_and_embed/spec.yaml b/assets/large_language_models/rag/components/crack_and_chunk_and_embed/spec.yaml index 43fd7d7996..a71b648760 100644 --- a/assets/large_language_models/rag/components/crack_and_chunk_and_embed/spec.yaml +++ b/assets/large_language_models/rag/components/crack_and_chunk_and_embed/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.45 +version: 0.0.46 name: llm_rag_crack_and_chunk_and_embed display_name: LLM - Crack, Chunk and Embed Data is_deterministic: true diff --git a/assets/large_language_models/rag/components/crack_chunk_embed_index_and_register/spec.yaml b/assets/large_language_models/rag/components/crack_chunk_embed_index_and_register/spec.yaml index cc10430b44..7c022851a0 100644 --- a/assets/large_language_models/rag/components/crack_chunk_embed_index_and_register/spec.yaml +++ b/assets/large_language_models/rag/components/crack_chunk_embed_index_and_register/spec.yaml @@ -1,5 +1,5 @@ name: llm_rag_crack_chunk_embed_index_and_register -version: 0.0.33 +version: 0.0.34 tags: Preview: "" diff --git a/assets/large_language_models/rag/components/crawl_url/spec.yaml b/assets/large_language_models/rag/components/crawl_url/spec.yaml index 00f2357afa..f67e8b3d57 100644 --- a/assets/large_language_models/rag/components/crawl_url/spec.yaml +++ b/assets/large_language_models/rag/components/crawl_url/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.32 +version: 0.0.33 name: llm_rag_crawl_url display_name: LLM - Crawl URL to Retrieve Data is_deterministic: true diff --git a/assets/large_language_models/rag/components/create_faiss_index/spec.yaml b/assets/large_language_models/rag/components/create_faiss_index/spec.yaml index a15c093d7c..2b6f1a2aaa 100644 --- a/assets/large_language_models/rag/components/create_faiss_index/spec.yaml +++ b/assets/large_language_models/rag/components/create_faiss_index/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.72 +version: 0.0.73 name: llm_rag_create_faiss_index display_name: LLM - Create FAISS Index is_deterministic: true diff --git a/assets/large_language_models/rag/components/create_promptflow/spec.yaml b/assets/large_language_models/rag/components/create_promptflow/spec.yaml index 37dd402793..3b21a7850f 100644 --- a/assets/large_language_models/rag/components/create_promptflow/spec.yaml +++ b/assets/large_language_models/rag/components/create_promptflow/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.83 +version: 0.0.84 name: llm_rag_create_promptflow display_name: LLM - Create Prompt Flow is_deterministic: true diff --git a/assets/large_language_models/rag/components/data_import_acs/spec.yaml b/assets/large_language_models/rag/components/data_import_acs/spec.yaml index e267758493..021e1d1e45 100644 --- a/assets/large_language_models/rag/components/data_import_acs/spec.yaml +++ b/assets/large_language_models/rag/components/data_import_acs/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.68 +version: 0.0.69 name: llm_rag_data_import_acs display_name: LLM - Import Data from ACS is_deterministic: false diff --git a/assets/large_language_models/rag/components/generate_embeddings/spec.yaml b/assets/large_language_models/rag/components/generate_embeddings/spec.yaml index 613226a641..481223f8c0 100644 --- a/assets/large_language_models/rag/components/generate_embeddings/spec.yaml +++ b/assets/large_language_models/rag/components/generate_embeddings/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.67 +version: 0.0.68 name: llm_rag_generate_embeddings display_name: LLM - Generate Embeddings is_deterministic: true diff --git a/assets/large_language_models/rag/components/generate_embeddings_parallel/spec.yaml b/assets/large_language_models/rag/components/generate_embeddings_parallel/spec.yaml index 70d271c87a..0cd2b85726 100644 --- a/assets/large_language_models/rag/components/generate_embeddings_parallel/spec.yaml +++ b/assets/large_language_models/rag/components/generate_embeddings_parallel/spec.yaml @@ -4,7 +4,7 @@ type: parallel tags: Preview: "" -version: 0.0.73 +version: 0.0.74 name: llm_rag_generate_embeddings_parallel display_name: LLM - Generate Embeddings Parallel is_deterministic: true diff --git a/assets/large_language_models/rag/components/git_clone/spec.yaml b/assets/large_language_models/rag/components/git_clone/spec.yaml index 81a8e608a8..23cf96d082 100644 --- a/assets/large_language_models/rag/components/git_clone/spec.yaml +++ b/assets/large_language_models/rag/components/git_clone/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.71 +version: 0.0.72 name: llm_rag_git_clone display_name: LLM - Clone Git Repo is_deterministic: true diff --git a/assets/large_language_models/rag/components/image_embed_index/spec.yaml b/assets/large_language_models/rag/components/image_embed_index/spec.yaml index 58d943fcd2..58f3803063 100644 --- a/assets/large_language_models/rag/components/image_embed_index/spec.yaml +++ b/assets/large_language_models/rag/components/image_embed_index/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.25 +version: 0.0.26 name: llm_rag_image_embed_index display_name: LLM - Embedding images with Florence is_deterministic: true diff --git a/assets/large_language_models/rag/components/qa_data_generation/spec.yaml b/assets/large_language_models/rag/components/qa_data_generation/spec.yaml index e04eda0a18..68f80d54fe 100644 --- a/assets/large_language_models/rag/components/qa_data_generation/spec.yaml +++ b/assets/large_language_models/rag/components/qa_data_generation/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.71 +version: 0.0.72 name: llm_rag_qa_data_generation display_name: LLM - Generate QnA Test Data is_deterministic: true diff --git a/assets/large_language_models/rag/components/register_mlindex_asset/spec.yaml b/assets/large_language_models/rag/components/register_mlindex_asset/spec.yaml index 485467b354..a0facd583f 100644 --- a/assets/large_language_models/rag/components/register_mlindex_asset/spec.yaml +++ b/assets/large_language_models/rag/components/register_mlindex_asset/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.71 +version: 0.0.72 name: llm_rag_register_mlindex_asset display_name: LLM - Register Vector Index Asset is_deterministic: true diff --git a/assets/large_language_models/rag/components/register_qa_data_asset/spec.yaml b/assets/large_language_models/rag/components/register_qa_data_asset/spec.yaml index a612b39b7e..d78951ee6e 100644 --- a/assets/large_language_models/rag/components/register_qa_data_asset/spec.yaml +++ b/assets/large_language_models/rag/components/register_qa_data_asset/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.64 +version: 0.0.65 name: llm_rag_register_qa_data_asset display_name: LLM - Register QA Generation Data Asset is_deterministic: true diff --git a/assets/large_language_models/rag/components/update_acs_index/spec.yaml b/assets/large_language_models/rag/components/update_acs_index/spec.yaml index cd6db75b8c..a884bd2b74 100644 --- a/assets/large_language_models/rag/components/update_acs_index/spec.yaml +++ b/assets/large_language_models/rag/components/update_acs_index/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.71 +version: 0.0.72 name: llm_rag_update_acs_index display_name: LLM - Update ACS Index is_deterministic: true diff --git a/assets/large_language_models/rag/components/update_azure_cosmos_mongo_vcore_index/spec.yaml b/assets/large_language_models/rag/components/update_azure_cosmos_mongo_vcore_index/spec.yaml index 5dd0f21665..7085f52acf 100644 --- a/assets/large_language_models/rag/components/update_azure_cosmos_mongo_vcore_index/spec.yaml +++ b/assets/large_language_models/rag/components/update_azure_cosmos_mongo_vcore_index/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.27 +version: 0.0.28 name: llm_rag_update_cosmos_mongo_vcore_index display_name: LLM - Update Azure Cosmos Mongo vCore Index is_deterministic: true diff --git a/assets/large_language_models/rag/components/update_milvus_index/spec.yaml b/assets/large_language_models/rag/components/update_milvus_index/spec.yaml index 665fc2fbf6..7faaa4a1db 100644 --- a/assets/large_language_models/rag/components/update_milvus_index/spec.yaml +++ b/assets/large_language_models/rag/components/update_milvus_index/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.27 +version: 0.0.28 name: llm_rag_update_milvus_index display_name: LLM - Update Milvus Index is_deterministic: true diff --git a/assets/large_language_models/rag/components/update_pinecone_index/spec.yaml b/assets/large_language_models/rag/components/update_pinecone_index/spec.yaml index 0f71073eea..dfd99646fb 100644 --- a/assets/large_language_models/rag/components/update_pinecone_index/spec.yaml +++ b/assets/large_language_models/rag/components/update_pinecone_index/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.39 +version: 0.0.40 name: llm_rag_update_pinecone_index display_name: LLM - Update Pinecone Index is_deterministic: true diff --git a/assets/large_language_models/rag/components/validate_deployments/spec.yaml b/assets/large_language_models/rag/components/validate_deployments/spec.yaml index 5b66b1eb8e..70e84e3408 100644 --- a/assets/large_language_models/rag/components/validate_deployments/spec.yaml +++ b/assets/large_language_models/rag/components/validate_deployments/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.77 +version: 0.0.78 name: llm_rag_validate_deployments display_name: LLM - Validate Deployments is_deterministic: false diff --git a/assets/large_language_models/rag/environments/rag/context/conda_dependencies.yaml b/assets/large_language_models/rag/environments/rag/context/conda_dependencies.yaml index aebbf3210e..c8a4fbd8f0 100644 --- a/assets/large_language_models/rag/environments/rag/context/conda_dependencies.yaml +++ b/assets/large_language_models/rag/environments/rag/context/conda_dependencies.yaml @@ -8,7 +8,7 @@ dependencies: - scikit-learn - pip: # RAG package - - azureml-rag[azure,langchain,cognitive_search,data_generation,pinecone,milvus,azure_cosmos_mongo_vcore,azure_cosmos_nosql]==0.2.36 + - azureml-rag[azure,langchain,cognitive_search,data_generation,pinecone,milvus,azure_cosmos_mongo_vcore,azure_cosmos_nosql]==0.2.37 # Azure - azure-ai-formrecognizer==3.3.1 - azure-identity=={{latest-pypi-version}} diff --git a/assets/large_language_models/rag/environments/rag_embeddings/context/conda_dependencies.yaml b/assets/large_language_models/rag/environments/rag_embeddings/context/conda_dependencies.yaml index 706beebd25..3551dafdbe 100644 --- a/assets/large_language_models/rag/environments/rag_embeddings/context/conda_dependencies.yaml +++ b/assets/large_language_models/rag/environments/rag_embeddings/context/conda_dependencies.yaml @@ -7,7 +7,7 @@ dependencies: - pip=24.0 - pip: # RAG package - - azureml-rag[azure,faiss,langchain,cognitive_search,document_parsing,data_generation,pinecone,milvus,azure_cosmos_mongo_vcore,azure_cosmos_nosql]==0.2.36 + - azureml-rag[azure,faiss,langchain,cognitive_search,document_parsing,data_generation,pinecone,milvus,azure_cosmos_mongo_vcore,azure_cosmos_nosql]==0.2.37 # Azure AI - azure-ai-formrecognizer==3.3.1 # Azure @@ -36,7 +36,6 @@ dependencies: - mlflow-skinny==2.3.2 - msal~=1.31.0 - msrest>=0.6.18 - - nltk==3.9.1 - openai>=0.27.4 - pandas>=1 - polling2~=0.5.0 From 89a0b46f2a6071580b83ba6be9c520889299159c Mon Sep 17 00:00:00 2001 From: runhli <87873226+runhli@users.noreply.github.com> Date: Thu, 5 Dec 2024 21:22:31 -0800 Subject: [PATCH 05/31] bump versions (#3656) --- .../data_ingestion_dataset_to_acs_basic/spec.yaml | 12 ++++++------ .../data_ingestion_dataset_to_acs_user_id/spec.yaml | 12 ++++++------ .../data_ingestion_dataset_to_faiss_basic/spec.yaml | 12 ++++++------ .../spec.yaml | 12 ++++++------ .../rag/components/crack_and_chunk/spec.yaml | 2 +- .../components/crack_and_chunk_and_embed/spec.yaml | 2 +- .../crack_chunk_embed_index_and_register/spec.yaml | 2 +- .../rag/components/crawl_url/spec.yaml | 2 +- .../rag/components/create_faiss_index/spec.yaml | 2 +- .../rag/components/create_promptflow/spec.yaml | 2 +- .../rag/components/data_import_acs/spec.yaml | 2 +- .../rag/components/generate_embeddings/spec.yaml | 2 +- .../generate_embeddings_parallel/spec.yaml | 2 +- .../rag/components/git_clone/spec.yaml | 2 +- .../rag/components/image_embed_index/spec.yaml | 2 +- .../rag/components/qa_data_generation/spec.yaml | 2 +- .../rag/components/register_mlindex_asset/spec.yaml | 2 +- .../rag/components/register_qa_data_asset/spec.yaml | 2 +- .../rag/components/update_acs_index/spec.yaml | 2 +- .../update_azure_cosmos_mongo_vcore_index/spec.yaml | 2 +- .../rag/components/update_milvus_index/spec.yaml | 2 +- .../rag/components/update_pinecone_index/spec.yaml | 2 +- .../rag/components/validate_deployments/spec.yaml | 2 +- 23 files changed, 43 insertions(+), 43 deletions(-) diff --git a/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_acs_basic/spec.yaml b/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_acs_basic/spec.yaml index 9b216aa4f3..72fde91b2f 100644 --- a/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_acs_basic/spec.yaml +++ b/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_acs_basic/spec.yaml @@ -4,7 +4,7 @@ type: pipeline tags: Preview: "" -version: 0.0.83 +version: 0.0.84 name: llm_ingest_dataset_to_acs_basic display_name: LLM - Dataset to ACS Pipeline is_deterministic: false @@ -110,7 +110,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_validate_deployments:0.0.77' + component: 'azureml:llm_rag_validate_deployments:0.0.79' identity: type: user_identity inputs: @@ -136,7 +136,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_crack_and_chunk:0.0.74' + component: 'azureml:llm_rag_crack_and_chunk:0.0.76' inputs: input_data: ${{parent.inputs.input_data}} input_glob: ${{parent.inputs.input_glob}} @@ -159,7 +159,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_generate_embeddings:0.0.67' + component: 'azureml:llm_rag_generate_embeddings:0.0.69' inputs: chunks_source: type: uri_folder @@ -209,7 +209,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_update_acs_index:0.0.71' + component: 'azureml:llm_rag_update_acs_index:0.0.73' inputs: embeddings: type: uri_folder @@ -229,7 +229,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_register_mlindex_asset:0.0.71' + component: 'azureml:llm_rag_register_mlindex_asset:0.0.73' inputs: storage_uri: ${{parent.jobs.create_acs_index_job.outputs.index}} asset_name: ${{parent.inputs.embeddings_dataset_name}} diff --git a/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_acs_user_id/spec.yaml b/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_acs_user_id/spec.yaml index fea24ea9c4..d414a1634f 100644 --- a/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_acs_user_id/spec.yaml +++ b/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_acs_user_id/spec.yaml @@ -4,7 +4,7 @@ type: pipeline tags: Preview: "" -version: 0.0.81 +version: 0.0.82 name: llm_ingest_dataset_to_acs_user_id display_name: LLM - Dataset to ACS Pipeline is_deterministic: false @@ -110,7 +110,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_validate_deployments:0.0.77' + component: 'azureml:llm_rag_validate_deployments:0.0.79' identity: type: user_identity inputs: @@ -136,7 +136,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_crack_and_chunk:0.0.74' + component: 'azureml:llm_rag_crack_and_chunk:0.0.76' identity: type: user_identity inputs: @@ -161,7 +161,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_generate_embeddings:0.0.67' + component: 'azureml:llm_rag_generate_embeddings:0.0.69' identity: type: user_identity inputs: @@ -215,7 +215,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_update_acs_index:0.0.71' + component: 'azureml:llm_rag_update_acs_index:0.0.73' identity: type: user_identity inputs: @@ -237,7 +237,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_register_mlindex_asset:0.0.71' + component: 'azureml:llm_rag_register_mlindex_asset:0.0.73' identity: type: user_identity inputs: diff --git a/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_faiss_basic/spec.yaml b/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_faiss_basic/spec.yaml index 85360d05d4..bb8c935573 100644 --- a/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_faiss_basic/spec.yaml +++ b/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_faiss_basic/spec.yaml @@ -4,7 +4,7 @@ type: pipeline tags: Preview: "" -version: 0.0.82 +version: 0.0.83 name: llm_ingest_dataset_to_faiss_basic display_name: LLM - Dataset to FAISS Pipeline is_deterministic: false @@ -102,7 +102,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_validate_deployments:0.0.77' + component: 'azureml:llm_rag_validate_deployments:0.0.79' identity: type: user_identity inputs: @@ -125,7 +125,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_crack_and_chunk:0.0.74' + component: 'azureml:llm_rag_crack_and_chunk:0.0.76' inputs: input_data: ${{parent.inputs.input_data}} input_glob: ${{parent.inputs.input_glob}} @@ -148,7 +148,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_generate_embeddings:0.0.67' + component: 'azureml:llm_rag_generate_embeddings:0.0.69' inputs: chunks_source: type: uri_folder @@ -198,7 +198,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_create_faiss_index:0.0.72' + component: 'azureml:llm_rag_create_faiss_index:0.0.74' inputs: embeddings: type: uri_folder @@ -216,7 +216,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_register_mlindex_asset:0.0.71' + component: 'azureml:llm_rag_register_mlindex_asset:0.0.73' inputs: storage_uri: ${{parent.jobs.create_faiss_index_job.outputs.index}} asset_name: ${{parent.inputs.embeddings_dataset_name}} diff --git a/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_faiss_user_id/spec.yaml b/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_faiss_user_id/spec.yaml index 30f46119bf..0bb7510fb5 100644 --- a/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_faiss_user_id/spec.yaml +++ b/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_faiss_user_id/spec.yaml @@ -4,7 +4,7 @@ type: pipeline tags: Preview: "" -version: 0.0.81 +version: 0.0.82 name: llm_ingest_dataset_to_faiss_user_id display_name: LLM - Dataset to FAISS Pipeline is_deterministic: false @@ -102,7 +102,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_validate_deployments:0.0.77' + component: 'azureml:llm_rag_validate_deployments:0.0.79' identity: type: user_identity inputs: @@ -125,7 +125,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_crack_and_chunk:0.0.74' + component: 'azureml:llm_rag_crack_and_chunk:0.0.76' identity: type: user_identity inputs: @@ -150,7 +150,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_generate_embeddings:0.0.67' + component: 'azureml:llm_rag_generate_embeddings:0.0.69' identity: type: user_identity inputs: @@ -204,7 +204,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_create_faiss_index:0.0.72' + component: 'azureml:llm_rag_create_faiss_index:0.0.74' identity: type: user_identity inputs: @@ -224,7 +224,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_register_mlindex_asset:0.0.71' + component: 'azureml:llm_rag_register_mlindex_asset:0.0.73' identity: type: user_identity inputs: diff --git a/assets/large_language_models/rag/components/crack_and_chunk/spec.yaml b/assets/large_language_models/rag/components/crack_and_chunk/spec.yaml index 8363a3c15e..c9765123e5 100644 --- a/assets/large_language_models/rag/components/crack_and_chunk/spec.yaml +++ b/assets/large_language_models/rag/components/crack_and_chunk/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.75 +version: 0.0.76 name: llm_rag_crack_and_chunk display_name: LLM - Crack and Chunk Data is_deterministic: true diff --git a/assets/large_language_models/rag/components/crack_and_chunk_and_embed/spec.yaml b/assets/large_language_models/rag/components/crack_and_chunk_and_embed/spec.yaml index a71b648760..4e6b615c7c 100644 --- a/assets/large_language_models/rag/components/crack_and_chunk_and_embed/spec.yaml +++ b/assets/large_language_models/rag/components/crack_and_chunk_and_embed/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.46 +version: 0.0.47 name: llm_rag_crack_and_chunk_and_embed display_name: LLM - Crack, Chunk and Embed Data is_deterministic: true diff --git a/assets/large_language_models/rag/components/crack_chunk_embed_index_and_register/spec.yaml b/assets/large_language_models/rag/components/crack_chunk_embed_index_and_register/spec.yaml index 7c022851a0..2f8255cddb 100644 --- a/assets/large_language_models/rag/components/crack_chunk_embed_index_and_register/spec.yaml +++ b/assets/large_language_models/rag/components/crack_chunk_embed_index_and_register/spec.yaml @@ -1,5 +1,5 @@ name: llm_rag_crack_chunk_embed_index_and_register -version: 0.0.34 +version: 0.0.35 tags: Preview: "" diff --git a/assets/large_language_models/rag/components/crawl_url/spec.yaml b/assets/large_language_models/rag/components/crawl_url/spec.yaml index f67e8b3d57..e9f6132d84 100644 --- a/assets/large_language_models/rag/components/crawl_url/spec.yaml +++ b/assets/large_language_models/rag/components/crawl_url/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.33 +version: 0.0.34 name: llm_rag_crawl_url display_name: LLM - Crawl URL to Retrieve Data is_deterministic: true diff --git a/assets/large_language_models/rag/components/create_faiss_index/spec.yaml b/assets/large_language_models/rag/components/create_faiss_index/spec.yaml index 2b6f1a2aaa..480868810c 100644 --- a/assets/large_language_models/rag/components/create_faiss_index/spec.yaml +++ b/assets/large_language_models/rag/components/create_faiss_index/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.73 +version: 0.0.74 name: llm_rag_create_faiss_index display_name: LLM - Create FAISS Index is_deterministic: true diff --git a/assets/large_language_models/rag/components/create_promptflow/spec.yaml b/assets/large_language_models/rag/components/create_promptflow/spec.yaml index 3b21a7850f..523498eb07 100644 --- a/assets/large_language_models/rag/components/create_promptflow/spec.yaml +++ b/assets/large_language_models/rag/components/create_promptflow/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.84 +version: 0.0.85 name: llm_rag_create_promptflow display_name: LLM - Create Prompt Flow is_deterministic: true diff --git a/assets/large_language_models/rag/components/data_import_acs/spec.yaml b/assets/large_language_models/rag/components/data_import_acs/spec.yaml index 021e1d1e45..1a8e0d0826 100644 --- a/assets/large_language_models/rag/components/data_import_acs/spec.yaml +++ b/assets/large_language_models/rag/components/data_import_acs/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.69 +version: 0.0.70 name: llm_rag_data_import_acs display_name: LLM - Import Data from ACS is_deterministic: false diff --git a/assets/large_language_models/rag/components/generate_embeddings/spec.yaml b/assets/large_language_models/rag/components/generate_embeddings/spec.yaml index 481223f8c0..4004be9fdd 100644 --- a/assets/large_language_models/rag/components/generate_embeddings/spec.yaml +++ b/assets/large_language_models/rag/components/generate_embeddings/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.68 +version: 0.0.69 name: llm_rag_generate_embeddings display_name: LLM - Generate Embeddings is_deterministic: true diff --git a/assets/large_language_models/rag/components/generate_embeddings_parallel/spec.yaml b/assets/large_language_models/rag/components/generate_embeddings_parallel/spec.yaml index 0cd2b85726..bffff91620 100644 --- a/assets/large_language_models/rag/components/generate_embeddings_parallel/spec.yaml +++ b/assets/large_language_models/rag/components/generate_embeddings_parallel/spec.yaml @@ -4,7 +4,7 @@ type: parallel tags: Preview: "" -version: 0.0.74 +version: 0.0.75 name: llm_rag_generate_embeddings_parallel display_name: LLM - Generate Embeddings Parallel is_deterministic: true diff --git a/assets/large_language_models/rag/components/git_clone/spec.yaml b/assets/large_language_models/rag/components/git_clone/spec.yaml index 23cf96d082..522296a23b 100644 --- a/assets/large_language_models/rag/components/git_clone/spec.yaml +++ b/assets/large_language_models/rag/components/git_clone/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.72 +version: 0.0.73 name: llm_rag_git_clone display_name: LLM - Clone Git Repo is_deterministic: true diff --git a/assets/large_language_models/rag/components/image_embed_index/spec.yaml b/assets/large_language_models/rag/components/image_embed_index/spec.yaml index 58f3803063..5c6095231a 100644 --- a/assets/large_language_models/rag/components/image_embed_index/spec.yaml +++ b/assets/large_language_models/rag/components/image_embed_index/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.26 +version: 0.0.27 name: llm_rag_image_embed_index display_name: LLM - Embedding images with Florence is_deterministic: true diff --git a/assets/large_language_models/rag/components/qa_data_generation/spec.yaml b/assets/large_language_models/rag/components/qa_data_generation/spec.yaml index 68f80d54fe..2386b0532c 100644 --- a/assets/large_language_models/rag/components/qa_data_generation/spec.yaml +++ b/assets/large_language_models/rag/components/qa_data_generation/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.72 +version: 0.0.73 name: llm_rag_qa_data_generation display_name: LLM - Generate QnA Test Data is_deterministic: true diff --git a/assets/large_language_models/rag/components/register_mlindex_asset/spec.yaml b/assets/large_language_models/rag/components/register_mlindex_asset/spec.yaml index a0facd583f..bbcf4c4793 100644 --- a/assets/large_language_models/rag/components/register_mlindex_asset/spec.yaml +++ b/assets/large_language_models/rag/components/register_mlindex_asset/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.72 +version: 0.0.73 name: llm_rag_register_mlindex_asset display_name: LLM - Register Vector Index Asset is_deterministic: true diff --git a/assets/large_language_models/rag/components/register_qa_data_asset/spec.yaml b/assets/large_language_models/rag/components/register_qa_data_asset/spec.yaml index d78951ee6e..b3c31b6cb6 100644 --- a/assets/large_language_models/rag/components/register_qa_data_asset/spec.yaml +++ b/assets/large_language_models/rag/components/register_qa_data_asset/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.65 +version: 0.0.66 name: llm_rag_register_qa_data_asset display_name: LLM - Register QA Generation Data Asset is_deterministic: true diff --git a/assets/large_language_models/rag/components/update_acs_index/spec.yaml b/assets/large_language_models/rag/components/update_acs_index/spec.yaml index a884bd2b74..539074ba71 100644 --- a/assets/large_language_models/rag/components/update_acs_index/spec.yaml +++ b/assets/large_language_models/rag/components/update_acs_index/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.72 +version: 0.0.73 name: llm_rag_update_acs_index display_name: LLM - Update ACS Index is_deterministic: true diff --git a/assets/large_language_models/rag/components/update_azure_cosmos_mongo_vcore_index/spec.yaml b/assets/large_language_models/rag/components/update_azure_cosmos_mongo_vcore_index/spec.yaml index 7085f52acf..738a50ad80 100644 --- a/assets/large_language_models/rag/components/update_azure_cosmos_mongo_vcore_index/spec.yaml +++ b/assets/large_language_models/rag/components/update_azure_cosmos_mongo_vcore_index/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.28 +version: 0.0.29 name: llm_rag_update_cosmos_mongo_vcore_index display_name: LLM - Update Azure Cosmos Mongo vCore Index is_deterministic: true diff --git a/assets/large_language_models/rag/components/update_milvus_index/spec.yaml b/assets/large_language_models/rag/components/update_milvus_index/spec.yaml index 7faaa4a1db..010a4d3bed 100644 --- a/assets/large_language_models/rag/components/update_milvus_index/spec.yaml +++ b/assets/large_language_models/rag/components/update_milvus_index/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.28 +version: 0.0.29 name: llm_rag_update_milvus_index display_name: LLM - Update Milvus Index is_deterministic: true diff --git a/assets/large_language_models/rag/components/update_pinecone_index/spec.yaml b/assets/large_language_models/rag/components/update_pinecone_index/spec.yaml index dfd99646fb..e16e3355a6 100644 --- a/assets/large_language_models/rag/components/update_pinecone_index/spec.yaml +++ b/assets/large_language_models/rag/components/update_pinecone_index/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.40 +version: 0.0.41 name: llm_rag_update_pinecone_index display_name: LLM - Update Pinecone Index is_deterministic: true diff --git a/assets/large_language_models/rag/components/validate_deployments/spec.yaml b/assets/large_language_models/rag/components/validate_deployments/spec.yaml index 70e84e3408..6e1d74f94d 100644 --- a/assets/large_language_models/rag/components/validate_deployments/spec.yaml +++ b/assets/large_language_models/rag/components/validate_deployments/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.78 +version: 0.0.79 name: llm_rag_validate_deployments display_name: LLM - Validate Deployments is_deterministic: false From 8bf23d3a52764420ff795430f32fbf9c8cda83d9 Mon Sep 17 00:00:00 2001 From: roopavidhya <132437865+roopavidhya@users.noreply.github.com> Date: Fri, 6 Dec 2024 11:55:13 +0530 Subject: [PATCH 06/31] Add virchow model wrapper (#3645) * Fixes * Some changes * Context/param changes * minor change * Update component versions * Add comments * Add comments --------- Co-authored-by: Roopa G --- .../convert_model_to_mlflow/spec.yaml | 13 +- .../components/import_model/spec.yaml | 7 +- .../validation_trigger_import/spec.yaml | 3 +- .../azureml/model/mgmt/processors/factory.py | 18 ++ .../model/mgmt/processors/pyfunc/config.py | 6 + .../mgmt/processors/pyfunc/convertors.py | 100 ++++++++ .../mgmt/processors/pyfunc/virchow/conda.yaml | 17 ++ .../mgmt/processors/pyfunc/virchow/config.py | 37 +++ .../virchow/virchow_mlflow_model_wrapper.py | 97 ++++++++ .../processors/pyfunc/virchow/vision_utils.py | 234 ++++++++++++++++++ 10 files changed, 525 insertions(+), 7 deletions(-) create mode 100644 assets/training/model_management/src/azureml/model/mgmt/processors/pyfunc/virchow/conda.yaml create mode 100644 assets/training/model_management/src/azureml/model/mgmt/processors/pyfunc/virchow/config.py create mode 100644 assets/training/model_management/src/azureml/model/mgmt/processors/pyfunc/virchow/virchow_mlflow_model_wrapper.py create mode 100644 assets/training/model_management/src/azureml/model/mgmt/processors/pyfunc/virchow/vision_utils.py diff --git a/assets/training/model_management/components/convert_model_to_mlflow/spec.yaml b/assets/training/model_management/components/convert_model_to_mlflow/spec.yaml index 3b9885517b..fc8e168813 100644 --- a/assets/training/model_management/components/convert_model_to_mlflow/spec.yaml +++ b/assets/training/model_management/components/convert_model_to_mlflow/spec.yaml @@ -1,7 +1,7 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: convert_model_to_mlflow -version: 0.0.34 +version: 0.0.35 type: command is_deterministic: True @@ -19,7 +19,7 @@ command: | pip_pkg_str="${pip_pkgs[*]}" if [[ -n "$pip_pkg_str" ]]; then echo "Installing $pip_pkg_str"; pip install $pip_pkg_str; echo "pip installation completed. For any installation error please check above logs"; fi; echo "Running model conversion ... " - python -u run_model_preprocess.py $[[--model-id ${{inputs.model_id}}]] $[[--task-name ${{inputs.task_name}}]] $[[--model-download-metadata ${{inputs.model_download_metadata}}]] $[[--license-file-path ${{inputs.license_file_path}}]] $[[--hf-config-args "${{inputs.hf_config_args}}"]] $[[--hf-tokenizer-args "${{inputs.hf_tokenizer_args}}"]] $[[--hf-model-args "${{inputs.hf_model_args}}"]] $[[--hf-pipeline-args "${{inputs.hf_pipeline_args}}"]] $[[--hf-config-class ${{inputs.hf_config_class}}]] $[[--hf-model-class ${{inputs.hf_model_class}}]] $[[--hf-tokenizer-class ${{inputs.hf_tokenizer_class}}]] $[[--hf-use-experimental-features ${{inputs.hf_use_experimental_features}}]] $[[--extra-pip-requirements "${{inputs.extra_pip_requirements}}"]] $[[--inference-base-image "${{inputs.inference_base_image}}"]] --vllm-enabled ${{inputs.vllm_enabled}} --model-framework ${{inputs.model_framework}} --model-path ${{inputs.model_path}} --mlflow-model-output-dir ${{outputs.mlflow_model_folder}} --model-flavor ${{inputs.model_flavor}} + python -u run_model_preprocess.py $[[--model-id ${{inputs.model_id}}]] $[[--task-name ${{inputs.task_name}}]] $[[--model-download-metadata ${{inputs.model_download_metadata}}]] $[[--license-file-path ${{inputs.license_file_path}}]] $[[--hf-config-args "${{inputs.hf_config_args}}"]] $[[--hf-tokenizer-args "${{inputs.hf_tokenizer_args}}"]] $[[--hf-model-args "${{inputs.hf_model_args}}"]] $[[--hf-pipeline-args "${{inputs.hf_pipeline_args}}"]] $[[--hf-config-class ${{inputs.hf_config_class}}]] $[[--hf-model-class ${{inputs.hf_model_class}}]] $[[--hf-tokenizer-class ${{inputs.hf_tokenizer_class}}]] $[[--hf-use-experimental-features ${{inputs.hf_use_experimental_features}}]] $[[--extra-pip-requirements "${{inputs.extra_pip_requirements}}"]] $[[--inference-base-image "${{inputs.inference_base_image}}"]] --vllm-enabled ${{inputs.vllm_enabled}} --model-framework ${{inputs.model_framework}} $[[--model-path "${{inputs.model_path}}"]] $[[--model-path-mmd "${{inputs.model_path_mmd}}"]] --mlflow-model-output-dir ${{outputs.mlflow_model_folder}} --model-flavor ${{inputs.model_flavor}} echo "Completed model conversion ... " inputs: @@ -79,6 +79,7 @@ inputs: - mask-generation - video-multi-object-tracking - visual-question-answering + - image-feature-extraction description: A Hugging face task on which model was trained on. A required parameter for transformers MLflow flavor. Can be provided as input here or in model_download_metadata JSON file. optional: true @@ -156,7 +157,13 @@ inputs: type: uri_folder description: Path to the model. mode: ro_mount - optional: false + optional: true + + model_path_mmd: + type: uri_folder + description: Path to the MMD model. + mode: ro_mount + optional: true license_file_path: type: uri_file diff --git a/assets/training/model_management/components/import_model/spec.yaml b/assets/training/model_management/components/import_model/spec.yaml index 709105add4..2dd61c9b80 100644 --- a/assets/training/model_management/components/import_model/spec.yaml +++ b/assets/training/model_management/components/import_model/spec.yaml @@ -4,7 +4,7 @@ type: pipeline name: import_model display_name: Import model description: Import a model into a workspace or a registry -version: 0.0.40 +version: 0.0.41 # Pipeline inputs inputs: @@ -100,6 +100,7 @@ inputs: - mask-generation - video-multi-object-tracking - visual-question-answering + - image-feature-extraction optional: true type: string @@ -218,7 +219,7 @@ outputs: jobs: validation_trigger_import: - component: azureml:validation_trigger_import:0.0.13 + component: azureml:validation_trigger_import:0.0.14 compute: ${{parent.inputs.compute}} resources: instance_type: '${{parent.inputs.instance_type}}' @@ -271,7 +272,7 @@ jobs: type: uri_folder convert_model_to_mlflow: - component: azureml:convert_model_to_mlflow:0.0.34 + component: azureml:convert_model_to_mlflow:0.0.35 compute: ${{parent.inputs.compute}} resources: instance_type: '${{parent.inputs.instance_type}}' diff --git a/assets/training/model_management/components/validation_trigger_import/spec.yaml b/assets/training/model_management/components/validation_trigger_import/spec.yaml index 94b87f080b..afa560c6e0 100644 --- a/assets/training/model_management/components/validation_trigger_import/spec.yaml +++ b/assets/training/model_management/components/validation_trigger_import/spec.yaml @@ -4,7 +4,7 @@ type: command name: validation_trigger_import display_name: Validation Trigger Import model description: Component for enabling validation of import pipeline. -version: 0.0.13 +version: 0.0.14 # Pipeline inputs inputs: @@ -67,6 +67,7 @@ inputs: - image-classification - text-to-image - chat-completion + - image-feature-extraction optional: true type: string diff --git a/assets/training/model_management/src/azureml/model/mgmt/processors/factory.py b/assets/training/model_management/src/azureml/model/mgmt/processors/factory.py index bb57653ebf..cf41cd448c 100644 --- a/assets/training/model_management/src/azureml/model/mgmt/processors/factory.py +++ b/assets/training/model_management/src/azureml/model/mgmt/processors/factory.py @@ -36,6 +36,7 @@ DinoV2MLFlowConvertor, LLaVAMLFlowConvertor, SegmentAnythingMLFlowConvertor, + VirchowMLFlowConvertor ) @@ -84,6 +85,10 @@ def get_mlflow_convertor(model_framework, model_dir, output_dir, temp_dir, trans return SegmentAnythingMLflowConvertorFactory.create_mlflow_convertor( model_dir, output_dir, temp_dir, translate_params ) + elif task == PyFuncSupportedTasks.IMAGE_FEATURE_EXTRACTION.value: + return VirchowMLflowConvertorFactory.create_mlflow_convertor( + model_dir, output_dir, temp_dir, translate_params + ) else: raise Exception( f"Models from {model_framework} for task {task} and model {model_id} " @@ -299,6 +304,19 @@ def create_mlflow_convertor(model_dir, output_dir, temp_dir, translate_params): ) +class VirchowMLflowConvertorFactory(MLflowConvertorFactoryInterface): + """Factory class for segment anything Virchow model.""" + + def create_mlflow_convertor(model_dir, output_dir, temp_dir, translate_params): + """Create MLflow convertor for segment anything Virchow model.""" + return VirchowMLFlowConvertor( + model_dir=model_dir, + output_dir=output_dir, + temp_dir=temp_dir, + translate_params=translate_params, + ) + + class MMLabTrackingMLflowConvertorFactory(MLflowConvertorFactoryInterface): """Factory class for MMTrack video model family.""" diff --git a/assets/training/model_management/src/azureml/model/mgmt/processors/pyfunc/config.py b/assets/training/model_management/src/azureml/model/mgmt/processors/pyfunc/config.py index 6637ff1204..fe941a6fcd 100644 --- a/assets/training/model_management/src/azureml/model/mgmt/processors/pyfunc/config.py +++ b/assets/training/model_management/src/azureml/model/mgmt/processors/pyfunc/config.py @@ -56,6 +56,9 @@ class SupportedTasks(_CustomEnum): IMAGE_OBJECT_DETECTION = "image-object-detection" IMAGE_INSTANCE_SEGMENTATION = "image-instance-segmentation" + # Virchow + IMAGE_FEATURE_EXTRACTION = "image-feature-extraction" + class ModelFamilyPrefixes(_CustomEnum): """Prefixes for some of the models converted to PyFunc MLflow.""" @@ -65,3 +68,6 @@ class ModelFamilyPrefixes(_CustomEnum): # DinoV2 model family. DINOV2 = "facebook/dinov2" + + # Virchow model family. + VIRCHOW = "paige-ai/Virchow" diff --git a/assets/training/model_management/src/azureml/model/mgmt/processors/pyfunc/convertors.py b/assets/training/model_management/src/azureml/model/mgmt/processors/pyfunc/convertors.py index e20fc66285..f4c45a3393 100644 --- a/assets/training/model_management/src/azureml/model/mgmt/processors/pyfunc/convertors.py +++ b/assets/training/model_management/src/azureml/model/mgmt/processors/pyfunc/convertors.py @@ -41,6 +41,8 @@ MLflowSchemaLiterals as SegmentAnythingMLFlowSchemaLiterals, MLflowLiterals as SegmentAnythingMLflowLiterals from azureml.model.mgmt.processors.pyfunc.vision.config import \ MLflowSchemaLiterals as VisionMLFlowSchemaLiterals, MMDetLiterals +from azureml.model.mgmt.processors.pyfunc.virchow.config import \ + MLflowSchemaLiterals as VirchowMLFlowSchemaLiterals, MLflowLiterals as VirchowMLflowLiterals logger = get_logger(__name__) @@ -1136,3 +1138,101 @@ def save_as_mlflow(self): conda_env=conda_env_file, code_path=None, ) + + +class VirchowMLFlowConvertor(PyFuncMLFLowConvertor): + """PyFunc MLfLow convertor for Virchow models.""" + + MODEL_DIR = os.path.join(os.path.dirname(__file__), "virchow") + COMMON_DIR = os.path.join(os.path.dirname(os.path.dirname(__file__)), "common") + + def __init__(self, **kwargs): + """Initialize MLflow convertor for Virchow models.""" + super().__init__(**kwargs) + if self._task not in \ + [SupportedTasks.IMAGE_FEATURE_EXTRACTION.value]: + raise Exception("Unsupported task") + + def get_model_signature(self) -> ModelSignature: + """Return MLflow model signature with input and output schema for the given input task. + + :return: MLflow model signature. + :rtype: mlflow.models.signature.ModelSignature + """ + input_schema = Schema( + [ + ColSpec(VirchowMLFlowSchemaLiterals.INPUT_COLUMN_IMAGE_DATA_TYPE, + VirchowMLFlowSchemaLiterals.INPUT_COLUMN_IMAGE), + ColSpec(VirchowMLFlowSchemaLiterals.INPUT_COLUMN_TEXT_DATA_TYPE, + VirchowMLFlowSchemaLiterals.INPUT_COLUMN_TEXT), + ] + ) + params = ParamSchema( + [ + ParamSpec(VirchowMLflowLiterals.DEVICE_TYPE, + DataType.string, "cuda"), + ParamSpec(VirchowMLflowLiterals.TO_HALF_PRECISION, + DataType.boolean, False), + ] + ) + if self._task == SupportedTasks.IMAGE_FEATURE_EXTRACTION.value: + output_schema = Schema( + [ + ColSpec(VirchowMLFlowSchemaLiterals.OUTPUT_COLUMN_DATA_TYPE, + VirchowMLFlowSchemaLiterals.OUTPUT_COLUMN_PROBS), + ColSpec(VirchowMLFlowSchemaLiterals.OUTPUT_COLUMN_DATA_TYPE, + VirchowMLFlowSchemaLiterals.OUTPUT_COLUMN_LABELS), + ColSpec(VirchowMLFlowSchemaLiterals.OUTPUT_COLUMN_DATA_TYPE, + VirchowMLFlowSchemaLiterals.OUTPUT_COLUMN_IMAGE_FEATURES), + ColSpec(VirchowMLFlowSchemaLiterals.OUTPUT_COLUMN_DATA_TYPE, + VirchowMLFlowSchemaLiterals.OUTPUT_COLUMN_TEXT_FEATURES), + ] + ) + else: + raise Exception("Unsupported task") + + return ModelSignature(inputs=input_schema, outputs=output_schema, params=params) + + def save_as_mlflow(self): + """Prepare model for save to MLflow.""" + sys.path.append(self.MODEL_DIR) + + from virchow_mlflow_model_wrapper import VirchowModelWrapper + mlflow_model_wrapper = VirchowModelWrapper() + + artifacts_dict = self._prepare_artifacts_dict() + conda_env_file = os.path.join(self.MODEL_DIR, "conda.yaml") + code_path = self._get_code_path() + + super()._save( + mlflow_model_wrapper=mlflow_model_wrapper, + artifacts_dict=artifacts_dict, + conda_env=conda_env_file, + code_path=code_path, + ) + + def _get_code_path(self): + """Return code path for saving mlflow model depending on task type. + + :return: code path + :rtype: List[str] + """ + code_path = [ + os.path.join(self.MODEL_DIR, "virchow_mlflow_model_wrapper.py"), + os.path.join(self.MODEL_DIR, "config.py"), + os.path.join(self.COMMON_DIR, "vision_utils.py") + ] + + return code_path + + def _prepare_artifacts_dict(self) -> Dict: + """Prepare artifacts dict for MLflow model. + + :return: artifacts dict + :rtype: Dict + """ + artifacts_dict = { + VirchowMLflowLiterals.CHECKPOINT_PATH: self._model_dir+"/pytorch_model.bin", + VirchowMLflowLiterals.CONFIG_PATH: self._model_dir+"/config.json" + } + return artifacts_dict diff --git a/assets/training/model_management/src/azureml/model/mgmt/processors/pyfunc/virchow/conda.yaml b/assets/training/model_management/src/azureml/model/mgmt/processors/pyfunc/virchow/conda.yaml new file mode 100644 index 0000000000..43b178be2a --- /dev/null +++ b/assets/training/model_management/src/azureml/model/mgmt/processors/pyfunc/virchow/conda.yaml @@ -0,0 +1,17 @@ +channels: +- conda-forge +dependencies: +- python=3.10.14 +- pip<=24.0 +- pip: + - mlflow==2.13.2 + - cffi==1.16.0 + - cloudpickle==2.2.1 + - numpy==1.23.5 + - pandas==2.2.2 + - pyyaml==6.0.1 + - requests==2.32.3 + - timm==1.0.9,>=0.9.11 + - torch>2 + - pillow>=10 +name: mlflow-env diff --git a/assets/training/model_management/src/azureml/model/mgmt/processors/pyfunc/virchow/config.py b/assets/training/model_management/src/azureml/model/mgmt/processors/pyfunc/virchow/config.py new file mode 100644 index 0000000000..dd8dd49302 --- /dev/null +++ b/assets/training/model_management/src/azureml/model/mgmt/processors/pyfunc/virchow/config.py @@ -0,0 +1,37 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + +"""Common Config.""" + +from enum import Enum + +from mlflow.types import DataType + + +class _CustomEnum(Enum): + @classmethod + def has_value(cls, value): + return value in cls._value2member_map_ + + +class MLflowSchemaLiterals: + """MLflow model signature related schema.""" + + INPUT_COLUMN_IMAGE_DATA_TYPE = DataType.binary + INPUT_COLUMN_IMAGE = "image" + INPUT_COLUMN_TEXT_DATA_TYPE = DataType.string + INPUT_COLUMN_TEXT = "text" + OUTPUT_COLUMN_DATA_TYPE = DataType.string + OUTPUT_COLUMN_PROBS = "probs" + OUTPUT_COLUMN_LABELS = "labels" + OUTPUT_COLUMN_IMAGE_FEATURES = "image_features" + OUTPUT_COLUMN_TEXT_FEATURES = "text_features" + + +class MLflowLiterals: + """MLflow export related literals.""" + + CHECKPOINT_PATH = "checkpoint_path" + CONFIG_PATH = "config_path" + DEVICE_TYPE = "device_type" + TO_HALF_PRECISION = "to_half_precision" diff --git a/assets/training/model_management/src/azureml/model/mgmt/processors/pyfunc/virchow/virchow_mlflow_model_wrapper.py b/assets/training/model_management/src/azureml/model/mgmt/processors/pyfunc/virchow/virchow_mlflow_model_wrapper.py new file mode 100644 index 0000000000..8e2188138e --- /dev/null +++ b/assets/training/model_management/src/azureml/model/mgmt/processors/pyfunc/virchow/virchow_mlflow_model_wrapper.py @@ -0,0 +1,97 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + +"""MLFlow pyfunc wrapper for Virchow models.""" + +import timm +import json + +import mlflow.pyfunc +import torch +import pandas as pd +import io +from PIL import Image +from timm.data import resolve_data_config +from timm.data.transforms_factory import create_transform +from timm.layers import SwiGLUPacked +from config import MLflowSchemaLiterals +import logging +logger = logging.getLogger("mlflow") # Set log level to debugging +logger.setLevel(logging.DEBUG) + + +class VirchowModelWrapper(mlflow.pyfunc.PythonModel): + """MLFlow pyfunc wrapper for Virchow models.""" + + def load_context(self, context): + """Load a MLflow model with pyfunc.load_model(). + + :param context: MLflow context containing artifacts that the model can use for inference + :type context: mlflow.pyfunc.PythonModelContext + """ + config_path = context.artifacts["config_path"] + checkpoint_path = context.artifacts["checkpoint_path"] + # config = json.loads(config_path.read_text()) + with open(config_path) as f: + config = json.load(f) + self.model = timm.create_model( + model_name="vit_huge_patch14_224", + checkpoint_path=checkpoint_path, + mlp_layer=SwiGLUPacked, + act_layer=torch.nn.SiLU, + pretrained_cfg=config["pretrained_cfg"], + **config["model_args"] + ) + self.model.eval() + self.transforms = create_transform( + **resolve_data_config(self.model.pretrained_cfg, model=self.model) + ) + + # def predict(self, image_input_path: str, params: dict = None): + def predict( + self, + context: mlflow.pyfunc.PythonModelContext, + input_data: pd.DataFrame, + params: pd.DataFrame) -> pd.DataFrame: + """Perform inference on the input data. + + :param context: MLflow context containing artifacts that the model can use for inference + :type context: mlflow.pyfunc.PythonModelContext + :param input_data: Pandas DataFrame with columns ["image"], ["prompt"] and ["direct_question"], where + the image is either a url or a base64 string, the prompt is the dialog so far between the + user and the model and the direct question is a prompt with a single question from the user. + :type input_data: pd.DataFrame + :return: Pandas dataframe with column ["response"] containing the model's response to the dialog so far. + """ + from vision_utils import process_image + pil_images = [ + Image.open(io.BytesIO(process_image(image))) + for image in input_data[MLflowSchemaLiterals.INPUT_COLUMN_IMAGE] + ] + # image = input_data["image"] + # pil_image = Image.open(io.BytesIO(process_image(pil_images[0]))) + pil_image = self.transforms(pil_images[0]).unsqueeze(0) # size: 1 x 3 x 224 x 224 + + device_type = params.get("device_type", "cuda") + to_half_precision = params.get("to_half_precision", False) + + with torch.inference_mode(), torch.autocast( + device_type=device_type, dtype=torch.float16 + ): + output = self.model(pil_image) # size: 1 x 257 x 1280 + + class_token = output[:, 0] # size: 1 x 1280 + # patch_tokens = output[:, 1:] # size: 1 x 256 x 1280 + + # use the class token only as the embedding + # size: 1 x 1280 + embedding = class_token + + # the model output will be fp32 because the final operation is a LayerNorm that is ran in mixed precision + # optionally, you can convert the embedding to fp16 for efficiency in downstream use + if to_half_precision: + embedding = embedding.to(torch.float16) + + df_result = pd.DataFrame() + df_result['output'] = embedding.tolist() + return df_result diff --git a/assets/training/model_management/src/azureml/model/mgmt/processors/pyfunc/virchow/vision_utils.py b/assets/training/model_management/src/azureml/model/mgmt/processors/pyfunc/virchow/vision_utils.py new file mode 100644 index 0000000000..a0af9f0d17 --- /dev/null +++ b/assets/training/model_management/src/azureml/model/mgmt/processors/pyfunc/virchow/vision_utils.py @@ -0,0 +1,234 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + +"""Helper utils for vision Mlflow models.""" + +import base64 +import io +import logging +import os +import re +import requests +import uuid + +import PIL +import pandas as pd +import numpy as np +import torch + +from ast import literal_eval +from PIL import Image, UnidentifiedImageError +from typing import Union + + +logger = logging.getLogger(__name__) + +# Uncomment the following line for mlflow debug mode +# logging.getLogger("mlflow").setLevel(logging.DEBUG) + + +def save_image(output_folder: str, img: PIL.Image.Image, format: str) -> str: + """ + Save image in a folder designated for batch output and return image file path. + + :param output_folder: directory path where we need to save files + :type output_folder: str + :param img: image object + :type img: PIL.Image.Image + :param format: format to save image + :type format: str + :return: file name of image. + :rtype: str + """ + filename = f"image_{uuid.uuid4()}.{format.lower()}" + img.save(os.path.join(output_folder, filename), format=format) + return filename + + +def get_pil_image(image: bytes) -> PIL.Image.Image: + """ + Convert image bytes to PIL image. + + :param image: image bytes + :type image: bytes + :return: PIL image object + :rtype: PIL.Image.Image + """ + try: + return Image.open(io.BytesIO(image)) + except UnidentifiedImageError as e: + logger.error("Invalid image format. Please use base64 encoding for input images.") + raise e + + +def image_to_base64(img: PIL.Image.Image, format: str) -> str: + """ + Convert image into Base64 encoded string. + + :param img: image object + :type img: PIL.Image.Image + :param format: image format + :type format: str + :return: base64 encoded string + :rtype: str + """ + buffered = io.BytesIO() + img.save(buffered, format=format) + img_str = base64.b64encode(buffered.getvalue()).decode("utf-8") + return img_str + + +def process_image(image: Union[str, bytes]) -> bytes: + """Process image. + + If input image is in bytes format, return it as it is. + If input image is in base64 string format, decode it to bytes. + If input image is in url format, download it and return bytes. + https://github.com/mlflow/mlflow/blob/master/examples/flower_classifier/image_pyfunc.py + + :param image: image in base64 string format or url or bytes. + :type image: string or bytes + :return: decoded image. + :rtype: bytes + """ + if isinstance(image, bytes): + return image + elif isinstance(image, str): + if _is_valid_url(image): + try: + response = requests.get(image) + response.raise_for_status() # Raise exception in case of unsuccessful response code. + image = response.content + return image + except requests.exceptions.RequestException as ex: + raise ValueError(f"Unable to retrieve image from url string due to exception: {ex}") + else: + try: + return base64.b64decode(image) + except ValueError: + raise ValueError( + "The provided image string cannot be decoded. " "Expected format is base64 string or url string." + ) + else: + raise ValueError( + f"Image received in {type(image)} format which is not supported. " + "Expected format is bytes, base64 string or url string." + ) + + +def process_image_pandas_series(image_pandas_series: pd.Series) -> pd.Series: + """Process image in Pandas series form. + + If input image is in bytes format, return it as it is. + If input image is in base64 string format, decode it to bytes. + If input image is in url format, download it and return bytes. + https://github.com/mlflow/mlflow/blob/master/examples/flower_classifier/image_pyfunc.py + + :param img: pandas series with image in base64 string format or url or bytes. + :type img: pd.Series + :return: decoded image in pandas series format. + :rtype: Pandas Series + """ + image = image_pandas_series[0] + return pd.Series(process_image(image)) + + +def _is_valid_url(text: str) -> bool: + """Check if text is url or base64 string. + + :param text: text to validate + :type text: str + :return: True if url else false + :rtype: bool + """ + regex = ( + "((http|https)://)(www.)?" + + "[a-zA-Z0-9@:%._\\+~#?&//=\\-]" + + "{2,256}\\.[a-z]" + + "{2,6}\\b([-a-zA-Z0-9@:%" + + "._\\+~#?&//=]*)" + ) + p = re.compile(regex) + + # If the string is empty + # return false + if str is None: + return False + + # Return if the string + # matched the ReGex + if re.search(p, text): + return True + else: + return False + + +def get_current_device() -> torch.device: + """Get current cuda device. + + :return: current device + :rtype: torch.device + """ + # check if GPU is available + if torch.cuda.is_available(): + try: + # get the current device index + device_idx = torch.distributed.get_rank() + except RuntimeError as ex: + if "Default process group has not been initialized".lower() in str(ex).lower(): + device_idx = 0 + else: + logger.error(str(ex)) + raise ex + return torch.device(type="cuda", index=device_idx) + else: + return torch.device(type="cpu") + + +def string_to_nested_float_list(input_str: str) -> list: + """Convert string to nested list of floats. + + :return: string converted to nested list of floats + :rtype: list + """ + if input_str in ["null", "None", "", "nan", "NoneType", np.nan, None]: + return None + try: + # Use ast.literal_eval to safely evaluate the string into a list + nested_list = literal_eval(input_str) + + # Recursive function to convert all numbers in the nested list to floats + def to_floats(lst) -> list: + """ + Recursively convert all numbers in a nested list to floats. + + :param lst: nested list + :type lst: list + :return: nested list of floats + :rtype: list + """ + return [to_floats(item) if isinstance(item, list) else float(item) for item in lst] + + # Use the recursive function to process the nested list + return to_floats(nested_list) + except (ValueError, SyntaxError) as e: + # In case of an error during conversion, print an error message + print(f"Invalid input {input_str}: {e}, ignoring.") + return None + + +def bool_array_to_pil_image(bool_array: np.ndarray) -> PIL.Image.Image: + """Convert boolean array to PIL Image. + + :param bool_array: boolean array + :type bool_array: np.array + :return: PIL Image + :rtype: PIL.Image.Image + """ + # Convert boolean array to uint8 + uint8_array = bool_array.astype(np.uint8) * 255 + + # Create a PIL Image + pil_image = Image.fromarray(uint8_array) + + return pil_image From 8df7cfab3273eb58dd8158dd991880670ffc6dc0 Mon Sep 17 00:00:00 2001 From: rdondera-microsoft <98922913+rdondera-microsoft@users.noreply.github.com> Date: Fri, 6 Dec 2024 19:17:34 -0800 Subject: [PATCH 07/31] Upgrade a lot of environments for image components (#3655) * Update environment for common validation component. * Upgrade model prediction and metric computation components. * Upgrade image framework selector. * Upgrade image output selector. --- .../finetune_acft_common/components/validation/spec.yaml | 4 ++-- .../components/framework_selector/spec.yaml | 4 ++-- .../components/model_output_selector/spec.yaml | 4 ++-- .../pipeline_components/classification/spec.yaml | 8 ++++---- .../pipeline_components/hf_classification/spec.yaml | 8 ++++---- .../pipeline_components/instance_segmentation/spec.yaml | 8 ++++---- .../components/pipeline_components/mmd_od_is/spec.yaml | 8 ++++---- .../pipeline_components/object_detection/spec.yaml | 8 ++++---- 8 files changed, 26 insertions(+), 26 deletions(-) diff --git a/assets/training/finetune_acft_common/components/validation/spec.yaml b/assets/training/finetune_acft_common/components/validation/spec.yaml index 5b9bf725e3..de667aab36 100644 --- a/assets/training/finetune_acft_common/components/validation/spec.yaml +++ b/assets/training/finetune_acft_common/components/validation/spec.yaml @@ -1,14 +1,14 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json type: command -version: 0.0.6 +version: 0.0.7 name: finetune_common_validation display_name: Common Validation Component description: Component to validate the finetune job against Validation Service is_deterministic: True -environment: azureml://registries/azureml/environments/acpt-pytorch-2.2-cuda12.1/versions/18 +environment: azureml://registries/azureml/environments/acpt-pytorch-2.2-cuda12.1/versions/23 code: ../../src/validation diff --git a/assets/training/finetune_acft_image/components/framework_selector/spec.yaml b/assets/training/finetune_acft_image/components/framework_selector/spec.yaml index 7ea22b667c..e6c05f4797 100644 --- a/assets/training/finetune_acft_image/components/framework_selector/spec.yaml +++ b/assets/training/finetune_acft_image/components/framework_selector/spec.yaml @@ -1,14 +1,14 @@ $schema: https://azuremlschemas.azureedge.net/development/commandComponent.schema.json type: command -version: 0.0.18 +version: 0.0.19 name: image_framework_selector display_name: Framework Selector for Image Tasks description: Framework selector control flow component for image tasks is_deterministic: true -environment: azureml://registries/azureml/environments/acpt-automl-image-framework-selector-gpu/versions/43 +environment: azureml://registries/azureml/environments/acpt-automl-image-framework-selector-gpu/versions/44 code: ../../src/framework_selector diff --git a/assets/training/finetune_acft_image/components/model_output_selector/spec.yaml b/assets/training/finetune_acft_image/components/model_output_selector/spec.yaml index 844ab4bc79..1a93806d58 100644 --- a/assets/training/finetune_acft_image/components/model_output_selector/spec.yaml +++ b/assets/training/finetune_acft_image/components/model_output_selector/spec.yaml @@ -1,14 +1,14 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json type: command -version: 0.0.17 +version: 0.0.18 name: image_model_output_selector display_name: Model output selector for image components description: Model output selector control flow component for image tasks is_deterministic: true -environment: azureml://registries/azureml/environments/acpt-automl-image-framework-selector-gpu/versions/43 +environment: azureml://registries/azureml/environments/acpt-automl-image-framework-selector-gpu/versions/44 code: ../../src/model_output_selector diff --git a/assets/training/finetune_acft_image/components/pipeline_components/classification/spec.yaml b/assets/training/finetune_acft_image/components/pipeline_components/classification/spec.yaml index 93ab63d6da..c57a0b9627 100644 --- a/assets/training/finetune_acft_image/components/pipeline_components/classification/spec.yaml +++ b/assets/training/finetune_acft_image/components/pipeline_components/classification/spec.yaml @@ -1,7 +1,7 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json type: pipeline -version: 0.0.21 +version: 0.0.22 name: image_classification_pipeline display_name: Image Classification Pipeline description: Pipeline component for image classification. @@ -255,7 +255,7 @@ jobs: finetune_common_validation: type: command - component: azureml:finetune_common_validation:0.0.6 + component: azureml:finetune_common_validation:0.0.7 compute: ${{parent.inputs.compute_model_import}} inputs: train_mltable_path: ${{parent.inputs.training_data}} @@ -269,7 +269,7 @@ jobs: framework_selector: type: command - component: azureml:image_framework_selector:0.0.18 + component: azureml:image_framework_selector:0.0.19 compute: ${{parent.inputs.compute_model_import}} inputs: task_type: 'image-classification' @@ -372,7 +372,7 @@ jobs: output_selector: type: command - component: azureml:image_model_output_selector:0.0.17 + component: azureml:image_model_output_selector:0.0.18 compute: ${{parent.inputs.compute_model_import}} inputs: mlflow_model_t: ${{parent.jobs.image_classification_runtime_component.outputs.mlflow_model_folder}} diff --git a/assets/training/finetune_acft_image/components/pipeline_components/hf_classification/spec.yaml b/assets/training/finetune_acft_image/components/pipeline_components/hf_classification/spec.yaml index 4e1eb7f5a4..c38b4eee8d 100644 --- a/assets/training/finetune_acft_image/components/pipeline_components/hf_classification/spec.yaml +++ b/assets/training/finetune_acft_image/components/pipeline_components/hf_classification/spec.yaml @@ -1,7 +1,7 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json type: pipeline -version: 0.0.21 +version: 0.0.22 name: transformers_image_classification_pipeline display_name: Image Classification HuggingFace Transformers Pipeline description: Pipeline component for image classification using HuggingFace transformers models. @@ -393,7 +393,7 @@ outputs: jobs: finetune_common_validation: type: command - component: azureml:finetune_common_validation:0.0.6 + component: azureml:finetune_common_validation:0.0.7 compute: ${{parent.inputs.compute_model_import}} inputs: mlflow_model_path: ${{parent.inputs.mlflow_model}} @@ -483,7 +483,7 @@ jobs: model_prediction: type: command - component: azureml:model_prediction:0.0.34 + component: azureml:model_prediction:0.0.35 compute: '${{parent.inputs.compute_model_evaluation}}' inputs: task: '${{parent.inputs.task_name}}' @@ -498,7 +498,7 @@ jobs: compute_metrics: type: command - component: azureml:compute_metrics:0.0.33 + component: azureml:compute_metrics:0.0.35 compute: '${{parent.inputs.compute_model_evaluation}}' inputs: task: '${{parent.inputs.task_name}}' diff --git a/assets/training/finetune_acft_image/components/pipeline_components/instance_segmentation/spec.yaml b/assets/training/finetune_acft_image/components/pipeline_components/instance_segmentation/spec.yaml index 289c2fe004..8cdfd297a7 100644 --- a/assets/training/finetune_acft_image/components/pipeline_components/instance_segmentation/spec.yaml +++ b/assets/training/finetune_acft_image/components/pipeline_components/instance_segmentation/spec.yaml @@ -1,7 +1,7 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json type: pipeline -version: 0.0.23 +version: 0.0.24 name: image_instance_segmentation_pipeline display_name: Image Instance Segmentation Pipeline description: Pipeline component for image instance segmentation. @@ -300,7 +300,7 @@ jobs: finetune_common_validation: type: command - component: azureml:finetune_common_validation:0.0.6 + component: azureml:finetune_common_validation:0.0.7 compute: ${{parent.inputs.compute_model_import}} inputs: train_mltable_path: ${{parent.inputs.training_data}} @@ -314,7 +314,7 @@ jobs: framework_selector: type: command - component: azureml:image_framework_selector:0.0.18 + component: azureml:image_framework_selector:0.0.19 compute: ${{parent.inputs.compute_model_import}} inputs: task_type: ${{parent.inputs.task_type}} @@ -424,7 +424,7 @@ jobs: output_selector: type: command - component: azureml:image_model_output_selector:0.0.17 + component: azureml:image_model_output_selector:0.0.18 compute: ${{parent.inputs.compute_model_import}} inputs: mlflow_model_t: ${{parent.jobs.image_instance_segmentation_runtime_component.outputs.mlflow_model_folder}} diff --git a/assets/training/finetune_acft_image/components/pipeline_components/mmd_od_is/spec.yaml b/assets/training/finetune_acft_image/components/pipeline_components/mmd_od_is/spec.yaml index d8a457ec67..ea1303a2e8 100644 --- a/assets/training/finetune_acft_image/components/pipeline_components/mmd_od_is/spec.yaml +++ b/assets/training/finetune_acft_image/components/pipeline_components/mmd_od_is/spec.yaml @@ -1,7 +1,7 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json type: pipeline -version: 0.0.23 +version: 0.0.24 name: mmdetection_image_objectdetection_instancesegmentation_pipeline display_name: Image Object Detection and Instance Segmentation MMDetection Pipeline description: Pipeline component for image object detection and instance segmentation using MMDetection models. @@ -391,7 +391,7 @@ outputs: jobs: finetune_common_validation: type: command - component: azureml:finetune_common_validation:0.0.6 + component: azureml:finetune_common_validation:0.0.7 compute: ${{parent.inputs.compute_model_import}} inputs: mlflow_model_path: ${{parent.inputs.mlflow_model}} @@ -482,7 +482,7 @@ jobs: model_prediction: type: command - component: azureml:model_prediction:0.0.34 + component: azureml:model_prediction:0.0.35 compute: '${{parent.inputs.compute_model_evaluation}}' inputs: task: '${{parent.inputs.task_name}}' @@ -497,7 +497,7 @@ jobs: compute_metrics: type: command - component: azureml:compute_metrics:0.0.33 + component: azureml:compute_metrics:0.0.35 compute: '${{parent.inputs.compute_model_evaluation}}' inputs: task: '${{parent.inputs.task_name}}' diff --git a/assets/training/finetune_acft_image/components/pipeline_components/object_detection/spec.yaml b/assets/training/finetune_acft_image/components/pipeline_components/object_detection/spec.yaml index 3d32d63123..7399c3f987 100644 --- a/assets/training/finetune_acft_image/components/pipeline_components/object_detection/spec.yaml +++ b/assets/training/finetune_acft_image/components/pipeline_components/object_detection/spec.yaml @@ -1,7 +1,7 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json type: pipeline -version: 0.0.23 +version: 0.0.24 name: image_object_detection_pipeline display_name: Image Object Detection Pipeline description: Pipeline component for image object detection. @@ -325,7 +325,7 @@ jobs: finetune_common_validation: type: command - component: azureml:finetune_common_validation:0.0.6 + component: azureml:finetune_common_validation:0.0.7 compute: ${{parent.inputs.compute_model_import}} inputs: train_mltable_path: ${{parent.inputs.training_data}} @@ -339,7 +339,7 @@ jobs: framework_selector: type: command - component: azureml:image_framework_selector:0.0.18 + component: azureml:image_framework_selector:0.0.19 compute: ${{parent.inputs.compute_model_import}} inputs: task_type: ${{parent.inputs.task_type}} @@ -451,7 +451,7 @@ jobs: output_selector: type: command - component: azureml:image_model_output_selector:0.0.17 + component: azureml:image_model_output_selector:0.0.18 compute: ${{parent.inputs.compute_model_import}} inputs: mlflow_model_t: ${{parent.jobs.image_object_detection_runtime_component.outputs.mlflow_model_folder}} From 710216609d611f6c3187cc3bef14e32040679bf3 Mon Sep 17 00:00:00 2001 From: Yeshwanth N Date: Mon, 9 Dec 2024 12:31:53 +0530 Subject: [PATCH 08/31] [vFix]: Ubuntu upgrade to 22.04 and mflow upgrade (#3657) --- .../environments/acft_image_huggingface/context/Dockerfile | 2 +- .../acft_image_huggingface/context/requirements.txt | 2 +- .../environments/acft_image_mmdetection/context/Dockerfile | 2 +- .../environments/acft_video_mmtracking/context/Dockerfile | 2 +- .../acpt_image_framework_selector/context/Dockerfile | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/assets/training/finetune_acft_image/environments/acft_image_huggingface/context/Dockerfile b/assets/training/finetune_acft_image/environments/acft_image_huggingface/context/Dockerfile index e6429dce98..9f8f74d74f 100644 --- a/assets/training/finetune_acft_image/environments/acft_image_huggingface/context/Dockerfile +++ b/assets/training/finetune_acft_image/environments/acft_image_huggingface/context/Dockerfile @@ -1,5 +1,5 @@ # PTCA image -FROM mcr.microsoft.com/aifx/acpt/stable-ubuntu2004-cu118-py310-torch222:{{latest-image-tag:biweekly\.\d{6}\.\d{1}.*}} +FROM mcr.microsoft.com/aifx/acpt/stable-ubuntu2204-cu118-py310-torch222:{{latest-image-tag:biweekly\.\d{6}\.\d{1}.*}} USER root RUN apt-get -y update diff --git a/assets/training/finetune_acft_image/environments/acft_image_huggingface/context/requirements.txt b/assets/training/finetune_acft_image/environments/acft_image_huggingface/context/requirements.txt index a042652a14..97824fed8c 100644 --- a/assets/training/finetune_acft_image/environments/acft_image_huggingface/context/requirements.txt +++ b/assets/training/finetune_acft_image/environments/acft_image_huggingface/context/requirements.txt @@ -12,4 +12,4 @@ optimum==1.19.0 diffusers==0.27.2 huggingface-hub==0.25.2 setuptools>=71.1.0 -mlflow==2.12.1 \ No newline at end of file +mlflow==2.16.0 \ No newline at end of file diff --git a/assets/training/finetune_acft_image/environments/acft_image_mmdetection/context/Dockerfile b/assets/training/finetune_acft_image/environments/acft_image_mmdetection/context/Dockerfile index 26039f2e6b..6f2b19d3d2 100644 --- a/assets/training/finetune_acft_image/environments/acft_image_mmdetection/context/Dockerfile +++ b/assets/training/finetune_acft_image/environments/acft_image_mmdetection/context/Dockerfile @@ -1,5 +1,5 @@ # PTCA image -FROM mcr.microsoft.com/aifx/acpt/stable-ubuntu2004-cu118-py310-torch222:{{latest-image-tag:biweekly\.\d{6}\.\d{1}.*}} +FROM mcr.microsoft.com/aifx/acpt/stable-ubuntu2204-cu118-py310-torch222:{{latest-image-tag:biweekly\.\d{6}\.\d{1}.*}} USER root RUN apt-get -y update diff --git a/assets/training/finetune_acft_image/environments/acft_video_mmtracking/context/Dockerfile b/assets/training/finetune_acft_image/environments/acft_video_mmtracking/context/Dockerfile index e7cbae41cd..87d88dec2f 100644 --- a/assets/training/finetune_acft_image/environments/acft_video_mmtracking/context/Dockerfile +++ b/assets/training/finetune_acft_image/environments/acft_video_mmtracking/context/Dockerfile @@ -1,5 +1,5 @@ # PTCA image -FROM mcr.microsoft.com/aifx/acpt/stable-ubuntu2004-cu118-py310-torch222:{{latest-image-tag:biweekly\.\d{6}\.\d{1}.*}} +FROM mcr.microsoft.com/aifx/acpt/stable-ubuntu2204-cu118-py310-torch222:{{latest-image-tag:biweekly\.\d{6}\.\d{1}.*}} USER root RUN apt-get -y update diff --git a/assets/training/finetune_acft_image/environments/acpt_image_framework_selector/context/Dockerfile b/assets/training/finetune_acft_image/environments/acpt_image_framework_selector/context/Dockerfile index e75290d8c2..9c5e376f89 100644 --- a/assets/training/finetune_acft_image/environments/acpt_image_framework_selector/context/Dockerfile +++ b/assets/training/finetune_acft_image/environments/acpt_image_framework_selector/context/Dockerfile @@ -1,5 +1,5 @@ # PTCA image -FROM mcr.microsoft.com/aifx/acpt/stable-ubuntu2004-cu118-py310-torch222:{{latest-image-tag:biweekly\.\d{6}\.\d{1}.*}} +FROM mcr.microsoft.com/aifx/acpt/stable-ubuntu2204-cu118-py310-torch222:{{latest-image-tag:biweekly\.\d{6}\.\d{1}.*}} RUN apt-get -y update From 34f1ccbc9d405f077fe237979055cc5b92364ea7 Mon Sep 17 00:00:00 2001 From: Aishwary Gupta Date: Mon, 9 Dec 2024 15:45:18 +0530 Subject: [PATCH 09/31] Upgrade components to use new env with Ubuntu 22.04 (#3646) * Upgrade components to use new env with Ubuntu 22.04 * update eval components version to 0.0.35 * update data-import env version to 7 --- .../finetune/chat_completion/spec.yaml | 4 ++-- .../finetune/question_answering/spec.yaml | 4 ++-- .../components/finetune/summarization/spec.yaml | 4 ++-- .../finetune/text_classification/spec.yaml | 4 ++-- .../finetune/text_generation/spec.yaml | 4 ++-- .../finetune/token_classification/spec.yaml | 4 ++-- .../components/finetune/translation/spec.yaml | 4 ++-- .../components/model_converter/common/spec.yaml | 4 ++-- .../model_import/chat_completion/spec.yaml | 4 ++-- .../model_import/question_answering/spec.yaml | 4 ++-- .../model_import/summarization/spec.yaml | 4 ++-- .../model_import/text_classification/spec.yaml | 4 ++-- .../model_import/text_generation/spec.yaml | 4 ++-- .../model_import/token_classification/spec.yaml | 4 ++-- .../model_import/translation/spec.yaml | 4 ++-- .../chat_completion/spec.yaml | 12 ++++++------ .../question_answering/spec.yaml | 16 ++++++++-------- .../pipeline_components/summarization/spec.yaml | 16 ++++++++-------- .../text_classification/spec.yaml | 16 ++++++++-------- .../text_generation/spec.yaml | 16 ++++++++-------- .../spec.yaml | 12 ++++++------ .../spec.yaml | 12 ++++++------ .../spec.yaml | 12 ++++++------ .../spec.yaml | 12 ++++++------ .../spec.yaml | 12 ++++++------ .../spec.yaml | 12 ++++++------ .../spec.yaml | 12 ++++++------ .../spec.yaml | 12 ++++++------ .../spec.yaml | 12 ++++++------ .../token_classification/spec.yaml | 16 ++++++++-------- .../pipeline_components/translation/spec.yaml | 16 ++++++++-------- .../preprocess/chat_completion/spec.yaml | 4 ++-- .../preprocess/question_answering/spec.yaml | 4 ++-- .../preprocess/summarization/spec.yaml | 4 ++-- .../preprocess/text_classification/spec.yaml | 4 ++-- .../preprocess/text_generation/spec.yaml | 4 ++-- .../preprocess/token_classification/spec.yaml | 4 ++-- .../components/preprocess/translation/spec.yaml | 4 ++-- .../components/validation/common/spec.yaml | 4 ++-- .../components_v2/data_import/common/spec.yaml | 4 ++-- .../finetune/chat_completion/spec.yaml | 4 ++-- .../finetune/text_generation/spec.yaml | 4 ++-- .../chat_completion/spec.yaml | 6 +++--- .../text_generation/spec.yaml | 6 +++--- 44 files changed, 166 insertions(+), 166 deletions(-) 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 07a67b3fdf..38f70381bc 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.63 +version: 0.0.64 type: command is_deterministic: True @@ -8,7 +8,7 @@ is_deterministic: True display_name: Chat Completion Finetune description: 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_finetune) to learn more. -environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/77 +environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/78 code: ../../../src/finetune 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 a07f61f967..75b5b86377 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.63 +version: 0.0.64 type: command is_deterministic: True @@ -8,7 +8,7 @@ is_deterministic: True display_name: Question Answering Finetune description: 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_finetune) to learn more. -environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/77 +environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/78 code: ../../../src/finetune 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 069e3e931d..a3a471ed08 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.63 +version: 0.0.64 type: command is_deterministic: True @@ -8,7 +8,7 @@ is_deterministic: True display_name: Summarization Finetune description: 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_finetune) to learn more. -environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/77 +environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/78 code: ../../../src/finetune 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 76b2cd04f7..c4f9e79bef 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.63 +version: 0.0.64 type: command is_deterministic: false @@ -8,7 +8,7 @@ is_deterministic: false display_name: Text Classification Finetune description: 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_finetune) to learn more. -environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/77 +environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/78 code: ../../../src/finetune 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 a5103acfb3..82f88816bd 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.63 +version: 0.0.64 type: command is_deterministic: True @@ -8,7 +8,7 @@ is_deterministic: True display_name: Text Generation Finetune description: Component to finetune model for Text Generation task -environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/77 +environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/78 code: ../../../src/finetune 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 a8515c1efd..7ea0f1ecd0 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.63 +version: 0.0.64 type: command is_deterministic: false @@ -8,7 +8,7 @@ is_deterministic: false display_name: Token Classification Finetune description: 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_finetune) to learn more. -environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/77 +environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/78 code: ../../../src/finetune 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 dcc0890d91..4ec03205e7 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.63 +version: 0.0.64 type: command is_deterministic: True @@ -8,7 +8,7 @@ is_deterministic: True display_name: Translation Finetune description: 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_finetune) to learn more. -environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/77 +environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/78 code: ../../../src/finetune 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 a2ac35e56e..7d9b49cf5e 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.63 +version: 0.0.64 type: command is_deterministic: True @@ -8,7 +8,7 @@ is_deterministic: True display_name: Common Model Converter description: Component to convert the finetune job output to pytorch and mlflow model -environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/77 +environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/78 code: ../../../src/model_converter 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 0c19a0ff68..1fd29aabee 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.63 +version: 0.0.64 type: command is_deterministic: True @@ -8,7 +8,7 @@ is_deterministic: True display_name: Chat Completion Model Import description: Component to import PyTorch / MLFlow model. See [docs](https://aka.ms/azureml/components/chat_completion_model_import) to learn more. -environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/77 +environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/78 code: ../../../src/model_selector 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 803a96418f..3c9b6f12a5 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.63 +version: 0.0.64 type: command is_deterministic: True @@ -8,7 +8,7 @@ is_deterministic: True display_name: Question Answering Model Import description: Component to import PyTorch / MLFlow model. See [docs](https://aka.ms/azureml/components/question_answering_model_import) to learn more. -environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/77 +environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/78 code: ../../../src/model_selector 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 14c6641d7e..bf31286433 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.63 +version: 0.0.64 type: command is_deterministic: True @@ -8,7 +8,7 @@ is_deterministic: True display_name: Summarization Model Import description: Component to import PyTorch / MLFlow model. See [docs](https://aka.ms/azureml/components/summarization_model_import) to learn more. -environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/77 +environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/78 code: ../../../src/model_selector 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 03ea9ad8a6..fcec786fff 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.63 +version: 0.0.64 type: command is_deterministic: True @@ -8,7 +8,7 @@ is_deterministic: True display_name: Text Classification Model Import description: Component to import PyTorch / MLFlow model. See [docs](https://aka.ms/azureml/components/text_classification_model_import) to learn more. -environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/77 +environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/78 code: ../../../src/model_selector 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 2b8ef96dca..e7c88b299d 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.63 +version: 0.0.64 type: command is_deterministic: True @@ -8,7 +8,7 @@ is_deterministic: True display_name: Text Generation Model Import description: Import PyTorch / MLFlow model -environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/77 +environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/78 code: ../../../src/model_selector 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 f2545e8cae..95ae17fcac 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.63 +version: 0.0.64 type: command is_deterministic: True @@ -8,7 +8,7 @@ is_deterministic: True display_name: Token Classification Model Import description: Component to import PyTorch / MLFlow model. See [docs](https://aka.ms/azureml/components/token_classification_model_import) to learn more. -environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/77 +environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/78 code: ../../../src/model_selector 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 da48dd8eda..b7f4c39347 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.63 +version: 0.0.64 type: command is_deterministic: True @@ -8,7 +8,7 @@ is_deterministic: True display_name: Translation Model Import description: Component to import PyTorch / MLFlow model. See [docs](https://aka.ms/azureml/components/translation_model_import) to learn more. -environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/77 +environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/78 code: ../../../src/model_selector 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 2d5dec123f..dd8e79c417 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.65 +version: 0.0.66 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.63 + component: azureml:ft_nlp_common_validation:0.0.64 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.63 + component: azureml:chat_completion_model_import:0.0.64 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.63 + component: azureml:chat_completion_datapreprocess:0.0.64 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.63 + component: azureml:chat_completion_finetune:0.0.64 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.63 + component: azureml:ft_nlp_model_converter:0.0.64 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/question_answering/spec.yaml b/assets/training/finetune_acft_hf_nlp/components/pipeline_components/question_answering/spec.yaml index cd9e192ebc..42a7d2a335 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.65 +version: 0.0.66 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.63 + component: azureml:ft_nlp_common_validation:0.0.64 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.63 + component: azureml:question_answering_model_import:0.0.64 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.63 + component: azureml:question_answering_datapreprocess:0.0.64 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.63 + component: azureml:question_answering_finetune:0.0.64 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.63 + component: azureml:ft_nlp_model_converter:0.0.64 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.33 + component: azureml:model_prediction:0.0.35 compute: '${{parent.inputs.compute_model_evaluation}}' resources: instance_type: '${{parent.inputs.instance_type_model_evaluation}}' @@ -697,7 +697,7 @@ jobs: evaluation_config_params: '${{parent.inputs.evaluation_config_params}}' compute_metrics: type: command - component: azureml:compute_metrics:0.0.33 + component: azureml:compute_metrics:0.0.35 compute: '${{parent.inputs.compute_model_evaluation}}' resources: instance_type: '${{parent.inputs.instance_type_model_evaluation}}' 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 f85f4473dd..0a1920e036 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.65 +version: 0.0.66 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.63 + component: azureml:ft_nlp_common_validation:0.0.64 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.63 + component: azureml:summarization_model_import:0.0.64 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.63 + component: azureml:summarization_datapreprocess:0.0.64 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.63 + component: azureml:summarization_finetune:0.0.64 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.63 + component: azureml:ft_nlp_model_converter:0.0.64 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.33 + component: azureml:model_prediction:0.0.35 compute: '${{parent.inputs.compute_model_evaluation}}' resources: instance_type: '${{parent.inputs.instance_type_model_evaluation}}' @@ -663,7 +663,7 @@ jobs: evaluation_config_params: '${{parent.inputs.evaluation_config_params}}' compute_metrics: type: command - component: azureml:compute_metrics:0.0.33 + component: azureml:compute_metrics:0.0.35 compute: '${{parent.inputs.compute_model_evaluation}}' resources: instance_type: '${{parent.inputs.instance_type_model_evaluation}}' 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 239859e107..cb08be0299 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.65 +version: 0.0.66 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.63 + component: azureml:ft_nlp_common_validation:0.0.64 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.63 + component: azureml:text_classification_model_import:0.0.64 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.63 + component: azureml:text_classification_datapreprocess:0.0.64 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.63 + component: azureml:text_classification_finetune:0.0.64 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.63 + component: azureml:ft_nlp_model_converter:0.0.64 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.33 + component: azureml:model_prediction:0.0.35 compute: '${{parent.inputs.compute_model_evaluation}}' resources: instance_type: '${{parent.inputs.instance_type_model_evaluation}}' @@ -666,7 +666,7 @@ jobs: evaluation_config_params: '${{parent.inputs.evaluation_config_params}}' compute_metrics: type: command - component: azureml:compute_metrics:0.0.33 + component: azureml:compute_metrics:0.0.35 compute: '${{parent.inputs.compute_model_evaluation}}' resources: instance_type: '${{parent.inputs.instance_type_model_evaluation}}' 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 61e85a2e9f..ef984737c0 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.65 +version: 0.0.66 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.63 + component: azureml:ft_nlp_common_validation:0.0.64 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.63 + component: azureml:text_generation_model_import:0.0.64 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.63 + component: azureml:text_generation_datapreprocess:0.0.64 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.63 + component: azureml:text_generation_finetune:0.0.64 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.63 + component: azureml:ft_nlp_model_converter:0.0.64 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.33 + component: azureml:model_prediction:0.0.35 compute: '${{parent.inputs.compute_model_evaluation}}' resources: instance_type: '${{parent.inputs.instance_type_model_evaluation}}' @@ -683,7 +683,7 @@ jobs: evaluation_config_params: '${{parent.inputs.evaluation_config_params}}' compute_metrics: type: command - component: azureml:compute_metrics:0.0.33 + component: azureml:compute_metrics:0.0.35 compute: '${{parent.inputs.compute_model_evaluation}}' resources: instance_type: '${{parent.inputs.instance_type_model_evaluation}}' 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 0a0909bdbc..82d87fb2e2 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.65 +version: 0.0.66 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.63 + component: azureml:ft_nlp_common_validation:0.0.64 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.63 + component: azureml:text_generation_model_import:0.0.64 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.63 + component: azureml:text_generation_datapreprocess:0.0.64 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.63 + component: azureml:text_generation_finetune:0.0.64 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.63 + component: azureml:ft_nlp_model_converter:0.0.64 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 628e4f6879..8755e6ec26 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.65 +version: 0.0.66 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.63 + component: azureml:ft_nlp_common_validation:0.0.64 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.63 + component: azureml:text_generation_model_import:0.0.64 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.63 + component: azureml:text_generation_datapreprocess:0.0.64 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.63 + component: azureml:text_generation_finetune:0.0.64 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.63 + component: azureml:ft_nlp_model_converter:0.0.64 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 91726724c4..78279c5358 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.65 +version: 0.0.66 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.63 + component: azureml:ft_nlp_common_validation:0.0.64 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.63 + component: azureml:text_generation_model_import:0.0.64 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.63 + component: azureml:text_generation_datapreprocess:0.0.64 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.63 + component: azureml:text_generation_finetune:0.0.64 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.63 + component: azureml:ft_nlp_model_converter:0.0.64 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 e1eabca2b9..8dfe00ca85 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.65 +version: 0.0.66 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.63 + component: azureml:ft_nlp_common_validation:0.0.64 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.63 + component: azureml:text_generation_model_import:0.0.64 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.63 + component: azureml:text_generation_datapreprocess:0.0.64 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.63 + component: azureml:text_generation_finetune:0.0.64 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.63 + component: azureml:ft_nlp_model_converter:0.0.64 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 bb45f1374e..a4285475a0 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.65 +version: 0.0.66 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.63 + component: azureml:ft_nlp_common_validation:0.0.64 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.63 + component: azureml:text_generation_model_import:0.0.64 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.63 + component: azureml:text_generation_datapreprocess:0.0.64 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.63 + component: azureml:text_generation_finetune:0.0.64 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.63 + component: azureml:ft_nlp_model_converter:0.0.64 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 79f7735b49..4af207340e 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.65 +version: 0.0.66 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.63 + component: azureml:ft_nlp_common_validation:0.0.64 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.63 + component: azureml:text_generation_model_import:0.0.64 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.63 + component: azureml:text_generation_datapreprocess:0.0.64 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.63 + component: azureml:text_generation_finetune:0.0.64 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.63 + component: azureml:ft_nlp_model_converter:0.0.64 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 5cd0b38cfd..4f7cb9eb53 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.65 +version: 0.0.66 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.63 + component: azureml:ft_nlp_common_validation:0.0.64 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.63 + component: azureml:text_generation_model_import:0.0.64 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.63 + component: azureml:text_generation_datapreprocess:0.0.64 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.63 + component: azureml:text_generation_finetune:0.0.64 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.63 + component: azureml:ft_nlp_model_converter:0.0.64 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 3f22614f04..6e98780d8c 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.65 +version: 0.0.66 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.63 + component: azureml:ft_nlp_common_validation:0.0.64 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.63 + component: azureml:text_generation_model_import:0.0.64 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.63 + component: azureml:text_generation_datapreprocess:0.0.64 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.63 + component: azureml:text_generation_finetune:0.0.64 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.63 + component: azureml:ft_nlp_model_converter:0.0.64 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 f551fb3069..97ec3207d0 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.65 +version: 0.0.66 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.63 + component: azureml:ft_nlp_common_validation:0.0.64 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.63 + component: azureml:text_generation_model_import:0.0.64 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.63 + component: azureml:text_generation_datapreprocess:0.0.64 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.63 + component: azureml:text_generation_finetune:0.0.64 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.63 + component: azureml:ft_nlp_model_converter:0.0.64 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 9ca78c9155..e1346bc0f3 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.65 +version: 0.0.66 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.63 + component: azureml:ft_nlp_common_validation:0.0.64 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.63 + component: azureml:token_classification_model_import:0.0.64 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.63 + component: azureml:token_classification_datapreprocess:0.0.64 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.63 + component: azureml:token_classification_finetune:0.0.64 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.63 + component: azureml:ft_nlp_model_converter:0.0.64 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.33 + component: azureml:model_prediction:0.0.35 compute: '${{parent.inputs.compute_model_evaluation}}' resources: instance_type: '${{parent.inputs.instance_type_model_evaluation}}' @@ -657,7 +657,7 @@ jobs: evaluation_config_params: '${{parent.inputs.evaluation_config_params}}' compute_metrics: type: command - component: azureml:compute_metrics:0.0.33 + component: azureml:compute_metrics:0.0.35 compute: '${{parent.inputs.compute_model_evaluation}}' resources: instance_type: '${{parent.inputs.instance_type_model_evaluation}}' 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 e24285371b..2af8b75c81 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.65 +version: 0.0.66 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.63 + component: azureml:ft_nlp_common_validation:0.0.64 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.63 + component: azureml:translation_model_import:0.0.64 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.63 + component: azureml:translation_datapreprocess:0.0.64 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.63 + component: azureml:translation_finetune:0.0.64 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.63 + component: azureml:ft_nlp_model_converter:0.0.64 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.33 + component: azureml:model_prediction:0.0.35 compute: '${{parent.inputs.compute_model_evaluation}}' resources: instance_type: '${{parent.inputs.instance_type_model_evaluation}}' @@ -654,7 +654,7 @@ jobs: evaluation_config_params: '${{parent.inputs.evaluation_config_params}}' compute_metrics: type: command - component: azureml:compute_metrics:0.0.33 + component: azureml:compute_metrics:0.0.35 compute: '${{parent.inputs.compute_model_evaluation}}' resources: instance_type: '${{parent.inputs.instance_type_model_evaluation}}' 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 0d32b55e76..c7010123f7 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.63 +version: 0.0.64 type: command is_deterministic: True @@ -8,7 +8,7 @@ is_deterministic: True display_name: Chat Completion DataPreProcess description: Component to preprocess data for chat completion task. See [docs](https://aka.ms/azureml/components/chat_completion_datapreprocess) to learn more. -environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/77 +environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/78 code: ../../../src/preprocess 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 f37be970dc..7a6615e5da 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.63 +version: 0.0.64 type: command is_deterministic: True @@ -8,7 +8,7 @@ is_deterministic: True display_name: Question Answering DataPreProcess description: Component to preprocess data for question answering task. See [docs](https://aka.ms/azureml/components/question_answering_datapreprocess) to learn more. -environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/77 +environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/78 code: ../../../src/preprocess 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 d0e6a382c5..5ac24b5d66 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.63 +version: 0.0.64 type: command is_deterministic: True @@ -8,7 +8,7 @@ is_deterministic: True display_name: Summarization DataPreProcess description: Component to preprocess data for summarization task. See [docs](https://aka.ms/azureml/components/summarization_datapreprocess) to learn more. -environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/77 +environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/78 code: ../../../src/preprocess 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 35710a2033..c6e7aca760 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.63 +version: 0.0.64 type: command is_deterministic: True @@ -8,7 +8,7 @@ is_deterministic: True display_name: Text Classification DataPreProcess description: Component to preprocess data for single label classification task. See [docs](https://aka.ms/azureml/components/text_classification_datapreprocess) to learn more. -environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/77 +environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/78 code: ../../../src/preprocess 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 b32fa8b8e6..00a7b0299b 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.63 +version: 0.0.64 type: command is_deterministic: True @@ -8,7 +8,7 @@ is_deterministic: True display_name: Text Generation DataPreProcess description: Component to preprocess data for text generation task -environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/77 +environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/78 code: ../../../src/preprocess 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 861921b8dd..ee38f272b1 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.63 +version: 0.0.64 type: command is_deterministic: True @@ -8,7 +8,7 @@ is_deterministic: True display_name: Token Classification DataPreProcess description: Component to preprocess data for token classification task. See [docs](https://aka.ms/azureml/components/token_classification_datapreprocess) to learn more. -environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/77 +environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/78 code: ../../../src/preprocess 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 02f29397ac..b9499cd8a0 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.63 +version: 0.0.64 type: command is_deterministic: True @@ -8,7 +8,7 @@ is_deterministic: True display_name: Translation DataPreProcess description: Component to preprocess data for translation task. See [docs](https://aka.ms/azureml/components/translation_datapreprocess) to learn more. -environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/77 +environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/78 code: ../../../src/preprocess 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 187d575be1..e7b78fadda 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.63 +version: 0.0.64 type: command is_deterministic: True @@ -8,7 +8,7 @@ is_deterministic: True display_name: Common Validation Component description: Component to validate the finetune job against Validation Service -environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/77 +environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/78 code: ../../../src/validation diff --git a/assets/training/finetune_acft_hf_nlp/components_v2/data_import/common/spec.yaml b/assets/training/finetune_acft_hf_nlp/components_v2/data_import/common/spec.yaml index c3f2b8765f..a0a9ca7f88 100644 --- a/assets/training/finetune_acft_hf_nlp/components_v2/data_import/common/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components_v2/data_import/common/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: oss_text_generation_data_import -version: 0.0.25 +version: 0.0.26 type: command is_deterministic: True @@ -8,7 +8,7 @@ is_deterministic: True display_name: OSS Text Generation Data Import description: FTaaS component to copy user training data to output -environment: azureml://registries/azureml/environments/acft-hf-nlp-data-import/versions/4 +environment: azureml://registries/azureml/environments/acft-hf-nlp-data-import/versions/7 inputs: task_name: diff --git a/assets/training/finetune_acft_hf_nlp/components_v2/finetune/chat_completion/spec.yaml b/assets/training/finetune_acft_hf_nlp/components_v2/finetune/chat_completion/spec.yaml index a3a66eee58..6c3c1b44c5 100644 --- a/assets/training/finetune_acft_hf_nlp/components_v2/finetune/chat_completion/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components_v2/finetune/chat_completion/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: oss_chat_completion_finetune -version: 0.0.25 +version: 0.0.26 type: command is_deterministic: True @@ -8,7 +8,7 @@ is_deterministic: True display_name: OSS Chat Completion Finetune description: FTaaS component to finetune model for Chat Completion task -environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/77 +environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/78 inputs: task_name: diff --git a/assets/training/finetune_acft_hf_nlp/components_v2/finetune/text_generation/spec.yaml b/assets/training/finetune_acft_hf_nlp/components_v2/finetune/text_generation/spec.yaml index f96b591587..11cceb143b 100644 --- a/assets/training/finetune_acft_hf_nlp/components_v2/finetune/text_generation/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components_v2/finetune/text_generation/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json name: oss_text_generation_finetune -version: 0.0.25 +version: 0.0.26 type: command is_deterministic: True @@ -8,7 +8,7 @@ is_deterministic: True display_name: OSS Text Generation Finetune description: FTaaS component to finetune model for Text Generation task -environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/77 +environment: azureml://registries/azureml/environments/acft-hf-nlp-gpu/versions/78 inputs: task_name: diff --git a/assets/training/finetune_acft_hf_nlp/components_v2/pipeline_components/chat_completion/spec.yaml b/assets/training/finetune_acft_hf_nlp/components_v2/pipeline_components/chat_completion/spec.yaml index d5e1d24959..31b448c9c2 100644 --- a/assets/training/finetune_acft_hf_nlp/components_v2/pipeline_components/chat_completion/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components_v2/pipeline_components/chat_completion/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json name: oss_chat_completion_pipeline -version: 0.0.25 +version: 0.0.26 type: pipeline display_name: OSS Chat Completion Pipeline description: FTaaS Pipeline component for chat completion @@ -123,7 +123,7 @@ outputs: jobs: oss_text_generation_data_import: type: command - component: azureml:oss_text_generation_data_import:0.0.25 + component: azureml:oss_text_generation_data_import:0.0.26 compute: '${{parent.inputs.compute_data_import}}' resources: instance_type: '${{parent.inputs.instance_type_data_import}}' @@ -142,7 +142,7 @@ jobs: user_column_names: 'messages' oss_chat_completion_finetune: type: command - component: azureml:oss_chat_completion_finetune:0.0.25 + component: azureml:oss_chat_completion_finetune:0.0.26 compute: '${{parent.inputs.compute_finetune}}' resources: instance_type: '${{parent.inputs.instance_type_finetune}}' diff --git a/assets/training/finetune_acft_hf_nlp/components_v2/pipeline_components/text_generation/spec.yaml b/assets/training/finetune_acft_hf_nlp/components_v2/pipeline_components/text_generation/spec.yaml index 893aa018c7..540a6bdb85 100644 --- a/assets/training/finetune_acft_hf_nlp/components_v2/pipeline_components/text_generation/spec.yaml +++ b/assets/training/finetune_acft_hf_nlp/components_v2/pipeline_components/text_generation/spec.yaml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json name: oss_text_generation_pipeline -version: 0.0.25 +version: 0.0.26 type: pipeline display_name: OSS Text Generation Pipeline description: FTaaS Pipeline component for text generation @@ -138,7 +138,7 @@ outputs: jobs: oss_text_generation_data_import: type: command - component: azureml:oss_text_generation_data_import:0.0.25 + component: azureml:oss_text_generation_data_import:0.0.26 compute: '${{parent.inputs.compute_data_import}}' resources: instance_type: '${{parent.inputs.instance_type_data_import}}' @@ -157,7 +157,7 @@ jobs: user_column_names: '${{parent.inputs.text_key}},${{parent.inputs.ground_truth_key}}' oss_text_generation_finetune: type: command - component: azureml:oss_text_generation_finetune:0.0.25 + component: azureml:oss_text_generation_finetune:0.0.26 compute: '${{parent.inputs.compute_finetune}}' resources: instance_type: '${{parent.inputs.instance_type_finetune}}' From 730981b19ac4c7a3d806e8290da9203274683381 Mon Sep 17 00:00:00 2001 From: jeff-shepherd <39775772+jeff-shepherd@users.noreply.github.com> Date: Tue, 10 Dec 2024 13:25:50 -0800 Subject: [PATCH 10/31] Updated automl environments for SDK 1.59.0 (#3660) * Updated automl environments for SDK 1.59.0 --- .../environments/ai-ml-automl-dnn-text-gpu/context/Dockerfile | 2 +- .../automl/environments/ai-ml-automl/context/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/training/automl/environments/ai-ml-automl-dnn-text-gpu/context/Dockerfile b/assets/training/automl/environments/ai-ml-automl-dnn-text-gpu/context/Dockerfile index 9cf5f650ad..f964de0d4e 100644 --- a/assets/training/automl/environments/ai-ml-automl-dnn-text-gpu/context/Dockerfile +++ b/assets/training/automl/environments/ai-ml-automl-dnn-text-gpu/context/Dockerfile @@ -62,7 +62,7 @@ RUN HOROVOD_WITH_PYTORCH=1 pip install --no-cache-dir git+https://github.com/hor # by fixing dependencies in the base packages RUN pip list && \ pip install pyarrow==14.0.2 \ - 'transformers[sentencepiece,torch]==4.36.2' \ + 'transformers[sentencepiece,torch]==4.37.2' \ aiohttp==3.10.2 # end pip install diff --git a/assets/training/automl/environments/ai-ml-automl/context/Dockerfile b/assets/training/automl/environments/ai-ml-automl/context/Dockerfile index e4495427c0..4a25c5454e 100644 --- a/assets/training/automl/environments/ai-ml-automl/context/Dockerfile +++ b/assets/training/automl/environments/ai-ml-automl/context/Dockerfile @@ -47,7 +47,7 @@ RUN pip install \ azureml-dataset-runtime=={{latest-pypi-version}} \ azureml-defaults=={{latest-pypi-version}} \ # TODO: replace the hard coded above by a referenceto azureml-train-automl[tabular] - 'mlflow-skinny==2.9.2' \ + 'mlflow-skinny==2.15.1' \ 'xgboost==1.5.2' \ 'prophet==1.1.4' \ 'inference-schema' \ From 64c9be803e92431438b44f7802091c08c2b2b263 Mon Sep 17 00:00:00 2001 From: Yeshwanth N Date: Wed, 11 Dec 2024 20:26:20 +0530 Subject: [PATCH 11/31] [BugFix] : New image with 0.0.64 pypi packages for bug fix - resume_from_ckpt sanitize (#3664) --- .../environments/acft_image_mmdetection/context/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/training/finetune_acft_image/environments/acft_image_mmdetection/context/Dockerfile b/assets/training/finetune_acft_image/environments/acft_image_mmdetection/context/Dockerfile index 6f2b19d3d2..6ec8b3c43f 100644 --- a/assets/training/finetune_acft_image/environments/acft_image_mmdetection/context/Dockerfile +++ b/assets/training/finetune_acft_image/environments/acft_image_mmdetection/context/Dockerfile @@ -21,4 +21,4 @@ RUN sed -i 's/2.2.0/2.3.0/' /opt/conda/envs/ptca/lib/python3.10/site-packages/mm # Vulnerability Fix RUN pip install gunicorn==22.0.0 -# dummy number to change when needing to force rebuild without changing the definition: 1 \ No newline at end of file +# dummy number to change when needing to force rebuild without changing the definition: 2 \ No newline at end of file From f969bcf030b94667cfda75d2693c9d3276b86c4b Mon Sep 17 00:00:00 2001 From: runhli <87873226+runhli@users.noreply.github.com> Date: Wed, 11 Dec 2024 14:16:55 -0800 Subject: [PATCH 12/31] upgrade azureml rag to 0.2.37.1, bump verions and remove pinecone (#3662) * upgrade azureml-rag to 0.2.37.1 * upgrade aiohttp * reomve * try * revert * remove pinecone --- .../data_ingestion_dataset_to_acs_basic/spec.yaml | 12 ++++++------ .../data_ingestion_dataset_to_acs_user_id/spec.yaml | 12 ++++++------ .../data_ingestion_dataset_to_faiss_basic/spec.yaml | 12 ++++++------ .../spec.yaml | 12 ++++++------ .../rag/components/crack_and_chunk/spec.yaml | 2 +- .../components/crack_and_chunk_and_embed/spec.yaml | 2 +- .../crack_chunk_embed_index_and_register/spec.yaml | 2 +- .../rag/components/crawl_url/spec.yaml | 2 +- .../rag/components/create_faiss_index/spec.yaml | 2 +- .../rag/components/create_promptflow/spec.yaml | 2 +- .../rag/components/data_import_acs/spec.yaml | 2 +- .../rag/components/generate_embeddings/spec.yaml | 2 +- .../generate_embeddings_parallel/spec.yaml | 2 +- .../rag/components/git_clone/spec.yaml | 2 +- .../rag/components/image_embed_index/spec.yaml | 2 +- .../rag/components/qa_data_generation/spec.yaml | 2 +- .../rag/components/register_mlindex_asset/spec.yaml | 2 +- .../rag/components/register_qa_data_asset/spec.yaml | 2 +- .../rag/components/update_acs_index/spec.yaml | 2 +- .../update_azure_cosmos_mongo_vcore_index/spec.yaml | 2 +- .../rag/components/update_milvus_index/spec.yaml | 2 +- .../rag/components/update_pinecone_index/spec.yaml | 2 +- .../rag/components/validate_deployments/spec.yaml | 2 +- .../environments/rag/context/conda_dependencies.yaml | 2 +- .../rag_embeddings/context/conda_dependencies.yaml | 2 +- 25 files changed, 45 insertions(+), 45 deletions(-) diff --git a/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_acs_basic/spec.yaml b/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_acs_basic/spec.yaml index 72fde91b2f..8a0648d582 100644 --- a/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_acs_basic/spec.yaml +++ b/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_acs_basic/spec.yaml @@ -4,7 +4,7 @@ type: pipeline tags: Preview: "" -version: 0.0.84 +version: 0.0.85 name: llm_ingest_dataset_to_acs_basic display_name: LLM - Dataset to ACS Pipeline is_deterministic: false @@ -110,7 +110,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_validate_deployments:0.0.79' + component: 'azureml:llm_rag_validate_deployments:0.0.80' identity: type: user_identity inputs: @@ -136,7 +136,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_crack_and_chunk:0.0.76' + component: 'azureml:llm_rag_crack_and_chunk:0.0.77' inputs: input_data: ${{parent.inputs.input_data}} input_glob: ${{parent.inputs.input_glob}} @@ -159,7 +159,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_generate_embeddings:0.0.69' + component: 'azureml:llm_rag_generate_embeddings:0.0.70' inputs: chunks_source: type: uri_folder @@ -209,7 +209,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_update_acs_index:0.0.73' + component: 'azureml:llm_rag_update_acs_index:0.0.74' inputs: embeddings: type: uri_folder @@ -229,7 +229,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_register_mlindex_asset:0.0.73' + component: 'azureml:llm_rag_register_mlindex_asset:0.0.74' inputs: storage_uri: ${{parent.jobs.create_acs_index_job.outputs.index}} asset_name: ${{parent.inputs.embeddings_dataset_name}} diff --git a/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_acs_user_id/spec.yaml b/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_acs_user_id/spec.yaml index d414a1634f..f27eb35120 100644 --- a/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_acs_user_id/spec.yaml +++ b/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_acs_user_id/spec.yaml @@ -4,7 +4,7 @@ type: pipeline tags: Preview: "" -version: 0.0.82 +version: 0.0.83 name: llm_ingest_dataset_to_acs_user_id display_name: LLM - Dataset to ACS Pipeline is_deterministic: false @@ -110,7 +110,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_validate_deployments:0.0.79' + component: 'azureml:llm_rag_validate_deployments:0.0.80' identity: type: user_identity inputs: @@ -136,7 +136,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_crack_and_chunk:0.0.76' + component: 'azureml:llm_rag_crack_and_chunk:0.0.77' identity: type: user_identity inputs: @@ -161,7 +161,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_generate_embeddings:0.0.69' + component: 'azureml:llm_rag_generate_embeddings:0.0.70' identity: type: user_identity inputs: @@ -215,7 +215,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_update_acs_index:0.0.73' + component: 'azureml:llm_rag_update_acs_index:0.0.74' identity: type: user_identity inputs: @@ -237,7 +237,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_register_mlindex_asset:0.0.73' + component: 'azureml:llm_rag_register_mlindex_asset:0.0.74' identity: type: user_identity inputs: diff --git a/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_faiss_basic/spec.yaml b/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_faiss_basic/spec.yaml index bb8c935573..f8e4e9e253 100644 --- a/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_faiss_basic/spec.yaml +++ b/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_faiss_basic/spec.yaml @@ -4,7 +4,7 @@ type: pipeline tags: Preview: "" -version: 0.0.83 +version: 0.0.84 name: llm_ingest_dataset_to_faiss_basic display_name: LLM - Dataset to FAISS Pipeline is_deterministic: false @@ -102,7 +102,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_validate_deployments:0.0.79' + component: 'azureml:llm_rag_validate_deployments:0.0.80' identity: type: user_identity inputs: @@ -125,7 +125,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_crack_and_chunk:0.0.76' + component: 'azureml:llm_rag_crack_and_chunk:0.0.77' inputs: input_data: ${{parent.inputs.input_data}} input_glob: ${{parent.inputs.input_glob}} @@ -148,7 +148,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_generate_embeddings:0.0.69' + component: 'azureml:llm_rag_generate_embeddings:0.0.70' inputs: chunks_source: type: uri_folder @@ -198,7 +198,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_create_faiss_index:0.0.74' + component: 'azureml:llm_rag_create_faiss_index:0.0.75' inputs: embeddings: type: uri_folder @@ -216,7 +216,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_register_mlindex_asset:0.0.73' + component: 'azureml:llm_rag_register_mlindex_asset:0.0.74' inputs: storage_uri: ${{parent.jobs.create_faiss_index_job.outputs.index}} asset_name: ${{parent.inputs.embeddings_dataset_name}} diff --git a/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_faiss_user_id/spec.yaml b/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_faiss_user_id/spec.yaml index 0bb7510fb5..7b16babc18 100644 --- a/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_faiss_user_id/spec.yaml +++ b/assets/large_language_models/components_pipelines/data_ingestion_dataset_to_faiss_user_id/spec.yaml @@ -4,7 +4,7 @@ type: pipeline tags: Preview: "" -version: 0.0.82 +version: 0.0.83 name: llm_ingest_dataset_to_faiss_user_id display_name: LLM - Dataset to FAISS Pipeline is_deterministic: false @@ -102,7 +102,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_validate_deployments:0.0.79' + component: 'azureml:llm_rag_validate_deployments:0.0.80' identity: type: user_identity inputs: @@ -125,7 +125,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_crack_and_chunk:0.0.76' + component: 'azureml:llm_rag_crack_and_chunk:0.0.77' identity: type: user_identity inputs: @@ -150,7 +150,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_generate_embeddings:0.0.69' + component: 'azureml:llm_rag_generate_embeddings:0.0.70' identity: type: user_identity inputs: @@ -204,7 +204,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_create_faiss_index:0.0.74' + component: 'azureml:llm_rag_create_faiss_index:0.0.75' identity: type: user_identity inputs: @@ -224,7 +224,7 @@ jobs: properties: compute_specification: automatic: true - component: 'azureml:llm_rag_register_mlindex_asset:0.0.73' + component: 'azureml:llm_rag_register_mlindex_asset:0.0.74' identity: type: user_identity inputs: diff --git a/assets/large_language_models/rag/components/crack_and_chunk/spec.yaml b/assets/large_language_models/rag/components/crack_and_chunk/spec.yaml index c9765123e5..8c36b2fd89 100644 --- a/assets/large_language_models/rag/components/crack_and_chunk/spec.yaml +++ b/assets/large_language_models/rag/components/crack_and_chunk/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.76 +version: 0.0.77 name: llm_rag_crack_and_chunk display_name: LLM - Crack and Chunk Data is_deterministic: true diff --git a/assets/large_language_models/rag/components/crack_and_chunk_and_embed/spec.yaml b/assets/large_language_models/rag/components/crack_and_chunk_and_embed/spec.yaml index 4e6b615c7c..7619981361 100644 --- a/assets/large_language_models/rag/components/crack_and_chunk_and_embed/spec.yaml +++ b/assets/large_language_models/rag/components/crack_and_chunk_and_embed/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.47 +version: 0.0.48 name: llm_rag_crack_and_chunk_and_embed display_name: LLM - Crack, Chunk and Embed Data is_deterministic: true diff --git a/assets/large_language_models/rag/components/crack_chunk_embed_index_and_register/spec.yaml b/assets/large_language_models/rag/components/crack_chunk_embed_index_and_register/spec.yaml index 2f8255cddb..62dad5ba9a 100644 --- a/assets/large_language_models/rag/components/crack_chunk_embed_index_and_register/spec.yaml +++ b/assets/large_language_models/rag/components/crack_chunk_embed_index_and_register/spec.yaml @@ -1,5 +1,5 @@ name: llm_rag_crack_chunk_embed_index_and_register -version: 0.0.35 +version: 0.0.36 tags: Preview: "" diff --git a/assets/large_language_models/rag/components/crawl_url/spec.yaml b/assets/large_language_models/rag/components/crawl_url/spec.yaml index e9f6132d84..94397c7d8e 100644 --- a/assets/large_language_models/rag/components/crawl_url/spec.yaml +++ b/assets/large_language_models/rag/components/crawl_url/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.34 +version: 0.0.35 name: llm_rag_crawl_url display_name: LLM - Crawl URL to Retrieve Data is_deterministic: true diff --git a/assets/large_language_models/rag/components/create_faiss_index/spec.yaml b/assets/large_language_models/rag/components/create_faiss_index/spec.yaml index 480868810c..c7f70d7b68 100644 --- a/assets/large_language_models/rag/components/create_faiss_index/spec.yaml +++ b/assets/large_language_models/rag/components/create_faiss_index/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.74 +version: 0.0.75 name: llm_rag_create_faiss_index display_name: LLM - Create FAISS Index is_deterministic: true diff --git a/assets/large_language_models/rag/components/create_promptflow/spec.yaml b/assets/large_language_models/rag/components/create_promptflow/spec.yaml index 523498eb07..9f0fffe781 100644 --- a/assets/large_language_models/rag/components/create_promptflow/spec.yaml +++ b/assets/large_language_models/rag/components/create_promptflow/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.85 +version: 0.0.86 name: llm_rag_create_promptflow display_name: LLM - Create Prompt Flow is_deterministic: true diff --git a/assets/large_language_models/rag/components/data_import_acs/spec.yaml b/assets/large_language_models/rag/components/data_import_acs/spec.yaml index 1a8e0d0826..76a7146194 100644 --- a/assets/large_language_models/rag/components/data_import_acs/spec.yaml +++ b/assets/large_language_models/rag/components/data_import_acs/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.70 +version: 0.0.71 name: llm_rag_data_import_acs display_name: LLM - Import Data from ACS is_deterministic: false diff --git a/assets/large_language_models/rag/components/generate_embeddings/spec.yaml b/assets/large_language_models/rag/components/generate_embeddings/spec.yaml index 4004be9fdd..c0df214689 100644 --- a/assets/large_language_models/rag/components/generate_embeddings/spec.yaml +++ b/assets/large_language_models/rag/components/generate_embeddings/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.69 +version: 0.0.70 name: llm_rag_generate_embeddings display_name: LLM - Generate Embeddings is_deterministic: true diff --git a/assets/large_language_models/rag/components/generate_embeddings_parallel/spec.yaml b/assets/large_language_models/rag/components/generate_embeddings_parallel/spec.yaml index bffff91620..974cc515f3 100644 --- a/assets/large_language_models/rag/components/generate_embeddings_parallel/spec.yaml +++ b/assets/large_language_models/rag/components/generate_embeddings_parallel/spec.yaml @@ -4,7 +4,7 @@ type: parallel tags: Preview: "" -version: 0.0.75 +version: 0.0.76 name: llm_rag_generate_embeddings_parallel display_name: LLM - Generate Embeddings Parallel is_deterministic: true diff --git a/assets/large_language_models/rag/components/git_clone/spec.yaml b/assets/large_language_models/rag/components/git_clone/spec.yaml index 522296a23b..a8252799e9 100644 --- a/assets/large_language_models/rag/components/git_clone/spec.yaml +++ b/assets/large_language_models/rag/components/git_clone/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.73 +version: 0.0.74 name: llm_rag_git_clone display_name: LLM - Clone Git Repo is_deterministic: true diff --git a/assets/large_language_models/rag/components/image_embed_index/spec.yaml b/assets/large_language_models/rag/components/image_embed_index/spec.yaml index 5c6095231a..ab756969d0 100644 --- a/assets/large_language_models/rag/components/image_embed_index/spec.yaml +++ b/assets/large_language_models/rag/components/image_embed_index/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.27 +version: 0.0.28 name: llm_rag_image_embed_index display_name: LLM - Embedding images with Florence is_deterministic: true diff --git a/assets/large_language_models/rag/components/qa_data_generation/spec.yaml b/assets/large_language_models/rag/components/qa_data_generation/spec.yaml index 2386b0532c..758ae9f732 100644 --- a/assets/large_language_models/rag/components/qa_data_generation/spec.yaml +++ b/assets/large_language_models/rag/components/qa_data_generation/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.73 +version: 0.0.74 name: llm_rag_qa_data_generation display_name: LLM - Generate QnA Test Data is_deterministic: true diff --git a/assets/large_language_models/rag/components/register_mlindex_asset/spec.yaml b/assets/large_language_models/rag/components/register_mlindex_asset/spec.yaml index bbcf4c4793..43e412b009 100644 --- a/assets/large_language_models/rag/components/register_mlindex_asset/spec.yaml +++ b/assets/large_language_models/rag/components/register_mlindex_asset/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.73 +version: 0.0.74 name: llm_rag_register_mlindex_asset display_name: LLM - Register Vector Index Asset is_deterministic: true diff --git a/assets/large_language_models/rag/components/register_qa_data_asset/spec.yaml b/assets/large_language_models/rag/components/register_qa_data_asset/spec.yaml index b3c31b6cb6..e50d949643 100644 --- a/assets/large_language_models/rag/components/register_qa_data_asset/spec.yaml +++ b/assets/large_language_models/rag/components/register_qa_data_asset/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.66 +version: 0.0.67 name: llm_rag_register_qa_data_asset display_name: LLM - Register QA Generation Data Asset is_deterministic: true diff --git a/assets/large_language_models/rag/components/update_acs_index/spec.yaml b/assets/large_language_models/rag/components/update_acs_index/spec.yaml index 539074ba71..70266a8c8b 100644 --- a/assets/large_language_models/rag/components/update_acs_index/spec.yaml +++ b/assets/large_language_models/rag/components/update_acs_index/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.73 +version: 0.0.74 name: llm_rag_update_acs_index display_name: LLM - Update ACS Index is_deterministic: true diff --git a/assets/large_language_models/rag/components/update_azure_cosmos_mongo_vcore_index/spec.yaml b/assets/large_language_models/rag/components/update_azure_cosmos_mongo_vcore_index/spec.yaml index 738a50ad80..0cae00fc15 100644 --- a/assets/large_language_models/rag/components/update_azure_cosmos_mongo_vcore_index/spec.yaml +++ b/assets/large_language_models/rag/components/update_azure_cosmos_mongo_vcore_index/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.29 +version: 0.0.30 name: llm_rag_update_cosmos_mongo_vcore_index display_name: LLM - Update Azure Cosmos Mongo vCore Index is_deterministic: true diff --git a/assets/large_language_models/rag/components/update_milvus_index/spec.yaml b/assets/large_language_models/rag/components/update_milvus_index/spec.yaml index 010a4d3bed..16393cc576 100644 --- a/assets/large_language_models/rag/components/update_milvus_index/spec.yaml +++ b/assets/large_language_models/rag/components/update_milvus_index/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.29 +version: 0.0.30 name: llm_rag_update_milvus_index display_name: LLM - Update Milvus Index is_deterministic: true diff --git a/assets/large_language_models/rag/components/update_pinecone_index/spec.yaml b/assets/large_language_models/rag/components/update_pinecone_index/spec.yaml index e16e3355a6..d08890ae36 100644 --- a/assets/large_language_models/rag/components/update_pinecone_index/spec.yaml +++ b/assets/large_language_models/rag/components/update_pinecone_index/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.41 +version: 0.0.42 name: llm_rag_update_pinecone_index display_name: LLM - Update Pinecone Index is_deterministic: true diff --git a/assets/large_language_models/rag/components/validate_deployments/spec.yaml b/assets/large_language_models/rag/components/validate_deployments/spec.yaml index 6e1d74f94d..869173d33d 100644 --- a/assets/large_language_models/rag/components/validate_deployments/spec.yaml +++ b/assets/large_language_models/rag/components/validate_deployments/spec.yaml @@ -4,7 +4,7 @@ type: command tags: Preview: "" -version: 0.0.79 +version: 0.0.80 name: llm_rag_validate_deployments display_name: LLM - Validate Deployments is_deterministic: false diff --git a/assets/large_language_models/rag/environments/rag/context/conda_dependencies.yaml b/assets/large_language_models/rag/environments/rag/context/conda_dependencies.yaml index c8a4fbd8f0..a5c098e2aa 100644 --- a/assets/large_language_models/rag/environments/rag/context/conda_dependencies.yaml +++ b/assets/large_language_models/rag/environments/rag/context/conda_dependencies.yaml @@ -8,7 +8,7 @@ dependencies: - scikit-learn - pip: # RAG package - - azureml-rag[azure,langchain,cognitive_search,data_generation,pinecone,milvus,azure_cosmos_mongo_vcore,azure_cosmos_nosql]==0.2.37 + - azureml-rag[azure,langchain,cognitive_search,data_generation,milvus,azure_cosmos_mongo_vcore,azure_cosmos_nosql]==0.2.37.1 # Azure - azure-ai-formrecognizer==3.3.1 - azure-identity=={{latest-pypi-version}} diff --git a/assets/large_language_models/rag/environments/rag_embeddings/context/conda_dependencies.yaml b/assets/large_language_models/rag/environments/rag_embeddings/context/conda_dependencies.yaml index 3551dafdbe..fc75f89c8e 100644 --- a/assets/large_language_models/rag/environments/rag_embeddings/context/conda_dependencies.yaml +++ b/assets/large_language_models/rag/environments/rag_embeddings/context/conda_dependencies.yaml @@ -7,7 +7,7 @@ dependencies: - pip=24.0 - pip: # RAG package - - azureml-rag[azure,faiss,langchain,cognitive_search,document_parsing,data_generation,pinecone,milvus,azure_cosmos_mongo_vcore,azure_cosmos_nosql]==0.2.37 + - azureml-rag[azure,faiss,langchain,cognitive_search,document_parsing,data_generation,milvus,azure_cosmos_mongo_vcore,azure_cosmos_nosql]==0.2.37.1 # Azure AI - azure-ai-formrecognizer==3.3.1 # Azure From 77f5d33e8e89c5482f253b1100d877f64226fcf7 Mon Sep 17 00:00:00 2001 From: jeff-shepherd <39775772+jeff-shepherd@users.noreply.github.com> Date: Wed, 11 Dec 2024 15:44:34 -0800 Subject: [PATCH 13/31] Updated onnx in ai-ml-automl-dnn-text-gpu-ptca (#3665) --- .../ai-ml-automl-dnn-text-gpu-ptca/context/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/training/automl/environments/ai-ml-automl-dnn-text-gpu-ptca/context/Dockerfile b/assets/training/automl/environments/ai-ml-automl-dnn-text-gpu-ptca/context/Dockerfile index faf565fa14..688b5a646c 100644 --- a/assets/training/automl/environments/ai-ml-automl-dnn-text-gpu-ptca/context/Dockerfile +++ b/assets/training/automl/environments/ai-ml-automl-dnn-text-gpu-ptca/context/Dockerfile @@ -7,7 +7,7 @@ RUN pip install 'azureml-defaults=={{latest-pypi-version}}' RUN pip uninstall -y onnxruntime -RUN pip install onnx==1.16.2 +RUN pip install onnx==1.17.0 RUN pip uninstall -y onnxruntime-training RUN pip install -i https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/ onnxruntime-training==1.18.0 RUN TORCH_CUDA_ARCH_LIST="5.2;6.0;7.0;8.0;8.6;9.0" python -m onnxruntime.training.ortmodule.torch_cpp_extensions.install From c40b4626ef5b0c5f9b67d8bc449f0dfeaf855e46 Mon Sep 17 00:00:00 2001 From: utkshukla Date: Thu, 12 Dec 2024 11:03:37 +0530 Subject: [PATCH 14/31] 3617181 (#3668) --- .../environments/foundation-model-inference/context/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/training/model_management/environments/foundation-model-inference/context/Dockerfile b/assets/training/model_management/environments/foundation-model-inference/context/Dockerfile index cc3d842c7f..cf7264e6a3 100644 --- a/assets/training/model_management/environments/foundation-model-inference/context/Dockerfile +++ b/assets/training/model_management/environments/foundation-model-inference/context/Dockerfile @@ -53,7 +53,7 @@ RUN pip install llm-optimized-inference==0.2.16 --no-cache-dir RUN pip uninstall transformers -y RUN pip uninstall -y vllm RUN pip install vllm==0.6.1.post2 -RUN pip install transformers==4.44.2 +RUN pip install transformers==4.46.2 # clean conda and pip caches RUN rm -rf ~/.cache/pip From 301b70233ccfa32161e4335acc3279fe1fca41c3 Mon Sep 17 00:00:00 2001 From: roopavidhya <132437865+roopavidhya@users.noreply.github.com> Date: Thu, 12 Dec 2024 12:18:46 +0530 Subject: [PATCH 15/31] Add rad-dino spec (#3658) * Add rad-dino spec * Update readme, add mlmodel file * Update spec * Update spec * Remove unsupported skus * Add inference min sku spec * Add inference min sku spec * Add inference min sku spec * Revert dinov2 spec change --------- Co-authored-by: Roopa G --- .../models/system/microsoft-rad-dino/MLModel | 28 ++ .../system/microsoft-rad-dino/asset.yaml | 4 + .../system/microsoft-rad-dino/description.md | 253 ++++++++++++++++++ .../system/microsoft-rad-dino/model.yaml | 8 + .../system/microsoft-rad-dino/spec.yaml | 29 ++ 5 files changed, 322 insertions(+) create mode 100644 assets/models/system/microsoft-rad-dino/MLModel create mode 100644 assets/models/system/microsoft-rad-dino/asset.yaml create mode 100644 assets/models/system/microsoft-rad-dino/description.md create mode 100644 assets/models/system/microsoft-rad-dino/model.yaml create mode 100644 assets/models/system/microsoft-rad-dino/spec.yaml diff --git a/assets/models/system/microsoft-rad-dino/MLModel b/assets/models/system/microsoft-rad-dino/MLModel new file mode 100644 index 0000000000..e8814b6aae --- /dev/null +++ b/assets/models/system/microsoft-rad-dino/MLModel @@ -0,0 +1,28 @@ +flavors: + python_function: + artifacts: + model_dir: + path: artifacts/INPUT_model_path + uri: /mnt/azureml/cr/j/99e5ffbe82a2402e8941186a4d91e699/cap/data-capability/wd/INPUT_model_path + cloudpickle_version: 2.2.1 + code: code + env: + conda: conda.yaml + virtualenv: python_env.yaml + loader_module: mlflow.pyfunc.model + python_model: python_model.pkl + python_version: 3.9.20 + streamable: false +metadata: + base_model_name: microsoft/rad-dino + base_model_task: embeddings + is_acft_model: true + is_finetuned_model: false +mlflow_version: 2.15.1 +model_size_bytes: 441298145 +model_uuid: e286b1721b3f46029708403c5fdb0c28 +signature: + inputs: '[{"type": "string", "name": "image", "required": true}]' + outputs: '[{"type": "string", "name": "image_features", "required": true}]' + params: null +utc_time_created: '2024-12-05 08:49:25.479748' diff --git a/assets/models/system/microsoft-rad-dino/asset.yaml b/assets/models/system/microsoft-rad-dino/asset.yaml new file mode 100644 index 0000000000..143a2f9fd8 --- /dev/null +++ b/assets/models/system/microsoft-rad-dino/asset.yaml @@ -0,0 +1,4 @@ +type: model +extra_config: model.yaml +spec: spec.yaml +categories: [Models] diff --git a/assets/models/system/microsoft-rad-dino/description.md b/assets/models/system/microsoft-rad-dino/description.md new file mode 100644 index 0000000000..52aae3d8bb --- /dev/null +++ b/assets/models/system/microsoft-rad-dino/description.md @@ -0,0 +1,253 @@ +## Model Description + +# Model card for RAD-DINO + + + +## Model description + + + +RAD-DINO is a vision transformer model trained to encode chest X-rays using the self-supervised learning method [DINOv2](https://openreview.net/forum?id=a68SUt6zFt). + +RAD-DINO is described in detail in [RAD-DINO: Exploring Scalable Medical Image Encoders Beyond Text Supervision (F. Pérez-García, H. Sharma, S. Bond-Taylor, et al., 2024)](https://arxiv.org/abs/2401.10815). + +- **Developed by:** Microsoft Health Futures +- **Model type:** Vision transformer +- **License:** [MSRLA](./LICENSE) +- **Finetuned from model:** [`dinov2-base`](https://huggingface.co/facebook/dinov2-base) + +## Uses + + + +RAD-DINO is shared for research purposes only. +It is **not meant to be used for clinical practice**. + + + + + +The model is a vision backbone that can be plugged to other models for downstream tasks. +Some potential uses are: + +- Image classification, with a classifier trained on top of the `CLS` token +- Image segmentation, with a decoder trained using the patch tokens +- Clustering, using the image embeddings directly +- Image retrieval, using nearest neighbors of the CLS token +- Report generation, with a language model to decode text + +Fine-tuning RAD-DINO is typically not necessary to obtain good performance in downstream tasks. + + + + + +## Biases, risks, and limitations + + + +RAD-DINO was trained with data from three countries, therefore it might be biased towards population in the training data. +Underlying biases of the training datasets may not be well characterized. + +## Getting started + +Let us first write an auxiliary function to download a chest X-ray. + +```python +>>> import requests +>>> from PIL import Image +>>> def download_sample_image() -> Image.Image: +... """Download chest X-ray with CC license.""" +... base_url = "https://upload.wikimedia.org/wikipedia/commons" +... image_url = f"{base_url}/2/20/Chest_X-ray_in_influenza_and_Haemophilus_influenzae.jpg" +... headers = {"User-Agent": "RAD-DINO"} +... response = requests.get(image_url, headers=headers, stream=True) +... return Image.open(response.raw) +... +``` + +Now let us download the model and encode an image. + +```python +>>> import torch +>>> from transformers import AutoModel +>>> from transformers import AutoImageProcessor +>>> +>>> # Download the model +>>> repo = "microsoft/rad-dino" +>>> model = AutoModel.from_pretrained(repo) +>>> +>>> # The processor takes a PIL image, performs resizing, center-cropping, and +>>> # intensity normalization using stats from MIMIC-CXR, and returns a +>>> # dictionary with a PyTorch tensor ready for the encoder +>>> processor = AutoImageProcessor.from_pretrained(repo) +>>> +>>> # Download and preprocess a chest X-ray +>>> image = download_sample_image() +>>> image.size # (width, height) +(2765, 2505) +>>> inputs = processor(images=image, return_tensors="pt") +>>> +>>> # Encode the image! +>>> with torch.inference_mode(): +>>> outputs = model(**inputs) +>>> +>>> # Look at the CLS embeddings +>>> cls_embeddings = outputs.pooler_output +>>> cls_embeddings.shape # (batch_size, num_channels) +torch.Size([1, 768]) +``` + +If we are interested in the feature maps, we can reshape the patch embeddings into a grid. +We will use [`einops`](https://einops.rocks/) (install with `pip install einops`) for this. + +```python +>>> def reshape_patch_embeddings(flat_tokens: torch.Tensor) -> torch.Tensor: +... """Reshape flat list of patch tokens into a nice grid.""" +... from einops import rearrange +... image_size = processor.crop_size["height"] +... patch_size = model.config.patch_size +... embeddings_size = image_size // patch_size +... patches_grid = rearrange(flat_tokens, "b (h w) c -> b c h w", h=embeddings_size) +... return patches_grid +... +>>> flat_patch_embeddings = outputs.last_hidden_state[:, 1:] # first token is CLS +>>> reshaped_patch_embeddings = reshape_patch_embeddings(flat_patch_embeddings) +>>> reshaped_patch_embeddings.shape # (batch_size, num_channels, height, width) +torch.Size([1, 768, 37, 37]) +``` + +## Training details + +### Training data + + + +We used images from five public, deidentified chest X-ray datasets to train this checkpoint of RAD-DINO. + +| Dataset | Num. images | +| --------- | ----------: | +| [MIMIC-CXR](https://www.nature.com/articles/s41597-019-0322-0) | 368 960 | +| [CheXpert](https://ojs.aaai.org/index.php/AAAI/article/view/3834) | 223 648 | +| [NIH-CXR](https://openaccess.thecvf.com/content_cvpr_2017/html/Wang_ChestX-ray8_Hospital-Scale_Chest_CVPR_2017_paper.html) | 112 120 | +| [PadChest](https://www.sciencedirect.com/science/article/abs/pii/S1361841520301614) | 136 787 | +| [BRAX](https://www.nature.com/articles/s41597-022-01608-8) | 41 260 | +| **TOTAL** | 882 775 | + +Images in the validation and test sets used to train [MAIRA](https://arxiv.org/abs/2311.13668) were excluded from the training set of RAD-DINO. +The list of image files used for training is available at [`./training_images.csv`](./training_images.csv). + +Note this checkpoint is different from the one in the paper, where some private data was used (and fewer GPUs). +The checkpoint shared here is trained for 35 000 iterations (the total number of iterations in the run was 100 000, but we selected this checkpoint using linear probing on the validation sets of the evaluation datasets described in the paper). +We used 16 nodes with 4 A100 GPUs each, and a batch size of 40 images per GPU. + +### Training procedure + + + +We refer to the [manuscript](https://arxiv.org/abs/2401.10815) for a detailed description of the training procedure. + +#### Preprocessing + +All DICOM files were resized using B-spline interpolation so that their shorter size was 518, min-max scaled to [0, 255], and stored as PNG files. + +#### Training hyperparameters + +- **Training regime:** fp16 using PyTorch-FSDP mixed-precision. + + + +## Evaluation + + + +Our evaluation is best described in the [manuscript](https://arxiv.org/abs/2401.10815). + + + +## Environmental impact + + + + + + + + + + +- **Hardware type:** NVIDIA A100 GPUs +- **Hours used:** 40 hours/GPU × 16 nodes × 4 GPUs/node = 2560 GPU-hours +- **Cloud provider:** Azure +- **Compute region:** West US 2 +- **Carbon emitted:** 222 kg CO₂ eq. + +### Compute infrastructure + +RAD-DINO was trained on [Azure Machine Learning](https://azure.microsoft.com/en-us/products/machine-learning). + +#### Hardware + +We used 16 `Standard_NC96ads_A100_v4` nodes with four NVIDIA A100 (80 GB) GPUs each. + +#### Software + +We leveraged the code in [DINOv2](https://openreview.net/forum?id=a68SUt6zFt) for training. +We used [SimpleITK](https://simpleitk.org/) and [Pydicom](https://pydicom.github.io/) for processing of DICOM files. + +## Citation + + + +**BibTeX:** + +```bibtex +@misc{perezgarcia2024raddino, + title={{RAD-DINO}: Exploring Scalable Medical Image Encoders Beyond Text Supervision}, + author={Fernando Pérez-García and Harshita Sharma and Sam Bond-Taylor and Kenza Bouzid and Valentina Salvatelli and Maximilian Ilse and Shruthi Bannur and Daniel C. Castro and Anton Schwaighofer and Matthew P. Lungren and Maria Wetscherek and Noel Codella and Stephanie L. Hyland and Javier Alvarez-Valle and Ozan Oktay}, + year={2024}, + eprint={2401.10815}, + archivePrefix={arXiv}, + primaryClass={cs.CV} +} +``` + +**APA:** + +> Pérez-García, F., Sharma, H., Bond-Taylor, S., Bouzid, K., Salvatelli, V., Ilse, M., Bannur, S., Castro, D.C., Schwaighofer, A., Lungren, M.P., Wetscherek, M.T., Codella, N., Hyland, S.L., Alvarez-Valle, J., & Oktay, O. (2024). *RAD-DINO: Exploring Scalable Medical Image Encoders Beyond Text Supervision*. ArXiv, abs/2401.10815. + +## Model card contact + +Fernando Pérez-García ([`fperezgarcia@microsoft.com`](mailto:fperezgarcia@microsoft.com)). + + +### Sample inputs and outputs + +#### Sample input +```json +{"input_data": {"columns": ["image"], "index": [0], "data": ["image1"]}} +``` + +#### Sample output +```json +[{"image_features": [0.0, 0.0, 0.0]}] +``` diff --git a/assets/models/system/microsoft-rad-dino/model.yaml b/assets/models/system/microsoft-rad-dino/model.yaml new file mode 100644 index 0000000000..416103b22e --- /dev/null +++ b/assets/models/system/microsoft-rad-dino/model.yaml @@ -0,0 +1,8 @@ +path: + container_name: models + container_path: huggingface/microsoft-rad-dino/1733475346/mlflow_model_folder + storage_name: automlcesdkdataresources + type: azureblob +publish: + description: description.md + type: mlflow_model diff --git a/assets/models/system/microsoft-rad-dino/spec.yaml b/assets/models/system/microsoft-rad-dino/spec.yaml new file mode 100644 index 0000000000..b14568e18d --- /dev/null +++ b/assets/models/system/microsoft-rad-dino/spec.yaml @@ -0,0 +1,29 @@ +$schema: https://azuremlschemas.azureedge.net/latest/model.schema.json +name: microsoft-rad-dino +path: ./ +properties: + SharedComputeCapacityEnabled: true + datasets: '' + inference-min-sku-spec: 6|1|112|64 + inference-recommended-sku: Standard_NC6s_v3, Standard_NC24ads_A100_v4, + Standard_NC12s_v3, Standard_NC48ads_A100_v4, Standard_NC64as_T4_v3, + Standard_NC24s_v3,Standard_ND40rs_v2, Standard_NC96ads_A100_v4, + Standard_ND96asr_v4, Standard_ND96amsr_A100_v4 +tags: + Preview: '' + SharedComputeCapacityEnabled: '' + inference_compute_allow_list: + - Standard_NC6s_v3 + - Standard_NC24ads_A100_v4 + - Standard_NC12s_v3 + - Standard_NC48ads_A100_v4 + - Standard_NC64as_T4_v3 + - Standard_NC24s_v3 + - Standard_ND40rs_v2 + - Standard_NC96ads_A100_v4 + - Standard_ND96asr_v4 + - Standard_ND96amsr_A100_v4 + license: msrla + author: Microsoft + task: embeddings +version: 1 From 90d7a9632efd57588a890b8747fa4c685edfd038 Mon Sep 17 00:00:00 2001 From: Yeshwanth N Date: Thu, 12 Dec 2024 13:48:45 +0530 Subject: [PATCH 16/31] [vFix] : Upgrade mlflow for vFix in aoai-data-upload-finetune (#3669) --- .../proxy_components/environments/context/requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/training/aoai/proxy_components/environments/context/requirements.txt b/assets/training/aoai/proxy_components/environments/context/requirements.txt index 5a97cc9382..73136902fe 100644 --- a/assets/training/aoai/proxy_components/environments/context/requirements.txt +++ b/assets/training/aoai/proxy_components/environments/context/requirements.txt @@ -1,6 +1,6 @@ azure-ai-ml==1.14.0 openai==1.28.0 -mlflow==2.12.2 +mlflow==2.16.0 pandas==2.2.0 azureml-mlflow==1.56.0 azure-mgmt-cognitiveservices==13.5.0 @@ -9,4 +9,4 @@ jsonlines==4.0.0 azureml-telemetry==1.56.0 pydantic==2.7.0 idna>=3.7 -azure-keyvault-secrets==4.8.0 \ No newline at end of file +azure-keyvault-secrets==4.8.0 From 737572d48366bb7322fd4fb4f6ac898f051edb22 Mon Sep 17 00:00:00 2001 From: vizhur Date: Thu, 12 Dec 2024 08:26:05 -0500 Subject: [PATCH 17/31] Revert "Add rad-dino spec (#3658)" (#3671) This reverts commit 301b70233ccfa32161e4335acc3279fe1fca41c3. --- .../models/system/microsoft-rad-dino/MLModel | 28 -- .../system/microsoft-rad-dino/asset.yaml | 4 - .../system/microsoft-rad-dino/description.md | 253 ------------------ .../system/microsoft-rad-dino/model.yaml | 8 - .../system/microsoft-rad-dino/spec.yaml | 29 -- 5 files changed, 322 deletions(-) delete mode 100644 assets/models/system/microsoft-rad-dino/MLModel delete mode 100644 assets/models/system/microsoft-rad-dino/asset.yaml delete mode 100644 assets/models/system/microsoft-rad-dino/description.md delete mode 100644 assets/models/system/microsoft-rad-dino/model.yaml delete mode 100644 assets/models/system/microsoft-rad-dino/spec.yaml diff --git a/assets/models/system/microsoft-rad-dino/MLModel b/assets/models/system/microsoft-rad-dino/MLModel deleted file mode 100644 index e8814b6aae..0000000000 --- a/assets/models/system/microsoft-rad-dino/MLModel +++ /dev/null @@ -1,28 +0,0 @@ -flavors: - python_function: - artifacts: - model_dir: - path: artifacts/INPUT_model_path - uri: /mnt/azureml/cr/j/99e5ffbe82a2402e8941186a4d91e699/cap/data-capability/wd/INPUT_model_path - cloudpickle_version: 2.2.1 - code: code - env: - conda: conda.yaml - virtualenv: python_env.yaml - loader_module: mlflow.pyfunc.model - python_model: python_model.pkl - python_version: 3.9.20 - streamable: false -metadata: - base_model_name: microsoft/rad-dino - base_model_task: embeddings - is_acft_model: true - is_finetuned_model: false -mlflow_version: 2.15.1 -model_size_bytes: 441298145 -model_uuid: e286b1721b3f46029708403c5fdb0c28 -signature: - inputs: '[{"type": "string", "name": "image", "required": true}]' - outputs: '[{"type": "string", "name": "image_features", "required": true}]' - params: null -utc_time_created: '2024-12-05 08:49:25.479748' diff --git a/assets/models/system/microsoft-rad-dino/asset.yaml b/assets/models/system/microsoft-rad-dino/asset.yaml deleted file mode 100644 index 143a2f9fd8..0000000000 --- a/assets/models/system/microsoft-rad-dino/asset.yaml +++ /dev/null @@ -1,4 +0,0 @@ -type: model -extra_config: model.yaml -spec: spec.yaml -categories: [Models] diff --git a/assets/models/system/microsoft-rad-dino/description.md b/assets/models/system/microsoft-rad-dino/description.md deleted file mode 100644 index 52aae3d8bb..0000000000 --- a/assets/models/system/microsoft-rad-dino/description.md +++ /dev/null @@ -1,253 +0,0 @@ -## Model Description - -# Model card for RAD-DINO - - - -## Model description - - - -RAD-DINO is a vision transformer model trained to encode chest X-rays using the self-supervised learning method [DINOv2](https://openreview.net/forum?id=a68SUt6zFt). - -RAD-DINO is described in detail in [RAD-DINO: Exploring Scalable Medical Image Encoders Beyond Text Supervision (F. Pérez-García, H. Sharma, S. Bond-Taylor, et al., 2024)](https://arxiv.org/abs/2401.10815). - -- **Developed by:** Microsoft Health Futures -- **Model type:** Vision transformer -- **License:** [MSRLA](./LICENSE) -- **Finetuned from model:** [`dinov2-base`](https://huggingface.co/facebook/dinov2-base) - -## Uses - - - -RAD-DINO is shared for research purposes only. -It is **not meant to be used for clinical practice**. - - - - - -The model is a vision backbone that can be plugged to other models for downstream tasks. -Some potential uses are: - -- Image classification, with a classifier trained on top of the `CLS` token -- Image segmentation, with a decoder trained using the patch tokens -- Clustering, using the image embeddings directly -- Image retrieval, using nearest neighbors of the CLS token -- Report generation, with a language model to decode text - -Fine-tuning RAD-DINO is typically not necessary to obtain good performance in downstream tasks. - - - - - -## Biases, risks, and limitations - - - -RAD-DINO was trained with data from three countries, therefore it might be biased towards population in the training data. -Underlying biases of the training datasets may not be well characterized. - -## Getting started - -Let us first write an auxiliary function to download a chest X-ray. - -```python ->>> import requests ->>> from PIL import Image ->>> def download_sample_image() -> Image.Image: -... """Download chest X-ray with CC license.""" -... base_url = "https://upload.wikimedia.org/wikipedia/commons" -... image_url = f"{base_url}/2/20/Chest_X-ray_in_influenza_and_Haemophilus_influenzae.jpg" -... headers = {"User-Agent": "RAD-DINO"} -... response = requests.get(image_url, headers=headers, stream=True) -... return Image.open(response.raw) -... -``` - -Now let us download the model and encode an image. - -```python ->>> import torch ->>> from transformers import AutoModel ->>> from transformers import AutoImageProcessor ->>> ->>> # Download the model ->>> repo = "microsoft/rad-dino" ->>> model = AutoModel.from_pretrained(repo) ->>> ->>> # The processor takes a PIL image, performs resizing, center-cropping, and ->>> # intensity normalization using stats from MIMIC-CXR, and returns a ->>> # dictionary with a PyTorch tensor ready for the encoder ->>> processor = AutoImageProcessor.from_pretrained(repo) ->>> ->>> # Download and preprocess a chest X-ray ->>> image = download_sample_image() ->>> image.size # (width, height) -(2765, 2505) ->>> inputs = processor(images=image, return_tensors="pt") ->>> ->>> # Encode the image! ->>> with torch.inference_mode(): ->>> outputs = model(**inputs) ->>> ->>> # Look at the CLS embeddings ->>> cls_embeddings = outputs.pooler_output ->>> cls_embeddings.shape # (batch_size, num_channels) -torch.Size([1, 768]) -``` - -If we are interested in the feature maps, we can reshape the patch embeddings into a grid. -We will use [`einops`](https://einops.rocks/) (install with `pip install einops`) for this. - -```python ->>> def reshape_patch_embeddings(flat_tokens: torch.Tensor) -> torch.Tensor: -... """Reshape flat list of patch tokens into a nice grid.""" -... from einops import rearrange -... image_size = processor.crop_size["height"] -... patch_size = model.config.patch_size -... embeddings_size = image_size // patch_size -... patches_grid = rearrange(flat_tokens, "b (h w) c -> b c h w", h=embeddings_size) -... return patches_grid -... ->>> flat_patch_embeddings = outputs.last_hidden_state[:, 1:] # first token is CLS ->>> reshaped_patch_embeddings = reshape_patch_embeddings(flat_patch_embeddings) ->>> reshaped_patch_embeddings.shape # (batch_size, num_channels, height, width) -torch.Size([1, 768, 37, 37]) -``` - -## Training details - -### Training data - - - -We used images from five public, deidentified chest X-ray datasets to train this checkpoint of RAD-DINO. - -| Dataset | Num. images | -| --------- | ----------: | -| [MIMIC-CXR](https://www.nature.com/articles/s41597-019-0322-0) | 368 960 | -| [CheXpert](https://ojs.aaai.org/index.php/AAAI/article/view/3834) | 223 648 | -| [NIH-CXR](https://openaccess.thecvf.com/content_cvpr_2017/html/Wang_ChestX-ray8_Hospital-Scale_Chest_CVPR_2017_paper.html) | 112 120 | -| [PadChest](https://www.sciencedirect.com/science/article/abs/pii/S1361841520301614) | 136 787 | -| [BRAX](https://www.nature.com/articles/s41597-022-01608-8) | 41 260 | -| **TOTAL** | 882 775 | - -Images in the validation and test sets used to train [MAIRA](https://arxiv.org/abs/2311.13668) were excluded from the training set of RAD-DINO. -The list of image files used for training is available at [`./training_images.csv`](./training_images.csv). - -Note this checkpoint is different from the one in the paper, where some private data was used (and fewer GPUs). -The checkpoint shared here is trained for 35 000 iterations (the total number of iterations in the run was 100 000, but we selected this checkpoint using linear probing on the validation sets of the evaluation datasets described in the paper). -We used 16 nodes with 4 A100 GPUs each, and a batch size of 40 images per GPU. - -### Training procedure - - - -We refer to the [manuscript](https://arxiv.org/abs/2401.10815) for a detailed description of the training procedure. - -#### Preprocessing - -All DICOM files were resized using B-spline interpolation so that their shorter size was 518, min-max scaled to [0, 255], and stored as PNG files. - -#### Training hyperparameters - -- **Training regime:** fp16 using PyTorch-FSDP mixed-precision. - - - -## Evaluation - - - -Our evaluation is best described in the [manuscript](https://arxiv.org/abs/2401.10815). - - - -## Environmental impact - - - - - - - - - - -- **Hardware type:** NVIDIA A100 GPUs -- **Hours used:** 40 hours/GPU × 16 nodes × 4 GPUs/node = 2560 GPU-hours -- **Cloud provider:** Azure -- **Compute region:** West US 2 -- **Carbon emitted:** 222 kg CO₂ eq. - -### Compute infrastructure - -RAD-DINO was trained on [Azure Machine Learning](https://azure.microsoft.com/en-us/products/machine-learning). - -#### Hardware - -We used 16 `Standard_NC96ads_A100_v4` nodes with four NVIDIA A100 (80 GB) GPUs each. - -#### Software - -We leveraged the code in [DINOv2](https://openreview.net/forum?id=a68SUt6zFt) for training. -We used [SimpleITK](https://simpleitk.org/) and [Pydicom](https://pydicom.github.io/) for processing of DICOM files. - -## Citation - - - -**BibTeX:** - -```bibtex -@misc{perezgarcia2024raddino, - title={{RAD-DINO}: Exploring Scalable Medical Image Encoders Beyond Text Supervision}, - author={Fernando Pérez-García and Harshita Sharma and Sam Bond-Taylor and Kenza Bouzid and Valentina Salvatelli and Maximilian Ilse and Shruthi Bannur and Daniel C. Castro and Anton Schwaighofer and Matthew P. Lungren and Maria Wetscherek and Noel Codella and Stephanie L. Hyland and Javier Alvarez-Valle and Ozan Oktay}, - year={2024}, - eprint={2401.10815}, - archivePrefix={arXiv}, - primaryClass={cs.CV} -} -``` - -**APA:** - -> Pérez-García, F., Sharma, H., Bond-Taylor, S., Bouzid, K., Salvatelli, V., Ilse, M., Bannur, S., Castro, D.C., Schwaighofer, A., Lungren, M.P., Wetscherek, M.T., Codella, N., Hyland, S.L., Alvarez-Valle, J., & Oktay, O. (2024). *RAD-DINO: Exploring Scalable Medical Image Encoders Beyond Text Supervision*. ArXiv, abs/2401.10815. - -## Model card contact - -Fernando Pérez-García ([`fperezgarcia@microsoft.com`](mailto:fperezgarcia@microsoft.com)). - - -### Sample inputs and outputs - -#### Sample input -```json -{"input_data": {"columns": ["image"], "index": [0], "data": ["image1"]}} -``` - -#### Sample output -```json -[{"image_features": [0.0, 0.0, 0.0]}] -``` diff --git a/assets/models/system/microsoft-rad-dino/model.yaml b/assets/models/system/microsoft-rad-dino/model.yaml deleted file mode 100644 index 416103b22e..0000000000 --- a/assets/models/system/microsoft-rad-dino/model.yaml +++ /dev/null @@ -1,8 +0,0 @@ -path: - container_name: models - container_path: huggingface/microsoft-rad-dino/1733475346/mlflow_model_folder - storage_name: automlcesdkdataresources - type: azureblob -publish: - description: description.md - type: mlflow_model diff --git a/assets/models/system/microsoft-rad-dino/spec.yaml b/assets/models/system/microsoft-rad-dino/spec.yaml deleted file mode 100644 index b14568e18d..0000000000 --- a/assets/models/system/microsoft-rad-dino/spec.yaml +++ /dev/null @@ -1,29 +0,0 @@ -$schema: https://azuremlschemas.azureedge.net/latest/model.schema.json -name: microsoft-rad-dino -path: ./ -properties: - SharedComputeCapacityEnabled: true - datasets: '' - inference-min-sku-spec: 6|1|112|64 - inference-recommended-sku: Standard_NC6s_v3, Standard_NC24ads_A100_v4, - Standard_NC12s_v3, Standard_NC48ads_A100_v4, Standard_NC64as_T4_v3, - Standard_NC24s_v3,Standard_ND40rs_v2, Standard_NC96ads_A100_v4, - Standard_ND96asr_v4, Standard_ND96amsr_A100_v4 -tags: - Preview: '' - SharedComputeCapacityEnabled: '' - inference_compute_allow_list: - - Standard_NC6s_v3 - - Standard_NC24ads_A100_v4 - - Standard_NC12s_v3 - - Standard_NC48ads_A100_v4 - - Standard_NC64as_T4_v3 - - Standard_NC24s_v3 - - Standard_ND40rs_v2 - - Standard_NC96ads_A100_v4 - - Standard_ND96asr_v4 - - Standard_ND96amsr_A100_v4 - license: msrla - author: Microsoft - task: embeddings -version: 1 From a878a2ad19de9f67c7cc3f1550bc41cd8e9aecde Mon Sep 17 00:00:00 2001 From: Yeshwanth N Date: Thu, 12 Dec 2024 23:18:24 +0530 Subject: [PATCH 18/31] [Update] : Need to explicitly install libglib2 with ubuntu22 upgrade, for using this image for finetuning (#3670) --- .../environments/acft_image_mmdetection/context/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/training/finetune_acft_image/environments/acft_image_mmdetection/context/Dockerfile b/assets/training/finetune_acft_image/environments/acft_image_mmdetection/context/Dockerfile index 6ec8b3c43f..d9e4021423 100644 --- a/assets/training/finetune_acft_image/environments/acft_image_mmdetection/context/Dockerfile +++ b/assets/training/finetune_acft_image/environments/acft_image_mmdetection/context/Dockerfile @@ -2,7 +2,7 @@ FROM mcr.microsoft.com/aifx/acpt/stable-ubuntu2204-cu118-py310-torch222:{{latest-image-tag:biweekly\.\d{6}\.\d{1}.*}} USER root -RUN apt-get -y update +RUN apt-get -y update && apt-get install -y libglib2.0-0 # Install required packages from pypi COPY requirements.txt . From e5750c94c8fdcdd355db1bdb7af9eea157a4896c Mon Sep 17 00:00:00 2001 From: cassieesvelt <73311224+cassieesvelt@users.noreply.github.com> Date: Thu, 12 Dec 2024 11:14:27 -0800 Subject: [PATCH 19/31] add phi 4 model assets (#3667) * add phi 4 model assets * Update description.md * Update spec.yaml --------- Co-authored-by: Facundo Santiago Co-authored-by: Kelly <40868256+lykelly19@users.noreply.github.com> --- assets/models/system/Phi-4/asset.yaml | 4 ++ assets/models/system/Phi-4/description.md | 23 ++++++++++ assets/models/system/Phi-4/evaluation.md | 30 +++++++++++++ assets/models/system/Phi-4/model.yaml | 8 ++++ assets/models/system/Phi-4/notes.md | 54 +++++++++++++++++++++++ assets/models/system/Phi-4/spec.yaml | 44 ++++++++++++++++++ 6 files changed, 163 insertions(+) create mode 100644 assets/models/system/Phi-4/asset.yaml create mode 100644 assets/models/system/Phi-4/description.md create mode 100644 assets/models/system/Phi-4/evaluation.md create mode 100644 assets/models/system/Phi-4/model.yaml create mode 100644 assets/models/system/Phi-4/notes.md create mode 100644 assets/models/system/Phi-4/spec.yaml diff --git a/assets/models/system/Phi-4/asset.yaml b/assets/models/system/Phi-4/asset.yaml new file mode 100644 index 0000000000..fcf5c5a05b --- /dev/null +++ b/assets/models/system/Phi-4/asset.yaml @@ -0,0 +1,4 @@ +extra_config: model.yaml +spec: spec.yaml +type: model +categories: ["Foundation Models"] diff --git a/assets/models/system/Phi-4/description.md b/assets/models/system/Phi-4/description.md new file mode 100644 index 0000000000..8420741cb0 --- /dev/null +++ b/assets/models/system/Phi-4/description.md @@ -0,0 +1,23 @@ +Phi-4 is a state-of-the-art open model built upon a blend of synthetic datasets, data from filtered public domain websites, and acquired academic books and Q&A datasets. The goal of this approach was to ensure that small capable models were trained with data focused on high quality and advanced reasoning. + +Phi-4 underwent a rigorous enhancement and alignment process, incorporating both supervised fine-tuning and direct preference optimization to ensure precise instruction adherence and robust safety measures. + +For more information, reference the [Phi-4 Technical Report](https://www.microsoft.com/en-us/research/uploads/prod/2024/12/P4TechReport.pdf). + +### Model Architecture + +Phi-4 is a 14B parameters, dense decoder-only transformer model. + +### Training Data + +Our training data is an extension of the data used for Phi-3 and includes a wide variety of sources from: + +1. Publicly available documents filtered rigorously for quality, selected high-quality educational data, and code. + +2. Newly created synthetic, "textbook-like" data for the purpose of teaching math, coding, common sense reasoning, general knowledge of the world (science, daily activities, theory of mind, etc.). + +3. Acquired academic books and Q&A datasets. + +4. High quality chat format supervised data covering various topics to reflect human preferences on different aspects such as instruct-following, truthfulness, honesty and helpfulness. + +Multilingual data constitutes about 8% of our overall data. We are focusing on the quality of data that could potentially improve the reasoning ability for the model, and we filter the publicly available documents to contain the correct level of knowledge. diff --git a/assets/models/system/Phi-4/evaluation.md b/assets/models/system/Phi-4/evaluation.md new file mode 100644 index 0000000000..8879eeb794 --- /dev/null +++ b/assets/models/system/Phi-4/evaluation.md @@ -0,0 +1,30 @@ +We evaluated `phi-4` using [OpenAI’s SimpleEval](https://github.com/openai/simple-evals) and our own internal benchmarks to understand the model’s capabilities, more specifically: + +* **MMLU:** Popular aggregated dataset for multitask language understanding. + +* **MATH:** Challenging competition math problems. + +* **GPQA:** Complex, graduate-level science questions. + +* **DROP:** Complex comprehension and reasoning. + +* **MGSM:** Multi-lingual grade-school math. + +* **HumanEval:** Functional code generation. + +* **SimpleQA:** Factual responses. + +To understand the capabilities, we compare `phi-4` with a set of models over OpenAI’s SimpleEval benchmark. + +At the high-level overview of the model quality on representative benchmarks. For the table below, higher numbers indicate better performance: + +| **Category** | **Benchmark** | **phi-4** (14B) | **phi-3** (14B) | **Qwen 2.5** (14B instruct) | **GPT-4o-mini** | **Llama-3.3** (70B instruct) | **Qwen 2.5** (72B instruct) | **GPT-4o** | +|------------------------------|---------------|-----------|-----------------|----------------------|----------------------|--------------------|-------------------|-----------------| +| Popular Aggregated Benchmark | MMLU | 84.8 | 77.9 | 79.9 | 81.8 | 86.3 | 85.3 | **88.1** | +| Science | GPQA | **56.1** | 31.2 | 42.9 | 40.9 | 49.1 | 49.0 | 50.6 | +| Math | MGSM
MATH | 80.6
**80.4** | 53.5
44.6 | 79.6
75.6 | 86.5
73.0 | 89.1
66.3* | 87.3
80.0 | **90.4**
74.6 | +| Code Generation | HumanEval | 82.6 | 67.8 | 72.1 | 86.2 | 78.9* | 80.4 | **90.6** | +| Factual Knowledge | SimpleQA | 3.0 | 7.6 | 5.4 | 9.9 | 20.9 | 10.2 | **39.4** | +| Reasoning | DROP | 75.5 | 68.3 | 85.5 | 79.3 | **90.2** | 76.7 | 80.9 | + +\* These scores are lower than those reported by Meta, perhaps because simple-evals has a strict formatting requirement that Llama models have particular trouble following. We use the simple-evals framework because it is reproducible, but Meta reports 77 for MATH and 88 for HumanEval on Llama-3.3-70B. diff --git a/assets/models/system/Phi-4/model.yaml b/assets/models/system/Phi-4/model.yaml new file mode 100644 index 0000000000..5f5ff18cbf --- /dev/null +++ b/assets/models/system/Phi-4/model.yaml @@ -0,0 +1,8 @@ +path: + container_name: models + container_path: huggingface/Phi-4/mlflow_model_folder + storage_name: automlcesdkdataresources + type: azureblob +publish: + description: description.md + type: mlflow_model \ No newline at end of file diff --git a/assets/models/system/Phi-4/notes.md b/assets/models/system/Phi-4/notes.md new file mode 100644 index 0000000000..1a0f07eb12 --- /dev/null +++ b/assets/models/system/Phi-4/notes.md @@ -0,0 +1,54 @@ +## Intended Use + +### Primary Use Cases + +Our model is designed to accelerate research on language models, for use as a building block for generative AI powered features. It provides uses for general purpose AI systems and applications (primarily in English) which require: + +1. Memory/compute constrained environments. +2. Latency bound scenarios. +3. Reasoning and logic. + +### Out-of-Scope Use Cases +Our models is not specifically designed or evaluated for all downstream purposes, thus: + +1. Developers should consider common limitations of language models as they select use cases, and evaluate and mitigate for accuracy, safety, and fairness before using within a specific downstream use case, particularly for high-risk scenarios. +2. Developers should be aware of and adhere to applicable laws or regulations (including privacy, trade compliance laws, etc.) that are relevant to their use case, including the model’s focus on English. +3. Nothing contained in this Model Card should be interpreted as or deemed a restriction or modification to the license the model is released under. + +## Safety + +### Approach + +Phi-4 has adopted a robust safety post-training approach. This approach leverages a variety of both open-source and in-house generated synthetic datasets. The overall technique employed to do the safety alignment is a combination of SFT (Supervised Fine-Tuning) and iterative DPO (Direct Preference Optimization), including publicly available datasets focusing on helpfulness and harmlessness as well as various questions and answers targeted to multiple safety categories. + +### Safety Evaluation and Red-Teaming + +Prior to release, Phi-4 followed a multi-faceted evaluation approach. Quantitative evaluation was conducted with multiple open-source safety benchmarks and in-house tools utilizing adversarial conversation simulation. For qualitative safety evaluation, we collaborated with the independent AI Red Team (AIRT) at Microsoft to assess safety risks posed by `phi-4` in both average and adversarial user scenarios. In the average user scenario, AIRT emulated typical single-turn and multi-turn interactions to identify potentially risky behaviors. The adversarial user scenario tested a wide range of techniques aimed at intentionally subverting the model’s safety training including jailbreaks, encoding-based attacks, multi-turn attacks, and adversarial suffix attacks. + +Please refer to the technical report for more details on safety alignment. + +## Responsible AI Considerations + +Like other language models, `phi-4` can potentially behave in ways that are unfair, unreliable, or offensive. Some of the limiting behaviors to be aware of include: + +* **Quality of Service:** The model is trained primarily on English text. Languages other than English will experience worse performance. English language varieties with less representation in the training data might experience worse performance than standard American English. `phi-4` is not intended to support multilingual use. + +* **Representation of Harms & Perpetuation of Stereotypes:** These models can over- or under-represent groups of people, erase representation of some groups, or reinforce demeaning or negative stereotypes. Despite safety post-training, these limitations may still be present due to differing levels of representation of different groups or prevalence of examples of negative stereotypes in training data that reflect real-world patterns and societal biases. + +* **Inappropriate or Offensive Content:** These models may produce other types of inappropriate or offensive content, which may make it inappropriate to deploy for sensitive contexts without additional mitigations that are specific to the use case. + +* **Information Reliability:** Language models can generate nonsensical content or fabricate content that might sound reasonable but is inaccurate or outdated. + +* **Limited Scope for Code:** Majority of `phi-4` training data is based in Python and uses common packages such as `typing`, `math`, `random`, `collections`, `datetime`, `itertools`. If the model generates Python scripts that utilize other packages or scripts in other languages, we strongly recommend users manually verify all API uses. + +Developers should apply responsible AI best practices and are responsible for ensuring that a specific use case complies with relevant laws and regulations (e.g. privacy, trade, etc.). Using safety services like [Azure AI Content Safety](https://azure.microsoft.com/en-us/products/ai-services/ai-content-safety) that have advanced guardrails is highly recommended. Important areas for consideration include: + +* **Allocation:** Models may not be suitable for scenarios that could have consequential impact on legal status or the allocation of resources or life opportunities (ex: housing, employment, credit, etc.) without further assessments and additional debiasing techniques. + +* **High-Risk Scenarios:** Developers should assess suitability of using models in high-risk scenarios where unfair, unreliable or offensive outputs might be extremely costly or lead to harm. This includes providing advice in sensitive or expert domains where accuracy and reliability are critical (ex: legal or health advice). Additional safeguards should be implemented at the application level according to the deployment context. + +* **Misinformation:** Models may produce inaccurate information. Developers should follow transparency best practices and inform end-users they are interacting with an AI system. At the application level, developers can build feedback mechanisms and pipelines to ground responses in use-case specific, contextual information, a technique known as Retrieval Augmented Generation (RAG). + +* **Generation of Harmful Content:** Developers should assess outputs for their context and use available safety classifiers or custom solutions appropriate for their use case. + +* **Misuse:** Other forms of misuse such as fraud, spam, or malware production may be possible, and developers should ensure that their applications do not violate applicable laws and regulations. diff --git a/assets/models/system/Phi-4/spec.yaml b/assets/models/system/Phi-4/spec.yaml new file mode 100644 index 0000000000..21a1d48d2c --- /dev/null +++ b/assets/models/system/Phi-4/spec.yaml @@ -0,0 +1,44 @@ +$schema: https://azuremlschemas.azureedge.net/latest/model.schema.json + +name: Phi-4 +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 + languages: en + SharedComputeCapacityEnabled: true + +tags: + author: Microsoft + SharedComputeCapacityEnabled: "" + disable-batch: true + maas-inference: false + freePlayground: "false" + Preview: "" + Featured: "" + languages: "en,ar,bn,bho,cs,da,de,el,es,fa,fi,fil,fr,gu,hak,ha,he,hi,hu,id,it,ja,jv,kn,ko,ml,mr,nl,no,or,pa,pl,ps,pt,ro,ru,sh,sv,sw,ta,te,th,tl,tr,uk,ur,vi,yo,zh,zh-TW" + keywords: "Conversation" + inference_supported_envs: + - vllm + license: MSRLA + task: chat-completion + displayName: "Phi-4" + summary: "Phi-4 14B, a highly capable model for low latency scenarios." + textContextWindow: 16384 + maxOutputTokens: 16384 + inputModalities: "text" + outputModalities: "text" + evaluation: "evaluation.md" + notes: "notes.md" + hiddenlayerscanned: "" + inference_compute_allow_list: + [ + Standard_NC24ads_A100_v4, + Standard_NC48ads_A100_v4, + Standard_NC96ads_A100_v4, + Standard_ND96asr_v4, + Standard_ND96amsr_A100_v4 + ] + +version: 1 From ce6968fb805568139f9254b1184d0d54070968fb Mon Sep 17 00:00:00 2001 From: cassieesvelt <73311224+cassieesvelt@users.noreply.github.com> Date: Thu, 12 Dec 2024 13:28:01 -0800 Subject: [PATCH 20/31] remove incorrect languages (#3673) --- assets/models/system/Phi-4/spec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/models/system/Phi-4/spec.yaml b/assets/models/system/Phi-4/spec.yaml index 21a1d48d2c..f87a5ca332 100644 --- a/assets/models/system/Phi-4/spec.yaml +++ b/assets/models/system/Phi-4/spec.yaml @@ -17,7 +17,7 @@ tags: freePlayground: "false" Preview: "" Featured: "" - languages: "en,ar,bn,bho,cs,da,de,el,es,fa,fi,fil,fr,gu,hak,ha,he,hi,hu,id,it,ja,jv,kn,ko,ml,mr,nl,no,or,pa,pl,ps,pt,ro,ru,sh,sv,sw,ta,te,th,tl,tr,uk,ur,vi,yo,zh,zh-TW" + languages: "en,ar,bn,cs,da,de,el,es,fa,fi,fr,gu,ha,he,hi,hu,id,it,ja,jv,kn,ko,ml,mr,nl,no,or,pa,pl,ps,pt,ro,ru,sv,sw,ta,te,th,tl,tr,uk,ur,vi,yo,zh" keywords: "Conversation" inference_supported_envs: - vllm From 40f2396883010f1c8ffd28ca4389c99217ba45aa Mon Sep 17 00:00:00 2001 From: Diondra <16376603+diondrapeck@users.noreply.github.com> Date: Thu, 12 Dec 2024 17:57:11 -0500 Subject: [PATCH 21/31] Update UI eval flow and evaluators (#3661) * Update quality evaluators and UI eval flow * Update quality evaluators and UI eval flow * Fix paths --------- Co-authored-by: Kelly <40868256+lykelly19@users.noreply.github.com> --- .../evaluators/models/coherence-evaluator/model.yaml | 2 +- .../evaluators/models/coherence-evaluator/spec.yaml | 4 ++-- .../models/content-safety-evaluator/asset.yaml | 4 ++++ .../models/content-safety-evaluator/description.md | 7 +++++++ .../models/content-safety-evaluator/model.yaml | 8 ++++++++ .../evaluators/models/content-safety-evaluator/spec.yaml | 9 +++++++++ .../evaluators/models/fluency-evaluator/model.yaml | 2 +- .../evaluators/models/fluency-evaluator/spec.yaml | 4 ++-- .../evaluators/models/groundedness-evaluator/model.yaml | 2 +- .../evaluators/models/groundedness-evaluator/spec.yaml | 4 ++-- .../promptflow/evaluators/models/qa-evaluator/asset.yaml | 4 ++++ .../evaluators/models/qa-evaluator/description.md | 7 +++++++ .../promptflow/evaluators/models/qa-evaluator/model.yaml | 8 ++++++++ .../promptflow/evaluators/models/qa-evaluator/spec.yaml | 9 +++++++++ .../evaluators/models/relevance-evaluator/model.yaml | 2 +- .../evaluators/models/relevance-evaluator/spec.yaml | 4 ++-- .../evaluators/models/retrieval-evaluator/model.yaml | 2 +- .../evaluators/models/retrieval-evaluator/spec.yaml | 4 ++-- assets/promptflow/models/rai-eval-ui-dag-flow/model.yaml | 2 +- assets/promptflow/models/rai-eval-ui-dag-flow/spec.yaml | 2 +- 20 files changed, 73 insertions(+), 17 deletions(-) create mode 100644 assets/promptflow/evaluators/models/content-safety-evaluator/asset.yaml create mode 100644 assets/promptflow/evaluators/models/content-safety-evaluator/description.md create mode 100644 assets/promptflow/evaluators/models/content-safety-evaluator/model.yaml create mode 100644 assets/promptflow/evaluators/models/content-safety-evaluator/spec.yaml create mode 100644 assets/promptflow/evaluators/models/qa-evaluator/asset.yaml create mode 100644 assets/promptflow/evaluators/models/qa-evaluator/description.md create mode 100644 assets/promptflow/evaluators/models/qa-evaluator/model.yaml create mode 100644 assets/promptflow/evaluators/models/qa-evaluator/spec.yaml diff --git a/assets/promptflow/evaluators/models/coherence-evaluator/model.yaml b/assets/promptflow/evaluators/models/coherence-evaluator/model.yaml index bf8ad53599..390cc2379a 100644 --- a/assets/promptflow/evaluators/models/coherence-evaluator/model.yaml +++ b/assets/promptflow/evaluators/models/coherence-evaluator/model.yaml @@ -1,6 +1,6 @@ path: container_name: rai-eval-flows - container_path: models/evaluators/CoherenceEvaluator/v4 + container_path: models/evaluators/CoherenceEvaluator/v5/CoherenceEvaluator storage_name: amlraipfmodels type: azureblob publish: diff --git a/assets/promptflow/evaluators/models/coherence-evaluator/spec.yaml b/assets/promptflow/evaluators/models/coherence-evaluator/spec.yaml index 70cc8326fb..bb21b80986 100644 --- a/assets/promptflow/evaluators/models/coherence-evaluator/spec.yaml +++ b/assets/promptflow/evaluators/models/coherence-evaluator/spec.yaml @@ -5,7 +5,7 @@ properties: is-promptflow: true is-evaluator: true show-artifact: true - _default-display-file: ./coherence.prompty + _default-display-file: ./CoherenceEvaluator/coherence.prompty tags: hiddenlayerscanned: "" -version: 4 \ No newline at end of file +version: 5 \ No newline at end of file diff --git a/assets/promptflow/evaluators/models/content-safety-evaluator/asset.yaml b/assets/promptflow/evaluators/models/content-safety-evaluator/asset.yaml new file mode 100644 index 0000000000..e4030bf31b --- /dev/null +++ b/assets/promptflow/evaluators/models/content-safety-evaluator/asset.yaml @@ -0,0 +1,4 @@ +extra_config: model.yaml +spec: spec.yaml +type: model +categories: ["prompt flow evaluator"] \ No newline at end of file diff --git a/assets/promptflow/evaluators/models/content-safety-evaluator/description.md b/assets/promptflow/evaluators/models/content-safety-evaluator/description.md new file mode 100644 index 0000000000..fcbb26634e --- /dev/null +++ b/assets/promptflow/evaluators/models/content-safety-evaluator/description.md @@ -0,0 +1,7 @@ +| | | +| -- | -- | +| Score range | Integer [0-7]: where 0 is the least harmful and 7 is the most harmful. A text label inis also provided. | +| What is this metric? | Measures comprehensively the severity level of the content harm of a response, covering violence, sexual, self-harm, and hate and unfairness as 4 harmful categories. | +| How does it work? | The Content Safety evaluator leverages AI-assisted evaluators including `ViolenceEvaluator`, `SexualEvaluator`, `SelfHarmEvaluator`, `HateUnfairnessEvaluator` with a language model as a judge on the response to a user query. See the [definitions and severity scale](https://learn.microsoft.com/azure/ai-studio/concepts/evaluation-metrics-built-in?tabs=severity#risk-and-safety-evaluators) for these AI-assisted evaluators. | +| When to use it? | Use it when assessing the readability and user-friendliness of your model's generated responses in real-world applications. | +| What does it need as input? | Query, Response | \ No newline at end of file diff --git a/assets/promptflow/evaluators/models/content-safety-evaluator/model.yaml b/assets/promptflow/evaluators/models/content-safety-evaluator/model.yaml new file mode 100644 index 0000000000..f6fcc8fff4 --- /dev/null +++ b/assets/promptflow/evaluators/models/content-safety-evaluator/model.yaml @@ -0,0 +1,8 @@ +path: + container_name: rai-eval-flows + container_path: models/evaluators/ContentSafetyEvaluator/v1/ContentSafetyEvaluator + storage_name: amlraipfmodels + type: azureblob +publish: + description: description.md + type: custom_model \ No newline at end of file diff --git a/assets/promptflow/evaluators/models/content-safety-evaluator/spec.yaml b/assets/promptflow/evaluators/models/content-safety-evaluator/spec.yaml new file mode 100644 index 0000000000..306cf38f4d --- /dev/null +++ b/assets/promptflow/evaluators/models/content-safety-evaluator/spec.yaml @@ -0,0 +1,9 @@ +$schema: https://azuremlschemas.azureedge.net/latest/model.schema.json +name: Content-Safety-Evaluator +path: ./ +properties: + is-promptflow: true + is-evaluator: true +tags: + Preview: "" +version: 1 \ No newline at end of file diff --git a/assets/promptflow/evaluators/models/fluency-evaluator/model.yaml b/assets/promptflow/evaluators/models/fluency-evaluator/model.yaml index 2be367bd3f..b179877e24 100644 --- a/assets/promptflow/evaluators/models/fluency-evaluator/model.yaml +++ b/assets/promptflow/evaluators/models/fluency-evaluator/model.yaml @@ -1,6 +1,6 @@ path: container_name: rai-eval-flows - container_path: models/evaluators/FluencyEvaluator/v4 + container_path: models/evaluators/FluencyEvaluator/v5/FluencyEvaluator storage_name: amlraipfmodels type: azureblob publish: diff --git a/assets/promptflow/evaluators/models/fluency-evaluator/spec.yaml b/assets/promptflow/evaluators/models/fluency-evaluator/spec.yaml index c21da6de29..1faed95c9b 100644 --- a/assets/promptflow/evaluators/models/fluency-evaluator/spec.yaml +++ b/assets/promptflow/evaluators/models/fluency-evaluator/spec.yaml @@ -5,7 +5,7 @@ properties: is-promptflow: true is-evaluator: true show-artifact: true - _default-display-file: ./fluency.prompty + _default-display-file: ./FluencyEvaluator/fluency.prompty tags: hiddenlayerscanned: "" -version: 4 \ No newline at end of file +version: 5 \ No newline at end of file diff --git a/assets/promptflow/evaluators/models/groundedness-evaluator/model.yaml b/assets/promptflow/evaluators/models/groundedness-evaluator/model.yaml index 0ff1da4a75..5d3847c01f 100644 --- a/assets/promptflow/evaluators/models/groundedness-evaluator/model.yaml +++ b/assets/promptflow/evaluators/models/groundedness-evaluator/model.yaml @@ -1,6 +1,6 @@ path: container_name: rai-eval-flows - container_path: models/evaluators/GroundednessEvaluator/v4 + container_path: models/evaluators/GroundednessEvaluator/v5/GroundednessEvaluator storage_name: amlraipfmodels type: azureblob publish: diff --git a/assets/promptflow/evaluators/models/groundedness-evaluator/spec.yaml b/assets/promptflow/evaluators/models/groundedness-evaluator/spec.yaml index 58eeae5aac..bcc2c61a72 100644 --- a/assets/promptflow/evaluators/models/groundedness-evaluator/spec.yaml +++ b/assets/promptflow/evaluators/models/groundedness-evaluator/spec.yaml @@ -5,7 +5,7 @@ properties: is-promptflow: true is-evaluator: true show-artifact: true - _default-display-file: ./groundedness_without_query.prompty + _default-display-file: ./GroundednessEvaluator/groundedness_without_query.prompty tags: hiddenlayerscanned: "" -version: 4 \ No newline at end of file +version: 5 \ No newline at end of file diff --git a/assets/promptflow/evaluators/models/qa-evaluator/asset.yaml b/assets/promptflow/evaluators/models/qa-evaluator/asset.yaml new file mode 100644 index 0000000000..e4030bf31b --- /dev/null +++ b/assets/promptflow/evaluators/models/qa-evaluator/asset.yaml @@ -0,0 +1,4 @@ +extra_config: model.yaml +spec: spec.yaml +type: model +categories: ["prompt flow evaluator"] \ No newline at end of file diff --git a/assets/promptflow/evaluators/models/qa-evaluator/description.md b/assets/promptflow/evaluators/models/qa-evaluator/description.md new file mode 100644 index 0000000000..92f65d7676 --- /dev/null +++ b/assets/promptflow/evaluators/models/qa-evaluator/description.md @@ -0,0 +1,7 @@ +| | | +| -- | -- | +| Score range | Float [0-1] for F1 score evaluator: the higher, the more similar is the response with ground truth. Integer [1-5] for AI-assisted quality evaluators for question-and-answering (QA) scenarios: where 1 is bad and 5 is good | +| What is this metric? | Measures comprehensively the groundedness, coherence, and fluency of a response in QA scenarios, as well as the textual similarity between the response and its ground truth. | +| How does it work? | The QA evaluator leverages prompt-based AI-assisted evaluators using a language model as a judge on the response to a user query, including `GroundednessEvaluator` (needs input `context`), `RelevanceEvaluator`, `CoherenceEvaluator`, `FluencyEvaluator`, and `SimilarityEvaluator` (needs input `ground_truth`). It also includes a Natural Language Process (NLP) metric `F1ScoreEvaluator` using F1 score on shared tokens between the response and its ground truth. See the [definitions and scoring rubrics](https://learn.microsoft.com/azure/ai-studio/concepts/evaluation-metrics-built-in?tabs=warning#generation-quality-metrics) for these AI-assisted evaluators and F1 score evaluator. | +| When to use it? | Use it when assessing the readability and user-friendliness of your model's generated responses in real-world applications. | +| What does it need as input? | Query, Response, Context, Ground Truth | \ No newline at end of file diff --git a/assets/promptflow/evaluators/models/qa-evaluator/model.yaml b/assets/promptflow/evaluators/models/qa-evaluator/model.yaml new file mode 100644 index 0000000000..04a6e88c03 --- /dev/null +++ b/assets/promptflow/evaluators/models/qa-evaluator/model.yaml @@ -0,0 +1,8 @@ +path: + container_name: rai-eval-flows + container_path: models/evaluators/QAEvaluator/v1/QAEvaluator + storage_name: amlraipfmodels + type: azureblob +publish: + description: description.md + type: custom_model \ No newline at end of file diff --git a/assets/promptflow/evaluators/models/qa-evaluator/spec.yaml b/assets/promptflow/evaluators/models/qa-evaluator/spec.yaml new file mode 100644 index 0000000000..574d3df108 --- /dev/null +++ b/assets/promptflow/evaluators/models/qa-evaluator/spec.yaml @@ -0,0 +1,9 @@ +$schema: https://azuremlschemas.azureedge.net/latest/model.schema.json +name: QA-Evaluator +path: ./ +properties: + is-promptflow: true + is-evaluator: true +tags: + Preview: "" +version: 1 \ No newline at end of file diff --git a/assets/promptflow/evaluators/models/relevance-evaluator/model.yaml b/assets/promptflow/evaluators/models/relevance-evaluator/model.yaml index 33a0883896..867d56b366 100644 --- a/assets/promptflow/evaluators/models/relevance-evaluator/model.yaml +++ b/assets/promptflow/evaluators/models/relevance-evaluator/model.yaml @@ -1,6 +1,6 @@ path: container_name: rai-eval-flows - container_path: models/evaluators/RelevanceEvaluator/v4 + container_path: models/evaluators/RelevanceEvaluator/v5/RelevanceEvaluator storage_name: amlraipfmodels type: azureblob publish: diff --git a/assets/promptflow/evaluators/models/relevance-evaluator/spec.yaml b/assets/promptflow/evaluators/models/relevance-evaluator/spec.yaml index 2fa6000bcd..1b34d2b6c2 100644 --- a/assets/promptflow/evaluators/models/relevance-evaluator/spec.yaml +++ b/assets/promptflow/evaluators/models/relevance-evaluator/spec.yaml @@ -5,7 +5,7 @@ properties: is-promptflow: true is-evaluator: true show-artifact: true - _default-display-file: ./relevance.prompty + _default-display-file: ./RelevanceEvaluator/relevance.prompty tags: hiddenlayerscanned: "" -version: 4 \ No newline at end of file +version: 5 \ No newline at end of file diff --git a/assets/promptflow/evaluators/models/retrieval-evaluator/model.yaml b/assets/promptflow/evaluators/models/retrieval-evaluator/model.yaml index c4b738f1db..d97b4e931f 100644 --- a/assets/promptflow/evaluators/models/retrieval-evaluator/model.yaml +++ b/assets/promptflow/evaluators/models/retrieval-evaluator/model.yaml @@ -1,6 +1,6 @@ path: container_name: rai-eval-flows - container_path: models/evaluators/RetrievalEvaluator/v1 + container_path: models/evaluators/RetrievalEvaluator/v2/RetrievalEvaluator storage_name: amlraipfmodels type: azureblob publish: diff --git a/assets/promptflow/evaluators/models/retrieval-evaluator/spec.yaml b/assets/promptflow/evaluators/models/retrieval-evaluator/spec.yaml index b19b98e9c7..f165f2df65 100644 --- a/assets/promptflow/evaluators/models/retrieval-evaluator/spec.yaml +++ b/assets/promptflow/evaluators/models/retrieval-evaluator/spec.yaml @@ -5,7 +5,7 @@ properties: is-promptflow: true is-evaluator: true show-artifact: true - _default-display-file: ./retrieval.prompty + _default-display-file: ./RetrievalEvaluator/retrieval.prompty tags: hiddenlayerscanned: "" -version: 1 \ No newline at end of file +version: 2 \ No newline at end of file diff --git a/assets/promptflow/models/rai-eval-ui-dag-flow/model.yaml b/assets/promptflow/models/rai-eval-ui-dag-flow/model.yaml index 9a3bfa1c20..40f1710157 100644 --- a/assets/promptflow/models/rai-eval-ui-dag-flow/model.yaml +++ b/assets/promptflow/models/rai-eval-ui-dag-flow/model.yaml @@ -1,6 +1,6 @@ path: container_name: rai-eval-flows - container_path: models/rai_eval_ui_dag_flow/v6 + container_path: models/rai_eval_ui_dag_flow/v7 storage_name: amlraipfmodels type: azureblob publish: diff --git a/assets/promptflow/models/rai-eval-ui-dag-flow/spec.yaml b/assets/promptflow/models/rai-eval-ui-dag-flow/spec.yaml index 3216b1676f..c2e67dc8db 100644 --- a/assets/promptflow/models/rai-eval-ui-dag-flow/spec.yaml +++ b/assets/promptflow/models/rai-eval-ui-dag-flow/spec.yaml @@ -9,4 +9,4 @@ properties: azureml.promptflow.description: Compute the quality and safety of the answer for the given question based on the ground_truth and the context inference-min-sku-spec: 2|0|14|28 inference-recommended-sku: Standard_DS3_v2 -version: 6 +version: 7 From f91b30820dd16203562f3555d80b263de4478851 Mon Sep 17 00:00:00 2001 From: Nemanja <55772835+nemanjarajic@users.noreply.github.com> Date: Thu, 12 Dec 2024 20:08:34 -0800 Subject: [PATCH 22/31] Phi-4 spec changes (#3674) --- assets/models/system/Phi-4/spec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/models/system/Phi-4/spec.yaml b/assets/models/system/Phi-4/spec.yaml index f87a5ca332..5c2c3c6c9c 100644 --- a/assets/models/system/Phi-4/spec.yaml +++ b/assets/models/system/Phi-4/spec.yaml @@ -13,7 +13,6 @@ tags: author: Microsoft SharedComputeCapacityEnabled: "" disable-batch: true - maas-inference: false freePlayground: "false" Preview: "" Featured: "" @@ -30,6 +29,7 @@ tags: inputModalities: "text" outputModalities: "text" evaluation: "evaluation.md" + trainingDataDate: "June 2024" notes: "notes.md" hiddenlayerscanned: "" inference_compute_allow_list: From 58b798c3eb13d126e946b10bf76cd543a9c19639 Mon Sep 17 00:00:00 2001 From: roopavidhya <132437865+roopavidhya@users.noreply.github.com> Date: Fri, 13 Dec 2024 12:53:23 +0530 Subject: [PATCH 23/31] Rad dino model onboarding (#3675) * Add rad-dino spec * Update readme, add mlmodel file * Update spec * Update spec * Remove unsupported skus * Add inference min sku spec * Add inference min sku spec * Add inference min sku spec * Revert dinov2 spec change --------- Co-authored-by: Roopa G --- .../models/system/microsoft-rad-dino/MLModel | 28 ++ .../system/microsoft-rad-dino/asset.yaml | 4 + .../system/microsoft-rad-dino/description.md | 253 ++++++++++++++++++ .../system/microsoft-rad-dino/model.yaml | 8 + .../system/microsoft-rad-dino/spec.yaml | 29 ++ 5 files changed, 322 insertions(+) create mode 100644 assets/models/system/microsoft-rad-dino/MLModel create mode 100644 assets/models/system/microsoft-rad-dino/asset.yaml create mode 100644 assets/models/system/microsoft-rad-dino/description.md create mode 100644 assets/models/system/microsoft-rad-dino/model.yaml create mode 100644 assets/models/system/microsoft-rad-dino/spec.yaml diff --git a/assets/models/system/microsoft-rad-dino/MLModel b/assets/models/system/microsoft-rad-dino/MLModel new file mode 100644 index 0000000000..e8814b6aae --- /dev/null +++ b/assets/models/system/microsoft-rad-dino/MLModel @@ -0,0 +1,28 @@ +flavors: + python_function: + artifacts: + model_dir: + path: artifacts/INPUT_model_path + uri: /mnt/azureml/cr/j/99e5ffbe82a2402e8941186a4d91e699/cap/data-capability/wd/INPUT_model_path + cloudpickle_version: 2.2.1 + code: code + env: + conda: conda.yaml + virtualenv: python_env.yaml + loader_module: mlflow.pyfunc.model + python_model: python_model.pkl + python_version: 3.9.20 + streamable: false +metadata: + base_model_name: microsoft/rad-dino + base_model_task: embeddings + is_acft_model: true + is_finetuned_model: false +mlflow_version: 2.15.1 +model_size_bytes: 441298145 +model_uuid: e286b1721b3f46029708403c5fdb0c28 +signature: + inputs: '[{"type": "string", "name": "image", "required": true}]' + outputs: '[{"type": "string", "name": "image_features", "required": true}]' + params: null +utc_time_created: '2024-12-05 08:49:25.479748' diff --git a/assets/models/system/microsoft-rad-dino/asset.yaml b/assets/models/system/microsoft-rad-dino/asset.yaml new file mode 100644 index 0000000000..143a2f9fd8 --- /dev/null +++ b/assets/models/system/microsoft-rad-dino/asset.yaml @@ -0,0 +1,4 @@ +type: model +extra_config: model.yaml +spec: spec.yaml +categories: [Models] diff --git a/assets/models/system/microsoft-rad-dino/description.md b/assets/models/system/microsoft-rad-dino/description.md new file mode 100644 index 0000000000..52aae3d8bb --- /dev/null +++ b/assets/models/system/microsoft-rad-dino/description.md @@ -0,0 +1,253 @@ +## Model Description + +# Model card for RAD-DINO + + + +## Model description + + + +RAD-DINO is a vision transformer model trained to encode chest X-rays using the self-supervised learning method [DINOv2](https://openreview.net/forum?id=a68SUt6zFt). + +RAD-DINO is described in detail in [RAD-DINO: Exploring Scalable Medical Image Encoders Beyond Text Supervision (F. Pérez-García, H. Sharma, S. Bond-Taylor, et al., 2024)](https://arxiv.org/abs/2401.10815). + +- **Developed by:** Microsoft Health Futures +- **Model type:** Vision transformer +- **License:** [MSRLA](./LICENSE) +- **Finetuned from model:** [`dinov2-base`](https://huggingface.co/facebook/dinov2-base) + +## Uses + + + +RAD-DINO is shared for research purposes only. +It is **not meant to be used for clinical practice**. + + + + + +The model is a vision backbone that can be plugged to other models for downstream tasks. +Some potential uses are: + +- Image classification, with a classifier trained on top of the `CLS` token +- Image segmentation, with a decoder trained using the patch tokens +- Clustering, using the image embeddings directly +- Image retrieval, using nearest neighbors of the CLS token +- Report generation, with a language model to decode text + +Fine-tuning RAD-DINO is typically not necessary to obtain good performance in downstream tasks. + + + + + +## Biases, risks, and limitations + + + +RAD-DINO was trained with data from three countries, therefore it might be biased towards population in the training data. +Underlying biases of the training datasets may not be well characterized. + +## Getting started + +Let us first write an auxiliary function to download a chest X-ray. + +```python +>>> import requests +>>> from PIL import Image +>>> def download_sample_image() -> Image.Image: +... """Download chest X-ray with CC license.""" +... base_url = "https://upload.wikimedia.org/wikipedia/commons" +... image_url = f"{base_url}/2/20/Chest_X-ray_in_influenza_and_Haemophilus_influenzae.jpg" +... headers = {"User-Agent": "RAD-DINO"} +... response = requests.get(image_url, headers=headers, stream=True) +... return Image.open(response.raw) +... +``` + +Now let us download the model and encode an image. + +```python +>>> import torch +>>> from transformers import AutoModel +>>> from transformers import AutoImageProcessor +>>> +>>> # Download the model +>>> repo = "microsoft/rad-dino" +>>> model = AutoModel.from_pretrained(repo) +>>> +>>> # The processor takes a PIL image, performs resizing, center-cropping, and +>>> # intensity normalization using stats from MIMIC-CXR, and returns a +>>> # dictionary with a PyTorch tensor ready for the encoder +>>> processor = AutoImageProcessor.from_pretrained(repo) +>>> +>>> # Download and preprocess a chest X-ray +>>> image = download_sample_image() +>>> image.size # (width, height) +(2765, 2505) +>>> inputs = processor(images=image, return_tensors="pt") +>>> +>>> # Encode the image! +>>> with torch.inference_mode(): +>>> outputs = model(**inputs) +>>> +>>> # Look at the CLS embeddings +>>> cls_embeddings = outputs.pooler_output +>>> cls_embeddings.shape # (batch_size, num_channels) +torch.Size([1, 768]) +``` + +If we are interested in the feature maps, we can reshape the patch embeddings into a grid. +We will use [`einops`](https://einops.rocks/) (install with `pip install einops`) for this. + +```python +>>> def reshape_patch_embeddings(flat_tokens: torch.Tensor) -> torch.Tensor: +... """Reshape flat list of patch tokens into a nice grid.""" +... from einops import rearrange +... image_size = processor.crop_size["height"] +... patch_size = model.config.patch_size +... embeddings_size = image_size // patch_size +... patches_grid = rearrange(flat_tokens, "b (h w) c -> b c h w", h=embeddings_size) +... return patches_grid +... +>>> flat_patch_embeddings = outputs.last_hidden_state[:, 1:] # first token is CLS +>>> reshaped_patch_embeddings = reshape_patch_embeddings(flat_patch_embeddings) +>>> reshaped_patch_embeddings.shape # (batch_size, num_channels, height, width) +torch.Size([1, 768, 37, 37]) +``` + +## Training details + +### Training data + + + +We used images from five public, deidentified chest X-ray datasets to train this checkpoint of RAD-DINO. + +| Dataset | Num. images | +| --------- | ----------: | +| [MIMIC-CXR](https://www.nature.com/articles/s41597-019-0322-0) | 368 960 | +| [CheXpert](https://ojs.aaai.org/index.php/AAAI/article/view/3834) | 223 648 | +| [NIH-CXR](https://openaccess.thecvf.com/content_cvpr_2017/html/Wang_ChestX-ray8_Hospital-Scale_Chest_CVPR_2017_paper.html) | 112 120 | +| [PadChest](https://www.sciencedirect.com/science/article/abs/pii/S1361841520301614) | 136 787 | +| [BRAX](https://www.nature.com/articles/s41597-022-01608-8) | 41 260 | +| **TOTAL** | 882 775 | + +Images in the validation and test sets used to train [MAIRA](https://arxiv.org/abs/2311.13668) were excluded from the training set of RAD-DINO. +The list of image files used for training is available at [`./training_images.csv`](./training_images.csv). + +Note this checkpoint is different from the one in the paper, where some private data was used (and fewer GPUs). +The checkpoint shared here is trained for 35 000 iterations (the total number of iterations in the run was 100 000, but we selected this checkpoint using linear probing on the validation sets of the evaluation datasets described in the paper). +We used 16 nodes with 4 A100 GPUs each, and a batch size of 40 images per GPU. + +### Training procedure + + + +We refer to the [manuscript](https://arxiv.org/abs/2401.10815) for a detailed description of the training procedure. + +#### Preprocessing + +All DICOM files were resized using B-spline interpolation so that their shorter size was 518, min-max scaled to [0, 255], and stored as PNG files. + +#### Training hyperparameters + +- **Training regime:** fp16 using PyTorch-FSDP mixed-precision. + + + +## Evaluation + + + +Our evaluation is best described in the [manuscript](https://arxiv.org/abs/2401.10815). + + + +## Environmental impact + + + + + + + + + + +- **Hardware type:** NVIDIA A100 GPUs +- **Hours used:** 40 hours/GPU × 16 nodes × 4 GPUs/node = 2560 GPU-hours +- **Cloud provider:** Azure +- **Compute region:** West US 2 +- **Carbon emitted:** 222 kg CO₂ eq. + +### Compute infrastructure + +RAD-DINO was trained on [Azure Machine Learning](https://azure.microsoft.com/en-us/products/machine-learning). + +#### Hardware + +We used 16 `Standard_NC96ads_A100_v4` nodes with four NVIDIA A100 (80 GB) GPUs each. + +#### Software + +We leveraged the code in [DINOv2](https://openreview.net/forum?id=a68SUt6zFt) for training. +We used [SimpleITK](https://simpleitk.org/) and [Pydicom](https://pydicom.github.io/) for processing of DICOM files. + +## Citation + + + +**BibTeX:** + +```bibtex +@misc{perezgarcia2024raddino, + title={{RAD-DINO}: Exploring Scalable Medical Image Encoders Beyond Text Supervision}, + author={Fernando Pérez-García and Harshita Sharma and Sam Bond-Taylor and Kenza Bouzid and Valentina Salvatelli and Maximilian Ilse and Shruthi Bannur and Daniel C. Castro and Anton Schwaighofer and Matthew P. Lungren and Maria Wetscherek and Noel Codella and Stephanie L. Hyland and Javier Alvarez-Valle and Ozan Oktay}, + year={2024}, + eprint={2401.10815}, + archivePrefix={arXiv}, + primaryClass={cs.CV} +} +``` + +**APA:** + +> Pérez-García, F., Sharma, H., Bond-Taylor, S., Bouzid, K., Salvatelli, V., Ilse, M., Bannur, S., Castro, D.C., Schwaighofer, A., Lungren, M.P., Wetscherek, M.T., Codella, N., Hyland, S.L., Alvarez-Valle, J., & Oktay, O. (2024). *RAD-DINO: Exploring Scalable Medical Image Encoders Beyond Text Supervision*. ArXiv, abs/2401.10815. + +## Model card contact + +Fernando Pérez-García ([`fperezgarcia@microsoft.com`](mailto:fperezgarcia@microsoft.com)). + + +### Sample inputs and outputs + +#### Sample input +```json +{"input_data": {"columns": ["image"], "index": [0], "data": ["image1"]}} +``` + +#### Sample output +```json +[{"image_features": [0.0, 0.0, 0.0]}] +``` diff --git a/assets/models/system/microsoft-rad-dino/model.yaml b/assets/models/system/microsoft-rad-dino/model.yaml new file mode 100644 index 0000000000..416103b22e --- /dev/null +++ b/assets/models/system/microsoft-rad-dino/model.yaml @@ -0,0 +1,8 @@ +path: + container_name: models + container_path: huggingface/microsoft-rad-dino/1733475346/mlflow_model_folder + storage_name: automlcesdkdataresources + type: azureblob +publish: + description: description.md + type: mlflow_model diff --git a/assets/models/system/microsoft-rad-dino/spec.yaml b/assets/models/system/microsoft-rad-dino/spec.yaml new file mode 100644 index 0000000000..b14568e18d --- /dev/null +++ b/assets/models/system/microsoft-rad-dino/spec.yaml @@ -0,0 +1,29 @@ +$schema: https://azuremlschemas.azureedge.net/latest/model.schema.json +name: microsoft-rad-dino +path: ./ +properties: + SharedComputeCapacityEnabled: true + datasets: '' + inference-min-sku-spec: 6|1|112|64 + inference-recommended-sku: Standard_NC6s_v3, Standard_NC24ads_A100_v4, + Standard_NC12s_v3, Standard_NC48ads_A100_v4, Standard_NC64as_T4_v3, + Standard_NC24s_v3,Standard_ND40rs_v2, Standard_NC96ads_A100_v4, + Standard_ND96asr_v4, Standard_ND96amsr_A100_v4 +tags: + Preview: '' + SharedComputeCapacityEnabled: '' + inference_compute_allow_list: + - Standard_NC6s_v3 + - Standard_NC24ads_A100_v4 + - Standard_NC12s_v3 + - Standard_NC48ads_A100_v4 + - Standard_NC64as_T4_v3 + - Standard_NC24s_v3 + - Standard_ND40rs_v2 + - Standard_NC96ads_A100_v4 + - Standard_ND96asr_v4 + - Standard_ND96amsr_A100_v4 + license: msrla + author: Microsoft + task: embeddings +version: 1 From d451549dab22a3f07e285c29a362c05ebef3331d Mon Sep 17 00:00:00 2001 From: vizhur Date: Fri, 13 Dec 2024 07:22:09 -0500 Subject: [PATCH 24/31] Revert "Rad dino model onboarding (#3675)" (#3676) This reverts commit 58b798c3eb13d126e946b10bf76cd543a9c19639. --- .../models/system/microsoft-rad-dino/MLModel | 28 -- .../system/microsoft-rad-dino/asset.yaml | 4 - .../system/microsoft-rad-dino/description.md | 253 ------------------ .../system/microsoft-rad-dino/model.yaml | 8 - .../system/microsoft-rad-dino/spec.yaml | 29 -- 5 files changed, 322 deletions(-) delete mode 100644 assets/models/system/microsoft-rad-dino/MLModel delete mode 100644 assets/models/system/microsoft-rad-dino/asset.yaml delete mode 100644 assets/models/system/microsoft-rad-dino/description.md delete mode 100644 assets/models/system/microsoft-rad-dino/model.yaml delete mode 100644 assets/models/system/microsoft-rad-dino/spec.yaml diff --git a/assets/models/system/microsoft-rad-dino/MLModel b/assets/models/system/microsoft-rad-dino/MLModel deleted file mode 100644 index e8814b6aae..0000000000 --- a/assets/models/system/microsoft-rad-dino/MLModel +++ /dev/null @@ -1,28 +0,0 @@ -flavors: - python_function: - artifacts: - model_dir: - path: artifacts/INPUT_model_path - uri: /mnt/azureml/cr/j/99e5ffbe82a2402e8941186a4d91e699/cap/data-capability/wd/INPUT_model_path - cloudpickle_version: 2.2.1 - code: code - env: - conda: conda.yaml - virtualenv: python_env.yaml - loader_module: mlflow.pyfunc.model - python_model: python_model.pkl - python_version: 3.9.20 - streamable: false -metadata: - base_model_name: microsoft/rad-dino - base_model_task: embeddings - is_acft_model: true - is_finetuned_model: false -mlflow_version: 2.15.1 -model_size_bytes: 441298145 -model_uuid: e286b1721b3f46029708403c5fdb0c28 -signature: - inputs: '[{"type": "string", "name": "image", "required": true}]' - outputs: '[{"type": "string", "name": "image_features", "required": true}]' - params: null -utc_time_created: '2024-12-05 08:49:25.479748' diff --git a/assets/models/system/microsoft-rad-dino/asset.yaml b/assets/models/system/microsoft-rad-dino/asset.yaml deleted file mode 100644 index 143a2f9fd8..0000000000 --- a/assets/models/system/microsoft-rad-dino/asset.yaml +++ /dev/null @@ -1,4 +0,0 @@ -type: model -extra_config: model.yaml -spec: spec.yaml -categories: [Models] diff --git a/assets/models/system/microsoft-rad-dino/description.md b/assets/models/system/microsoft-rad-dino/description.md deleted file mode 100644 index 52aae3d8bb..0000000000 --- a/assets/models/system/microsoft-rad-dino/description.md +++ /dev/null @@ -1,253 +0,0 @@ -## Model Description - -# Model card for RAD-DINO - - - -## Model description - - - -RAD-DINO is a vision transformer model trained to encode chest X-rays using the self-supervised learning method [DINOv2](https://openreview.net/forum?id=a68SUt6zFt). - -RAD-DINO is described in detail in [RAD-DINO: Exploring Scalable Medical Image Encoders Beyond Text Supervision (F. Pérez-García, H. Sharma, S. Bond-Taylor, et al., 2024)](https://arxiv.org/abs/2401.10815). - -- **Developed by:** Microsoft Health Futures -- **Model type:** Vision transformer -- **License:** [MSRLA](./LICENSE) -- **Finetuned from model:** [`dinov2-base`](https://huggingface.co/facebook/dinov2-base) - -## Uses - - - -RAD-DINO is shared for research purposes only. -It is **not meant to be used for clinical practice**. - - - - - -The model is a vision backbone that can be plugged to other models for downstream tasks. -Some potential uses are: - -- Image classification, with a classifier trained on top of the `CLS` token -- Image segmentation, with a decoder trained using the patch tokens -- Clustering, using the image embeddings directly -- Image retrieval, using nearest neighbors of the CLS token -- Report generation, with a language model to decode text - -Fine-tuning RAD-DINO is typically not necessary to obtain good performance in downstream tasks. - - - - - -## Biases, risks, and limitations - - - -RAD-DINO was trained with data from three countries, therefore it might be biased towards population in the training data. -Underlying biases of the training datasets may not be well characterized. - -## Getting started - -Let us first write an auxiliary function to download a chest X-ray. - -```python ->>> import requests ->>> from PIL import Image ->>> def download_sample_image() -> Image.Image: -... """Download chest X-ray with CC license.""" -... base_url = "https://upload.wikimedia.org/wikipedia/commons" -... image_url = f"{base_url}/2/20/Chest_X-ray_in_influenza_and_Haemophilus_influenzae.jpg" -... headers = {"User-Agent": "RAD-DINO"} -... response = requests.get(image_url, headers=headers, stream=True) -... return Image.open(response.raw) -... -``` - -Now let us download the model and encode an image. - -```python ->>> import torch ->>> from transformers import AutoModel ->>> from transformers import AutoImageProcessor ->>> ->>> # Download the model ->>> repo = "microsoft/rad-dino" ->>> model = AutoModel.from_pretrained(repo) ->>> ->>> # The processor takes a PIL image, performs resizing, center-cropping, and ->>> # intensity normalization using stats from MIMIC-CXR, and returns a ->>> # dictionary with a PyTorch tensor ready for the encoder ->>> processor = AutoImageProcessor.from_pretrained(repo) ->>> ->>> # Download and preprocess a chest X-ray ->>> image = download_sample_image() ->>> image.size # (width, height) -(2765, 2505) ->>> inputs = processor(images=image, return_tensors="pt") ->>> ->>> # Encode the image! ->>> with torch.inference_mode(): ->>> outputs = model(**inputs) ->>> ->>> # Look at the CLS embeddings ->>> cls_embeddings = outputs.pooler_output ->>> cls_embeddings.shape # (batch_size, num_channels) -torch.Size([1, 768]) -``` - -If we are interested in the feature maps, we can reshape the patch embeddings into a grid. -We will use [`einops`](https://einops.rocks/) (install with `pip install einops`) for this. - -```python ->>> def reshape_patch_embeddings(flat_tokens: torch.Tensor) -> torch.Tensor: -... """Reshape flat list of patch tokens into a nice grid.""" -... from einops import rearrange -... image_size = processor.crop_size["height"] -... patch_size = model.config.patch_size -... embeddings_size = image_size // patch_size -... patches_grid = rearrange(flat_tokens, "b (h w) c -> b c h w", h=embeddings_size) -... return patches_grid -... ->>> flat_patch_embeddings = outputs.last_hidden_state[:, 1:] # first token is CLS ->>> reshaped_patch_embeddings = reshape_patch_embeddings(flat_patch_embeddings) ->>> reshaped_patch_embeddings.shape # (batch_size, num_channels, height, width) -torch.Size([1, 768, 37, 37]) -``` - -## Training details - -### Training data - - - -We used images from five public, deidentified chest X-ray datasets to train this checkpoint of RAD-DINO. - -| Dataset | Num. images | -| --------- | ----------: | -| [MIMIC-CXR](https://www.nature.com/articles/s41597-019-0322-0) | 368 960 | -| [CheXpert](https://ojs.aaai.org/index.php/AAAI/article/view/3834) | 223 648 | -| [NIH-CXR](https://openaccess.thecvf.com/content_cvpr_2017/html/Wang_ChestX-ray8_Hospital-Scale_Chest_CVPR_2017_paper.html) | 112 120 | -| [PadChest](https://www.sciencedirect.com/science/article/abs/pii/S1361841520301614) | 136 787 | -| [BRAX](https://www.nature.com/articles/s41597-022-01608-8) | 41 260 | -| **TOTAL** | 882 775 | - -Images in the validation and test sets used to train [MAIRA](https://arxiv.org/abs/2311.13668) were excluded from the training set of RAD-DINO. -The list of image files used for training is available at [`./training_images.csv`](./training_images.csv). - -Note this checkpoint is different from the one in the paper, where some private data was used (and fewer GPUs). -The checkpoint shared here is trained for 35 000 iterations (the total number of iterations in the run was 100 000, but we selected this checkpoint using linear probing on the validation sets of the evaluation datasets described in the paper). -We used 16 nodes with 4 A100 GPUs each, and a batch size of 40 images per GPU. - -### Training procedure - - - -We refer to the [manuscript](https://arxiv.org/abs/2401.10815) for a detailed description of the training procedure. - -#### Preprocessing - -All DICOM files were resized using B-spline interpolation so that their shorter size was 518, min-max scaled to [0, 255], and stored as PNG files. - -#### Training hyperparameters - -- **Training regime:** fp16 using PyTorch-FSDP mixed-precision. - - - -## Evaluation - - - -Our evaluation is best described in the [manuscript](https://arxiv.org/abs/2401.10815). - - - -## Environmental impact - - - - - - - - - - -- **Hardware type:** NVIDIA A100 GPUs -- **Hours used:** 40 hours/GPU × 16 nodes × 4 GPUs/node = 2560 GPU-hours -- **Cloud provider:** Azure -- **Compute region:** West US 2 -- **Carbon emitted:** 222 kg CO₂ eq. - -### Compute infrastructure - -RAD-DINO was trained on [Azure Machine Learning](https://azure.microsoft.com/en-us/products/machine-learning). - -#### Hardware - -We used 16 `Standard_NC96ads_A100_v4` nodes with four NVIDIA A100 (80 GB) GPUs each. - -#### Software - -We leveraged the code in [DINOv2](https://openreview.net/forum?id=a68SUt6zFt) for training. -We used [SimpleITK](https://simpleitk.org/) and [Pydicom](https://pydicom.github.io/) for processing of DICOM files. - -## Citation - - - -**BibTeX:** - -```bibtex -@misc{perezgarcia2024raddino, - title={{RAD-DINO}: Exploring Scalable Medical Image Encoders Beyond Text Supervision}, - author={Fernando Pérez-García and Harshita Sharma and Sam Bond-Taylor and Kenza Bouzid and Valentina Salvatelli and Maximilian Ilse and Shruthi Bannur and Daniel C. Castro and Anton Schwaighofer and Matthew P. Lungren and Maria Wetscherek and Noel Codella and Stephanie L. Hyland and Javier Alvarez-Valle and Ozan Oktay}, - year={2024}, - eprint={2401.10815}, - archivePrefix={arXiv}, - primaryClass={cs.CV} -} -``` - -**APA:** - -> Pérez-García, F., Sharma, H., Bond-Taylor, S., Bouzid, K., Salvatelli, V., Ilse, M., Bannur, S., Castro, D.C., Schwaighofer, A., Lungren, M.P., Wetscherek, M.T., Codella, N., Hyland, S.L., Alvarez-Valle, J., & Oktay, O. (2024). *RAD-DINO: Exploring Scalable Medical Image Encoders Beyond Text Supervision*. ArXiv, abs/2401.10815. - -## Model card contact - -Fernando Pérez-García ([`fperezgarcia@microsoft.com`](mailto:fperezgarcia@microsoft.com)). - - -### Sample inputs and outputs - -#### Sample input -```json -{"input_data": {"columns": ["image"], "index": [0], "data": ["image1"]}} -``` - -#### Sample output -```json -[{"image_features": [0.0, 0.0, 0.0]}] -``` diff --git a/assets/models/system/microsoft-rad-dino/model.yaml b/assets/models/system/microsoft-rad-dino/model.yaml deleted file mode 100644 index 416103b22e..0000000000 --- a/assets/models/system/microsoft-rad-dino/model.yaml +++ /dev/null @@ -1,8 +0,0 @@ -path: - container_name: models - container_path: huggingface/microsoft-rad-dino/1733475346/mlflow_model_folder - storage_name: automlcesdkdataresources - type: azureblob -publish: - description: description.md - type: mlflow_model diff --git a/assets/models/system/microsoft-rad-dino/spec.yaml b/assets/models/system/microsoft-rad-dino/spec.yaml deleted file mode 100644 index b14568e18d..0000000000 --- a/assets/models/system/microsoft-rad-dino/spec.yaml +++ /dev/null @@ -1,29 +0,0 @@ -$schema: https://azuremlschemas.azureedge.net/latest/model.schema.json -name: microsoft-rad-dino -path: ./ -properties: - SharedComputeCapacityEnabled: true - datasets: '' - inference-min-sku-spec: 6|1|112|64 - inference-recommended-sku: Standard_NC6s_v3, Standard_NC24ads_A100_v4, - Standard_NC12s_v3, Standard_NC48ads_A100_v4, Standard_NC64as_T4_v3, - Standard_NC24s_v3,Standard_ND40rs_v2, Standard_NC96ads_A100_v4, - Standard_ND96asr_v4, Standard_ND96amsr_A100_v4 -tags: - Preview: '' - SharedComputeCapacityEnabled: '' - inference_compute_allow_list: - - Standard_NC6s_v3 - - Standard_NC24ads_A100_v4 - - Standard_NC12s_v3 - - Standard_NC48ads_A100_v4 - - Standard_NC64as_T4_v3 - - Standard_NC24s_v3 - - Standard_ND40rs_v2 - - Standard_NC96ads_A100_v4 - - Standard_ND96asr_v4 - - Standard_ND96amsr_A100_v4 - license: msrla - author: Microsoft - task: embeddings -version: 1 From be0ca23756c11e24319884133b658092b6e6f660 Mon Sep 17 00:00:00 2001 From: aggarwal-k <117632441+aggarwal-k@users.noreply.github.com> Date: Fri, 13 Dec 2024 19:00:08 +0530 Subject: [PATCH 25/31] Update mlflow package version (#3672) --- .../finetune_acft_hf_nlp/environments/acpt/context/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/training/finetune_acft_hf_nlp/environments/acpt/context/Dockerfile b/assets/training/finetune_acft_hf_nlp/environments/acpt/context/Dockerfile index f2d93cd2fe..fbe9dc485c 100644 --- a/assets/training/finetune_acft_hf_nlp/environments/acpt/context/Dockerfile +++ b/assets/training/finetune_acft_hf_nlp/environments/acpt/context/Dockerfile @@ -16,7 +16,7 @@ RUN pip install -r requirements.txt --no-cache-dir # need to be removed when updating transformers>4.44.0 COPY deepspeed /opt/conda/envs/ptca/lib/python3.10/site-packages/transformers/integrations/deepspeed.py -RUN pip install mlflow==2.14.3 +RUN pip install mlflow==2.19.0 RUN python -m nltk.downloader punkt RUN python -m nltk.downloader punkt_tab RUN MAX_JOBS=4 pip install flash-attn==2.5.5 --no-build-isolation From d6f03ab98449ab2f4df22cd202de793ed319ba9b Mon Sep 17 00:00:00 2001 From: Chandra Sekhar Gupta <38103118+guptha23@users.noreply.github.com> Date: Fri, 13 Dec 2024 19:55:50 +0530 Subject: [PATCH 26/31] Update quality benchmark tag for phi-35-mini-instruct and phi-3.5-vision-instruct models (#3663) * updating model evaluation environment with modelling_llama patch. * reverting the changes for transformers patch. * update quality benchmark tag for phi-35-mini-instruct model. * adding benchmark tag for phi-3.5-vision-instruct model. --------- Co-authored-by: Chandra Sekhar Gupta Aravapalli --- assets/models/system/phi-3.5-mini-128k-instruct/spec.yaml | 1 + assets/models/system/phi-3.5-vision-128k-instruct/spec.yaml | 1 + 2 files changed, 2 insertions(+) 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 f067539cd8..c62b7b6293 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 @@ -70,4 +70,5 @@ tags: logging_strategy: "steps" logging_steps: 10 save_total_limit: 1 + benchmark: "quality" 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 3486081f87..c1fd43435d 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 @@ -55,4 +55,5 @@ tags: logging_strategy: "steps" logging_steps: 10 save_total_limit: 1 + benchmark: "quality" version: 2 From 2cedc45958e6b655d864d28da8ad62e9e1223a94 Mon Sep 17 00:00:00 2001 From: Darshika <48280160+skadooshhhh@users.noreply.github.com> Date: Fri, 13 Dec 2024 20:15:51 +0530 Subject: [PATCH 27/31] Revert "Revert "Rad dino model onboarding (#3675)" (#3676)" (#3677) This reverts commit d451549dab22a3f07e285c29a362c05ebef3331d. Co-authored-by: vizhur --- .../models/system/microsoft-rad-dino/MLModel | 28 ++ .../system/microsoft-rad-dino/asset.yaml | 4 + .../system/microsoft-rad-dino/description.md | 253 ++++++++++++++++++ .../system/microsoft-rad-dino/model.yaml | 8 + .../system/microsoft-rad-dino/spec.yaml | 29 ++ 5 files changed, 322 insertions(+) create mode 100644 assets/models/system/microsoft-rad-dino/MLModel create mode 100644 assets/models/system/microsoft-rad-dino/asset.yaml create mode 100644 assets/models/system/microsoft-rad-dino/description.md create mode 100644 assets/models/system/microsoft-rad-dino/model.yaml create mode 100644 assets/models/system/microsoft-rad-dino/spec.yaml diff --git a/assets/models/system/microsoft-rad-dino/MLModel b/assets/models/system/microsoft-rad-dino/MLModel new file mode 100644 index 0000000000..e8814b6aae --- /dev/null +++ b/assets/models/system/microsoft-rad-dino/MLModel @@ -0,0 +1,28 @@ +flavors: + python_function: + artifacts: + model_dir: + path: artifacts/INPUT_model_path + uri: /mnt/azureml/cr/j/99e5ffbe82a2402e8941186a4d91e699/cap/data-capability/wd/INPUT_model_path + cloudpickle_version: 2.2.1 + code: code + env: + conda: conda.yaml + virtualenv: python_env.yaml + loader_module: mlflow.pyfunc.model + python_model: python_model.pkl + python_version: 3.9.20 + streamable: false +metadata: + base_model_name: microsoft/rad-dino + base_model_task: embeddings + is_acft_model: true + is_finetuned_model: false +mlflow_version: 2.15.1 +model_size_bytes: 441298145 +model_uuid: e286b1721b3f46029708403c5fdb0c28 +signature: + inputs: '[{"type": "string", "name": "image", "required": true}]' + outputs: '[{"type": "string", "name": "image_features", "required": true}]' + params: null +utc_time_created: '2024-12-05 08:49:25.479748' diff --git a/assets/models/system/microsoft-rad-dino/asset.yaml b/assets/models/system/microsoft-rad-dino/asset.yaml new file mode 100644 index 0000000000..143a2f9fd8 --- /dev/null +++ b/assets/models/system/microsoft-rad-dino/asset.yaml @@ -0,0 +1,4 @@ +type: model +extra_config: model.yaml +spec: spec.yaml +categories: [Models] diff --git a/assets/models/system/microsoft-rad-dino/description.md b/assets/models/system/microsoft-rad-dino/description.md new file mode 100644 index 0000000000..52aae3d8bb --- /dev/null +++ b/assets/models/system/microsoft-rad-dino/description.md @@ -0,0 +1,253 @@ +## Model Description + +# Model card for RAD-DINO + + + +## Model description + + + +RAD-DINO is a vision transformer model trained to encode chest X-rays using the self-supervised learning method [DINOv2](https://openreview.net/forum?id=a68SUt6zFt). + +RAD-DINO is described in detail in [RAD-DINO: Exploring Scalable Medical Image Encoders Beyond Text Supervision (F. Pérez-García, H. Sharma, S. Bond-Taylor, et al., 2024)](https://arxiv.org/abs/2401.10815). + +- **Developed by:** Microsoft Health Futures +- **Model type:** Vision transformer +- **License:** [MSRLA](./LICENSE) +- **Finetuned from model:** [`dinov2-base`](https://huggingface.co/facebook/dinov2-base) + +## Uses + + + +RAD-DINO is shared for research purposes only. +It is **not meant to be used for clinical practice**. + + + + + +The model is a vision backbone that can be plugged to other models for downstream tasks. +Some potential uses are: + +- Image classification, with a classifier trained on top of the `CLS` token +- Image segmentation, with a decoder trained using the patch tokens +- Clustering, using the image embeddings directly +- Image retrieval, using nearest neighbors of the CLS token +- Report generation, with a language model to decode text + +Fine-tuning RAD-DINO is typically not necessary to obtain good performance in downstream tasks. + + + + + +## Biases, risks, and limitations + + + +RAD-DINO was trained with data from three countries, therefore it might be biased towards population in the training data. +Underlying biases of the training datasets may not be well characterized. + +## Getting started + +Let us first write an auxiliary function to download a chest X-ray. + +```python +>>> import requests +>>> from PIL import Image +>>> def download_sample_image() -> Image.Image: +... """Download chest X-ray with CC license.""" +... base_url = "https://upload.wikimedia.org/wikipedia/commons" +... image_url = f"{base_url}/2/20/Chest_X-ray_in_influenza_and_Haemophilus_influenzae.jpg" +... headers = {"User-Agent": "RAD-DINO"} +... response = requests.get(image_url, headers=headers, stream=True) +... return Image.open(response.raw) +... +``` + +Now let us download the model and encode an image. + +```python +>>> import torch +>>> from transformers import AutoModel +>>> from transformers import AutoImageProcessor +>>> +>>> # Download the model +>>> repo = "microsoft/rad-dino" +>>> model = AutoModel.from_pretrained(repo) +>>> +>>> # The processor takes a PIL image, performs resizing, center-cropping, and +>>> # intensity normalization using stats from MIMIC-CXR, and returns a +>>> # dictionary with a PyTorch tensor ready for the encoder +>>> processor = AutoImageProcessor.from_pretrained(repo) +>>> +>>> # Download and preprocess a chest X-ray +>>> image = download_sample_image() +>>> image.size # (width, height) +(2765, 2505) +>>> inputs = processor(images=image, return_tensors="pt") +>>> +>>> # Encode the image! +>>> with torch.inference_mode(): +>>> outputs = model(**inputs) +>>> +>>> # Look at the CLS embeddings +>>> cls_embeddings = outputs.pooler_output +>>> cls_embeddings.shape # (batch_size, num_channels) +torch.Size([1, 768]) +``` + +If we are interested in the feature maps, we can reshape the patch embeddings into a grid. +We will use [`einops`](https://einops.rocks/) (install with `pip install einops`) for this. + +```python +>>> def reshape_patch_embeddings(flat_tokens: torch.Tensor) -> torch.Tensor: +... """Reshape flat list of patch tokens into a nice grid.""" +... from einops import rearrange +... image_size = processor.crop_size["height"] +... patch_size = model.config.patch_size +... embeddings_size = image_size // patch_size +... patches_grid = rearrange(flat_tokens, "b (h w) c -> b c h w", h=embeddings_size) +... return patches_grid +... +>>> flat_patch_embeddings = outputs.last_hidden_state[:, 1:] # first token is CLS +>>> reshaped_patch_embeddings = reshape_patch_embeddings(flat_patch_embeddings) +>>> reshaped_patch_embeddings.shape # (batch_size, num_channels, height, width) +torch.Size([1, 768, 37, 37]) +``` + +## Training details + +### Training data + + + +We used images from five public, deidentified chest X-ray datasets to train this checkpoint of RAD-DINO. + +| Dataset | Num. images | +| --------- | ----------: | +| [MIMIC-CXR](https://www.nature.com/articles/s41597-019-0322-0) | 368 960 | +| [CheXpert](https://ojs.aaai.org/index.php/AAAI/article/view/3834) | 223 648 | +| [NIH-CXR](https://openaccess.thecvf.com/content_cvpr_2017/html/Wang_ChestX-ray8_Hospital-Scale_Chest_CVPR_2017_paper.html) | 112 120 | +| [PadChest](https://www.sciencedirect.com/science/article/abs/pii/S1361841520301614) | 136 787 | +| [BRAX](https://www.nature.com/articles/s41597-022-01608-8) | 41 260 | +| **TOTAL** | 882 775 | + +Images in the validation and test sets used to train [MAIRA](https://arxiv.org/abs/2311.13668) were excluded from the training set of RAD-DINO. +The list of image files used for training is available at [`./training_images.csv`](./training_images.csv). + +Note this checkpoint is different from the one in the paper, where some private data was used (and fewer GPUs). +The checkpoint shared here is trained for 35 000 iterations (the total number of iterations in the run was 100 000, but we selected this checkpoint using linear probing on the validation sets of the evaluation datasets described in the paper). +We used 16 nodes with 4 A100 GPUs each, and a batch size of 40 images per GPU. + +### Training procedure + + + +We refer to the [manuscript](https://arxiv.org/abs/2401.10815) for a detailed description of the training procedure. + +#### Preprocessing + +All DICOM files were resized using B-spline interpolation so that their shorter size was 518, min-max scaled to [0, 255], and stored as PNG files. + +#### Training hyperparameters + +- **Training regime:** fp16 using PyTorch-FSDP mixed-precision. + + + +## Evaluation + + + +Our evaluation is best described in the [manuscript](https://arxiv.org/abs/2401.10815). + + + +## Environmental impact + + + + + + + + + + +- **Hardware type:** NVIDIA A100 GPUs +- **Hours used:** 40 hours/GPU × 16 nodes × 4 GPUs/node = 2560 GPU-hours +- **Cloud provider:** Azure +- **Compute region:** West US 2 +- **Carbon emitted:** 222 kg CO₂ eq. + +### Compute infrastructure + +RAD-DINO was trained on [Azure Machine Learning](https://azure.microsoft.com/en-us/products/machine-learning). + +#### Hardware + +We used 16 `Standard_NC96ads_A100_v4` nodes with four NVIDIA A100 (80 GB) GPUs each. + +#### Software + +We leveraged the code in [DINOv2](https://openreview.net/forum?id=a68SUt6zFt) for training. +We used [SimpleITK](https://simpleitk.org/) and [Pydicom](https://pydicom.github.io/) for processing of DICOM files. + +## Citation + + + +**BibTeX:** + +```bibtex +@misc{perezgarcia2024raddino, + title={{RAD-DINO}: Exploring Scalable Medical Image Encoders Beyond Text Supervision}, + author={Fernando Pérez-García and Harshita Sharma and Sam Bond-Taylor and Kenza Bouzid and Valentina Salvatelli and Maximilian Ilse and Shruthi Bannur and Daniel C. Castro and Anton Schwaighofer and Matthew P. Lungren and Maria Wetscherek and Noel Codella and Stephanie L. Hyland and Javier Alvarez-Valle and Ozan Oktay}, + year={2024}, + eprint={2401.10815}, + archivePrefix={arXiv}, + primaryClass={cs.CV} +} +``` + +**APA:** + +> Pérez-García, F., Sharma, H., Bond-Taylor, S., Bouzid, K., Salvatelli, V., Ilse, M., Bannur, S., Castro, D.C., Schwaighofer, A., Lungren, M.P., Wetscherek, M.T., Codella, N., Hyland, S.L., Alvarez-Valle, J., & Oktay, O. (2024). *RAD-DINO: Exploring Scalable Medical Image Encoders Beyond Text Supervision*. ArXiv, abs/2401.10815. + +## Model card contact + +Fernando Pérez-García ([`fperezgarcia@microsoft.com`](mailto:fperezgarcia@microsoft.com)). + + +### Sample inputs and outputs + +#### Sample input +```json +{"input_data": {"columns": ["image"], "index": [0], "data": ["image1"]}} +``` + +#### Sample output +```json +[{"image_features": [0.0, 0.0, 0.0]}] +``` diff --git a/assets/models/system/microsoft-rad-dino/model.yaml b/assets/models/system/microsoft-rad-dino/model.yaml new file mode 100644 index 0000000000..416103b22e --- /dev/null +++ b/assets/models/system/microsoft-rad-dino/model.yaml @@ -0,0 +1,8 @@ +path: + container_name: models + container_path: huggingface/microsoft-rad-dino/1733475346/mlflow_model_folder + storage_name: automlcesdkdataresources + type: azureblob +publish: + description: description.md + type: mlflow_model diff --git a/assets/models/system/microsoft-rad-dino/spec.yaml b/assets/models/system/microsoft-rad-dino/spec.yaml new file mode 100644 index 0000000000..b14568e18d --- /dev/null +++ b/assets/models/system/microsoft-rad-dino/spec.yaml @@ -0,0 +1,29 @@ +$schema: https://azuremlschemas.azureedge.net/latest/model.schema.json +name: microsoft-rad-dino +path: ./ +properties: + SharedComputeCapacityEnabled: true + datasets: '' + inference-min-sku-spec: 6|1|112|64 + inference-recommended-sku: Standard_NC6s_v3, Standard_NC24ads_A100_v4, + Standard_NC12s_v3, Standard_NC48ads_A100_v4, Standard_NC64as_T4_v3, + Standard_NC24s_v3,Standard_ND40rs_v2, Standard_NC96ads_A100_v4, + Standard_ND96asr_v4, Standard_ND96amsr_A100_v4 +tags: + Preview: '' + SharedComputeCapacityEnabled: '' + inference_compute_allow_list: + - Standard_NC6s_v3 + - Standard_NC24ads_A100_v4 + - Standard_NC12s_v3 + - Standard_NC48ads_A100_v4 + - Standard_NC64as_T4_v3 + - Standard_NC24s_v3 + - Standard_ND40rs_v2 + - Standard_NC96ads_A100_v4 + - Standard_ND96asr_v4 + - Standard_ND96amsr_A100_v4 + license: msrla + author: Microsoft + task: embeddings +version: 1 From 27b4eca35eed828c9ba874f3ba7dac6a7034bcea Mon Sep 17 00:00:00 2001 From: cassieesvelt <73311224+cassieesvelt@users.noreply.github.com> Date: Fri, 13 Dec 2024 11:05:10 -0800 Subject: [PATCH 28/31] update tags for industry models (#3678) --- assets/models/system/financial-reports-analysis/spec.yaml | 1 + assets/models/system/supply-chain-trade-regulations/spec.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/assets/models/system/financial-reports-analysis/spec.yaml b/assets/models/system/financial-reports-analysis/spec.yaml index 2ac655c474..182fa80453 100644 --- a/assets/models/system/financial-reports-analysis/spec.yaml +++ b/assets/models/system/financial-reports-analysis/spec.yaml @@ -15,6 +15,7 @@ tags: Featured: "" languages: "en" keywords: "" + industry: financial-services inference_supported_envs: - vllm license: mit diff --git a/assets/models/system/supply-chain-trade-regulations/spec.yaml b/assets/models/system/supply-chain-trade-regulations/spec.yaml index e43f1385d6..5fd9107f1b 100644 --- a/assets/models/system/supply-chain-trade-regulations/spec.yaml +++ b/assets/models/system/supply-chain-trade-regulations/spec.yaml @@ -15,6 +15,7 @@ tags: Featured: "" languages: "en" keywords: "" + industry: manufacturing inference_supported_envs: - vllm license: mit From d9a47cda42f4ab3e7433d3e6a833c13b790726cc Mon Sep 17 00:00:00 2001 From: aggarwal-k <117632441+aggarwal-k@users.noreply.github.com> Date: Mon, 16 Dec 2024 10:52:11 +0530 Subject: [PATCH 29/31] Update env version (#3680) --- .../finetune_acft_hf_nlp/environments/acpt/context/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/training/finetune_acft_hf_nlp/environments/acpt/context/Dockerfile b/assets/training/finetune_acft_hf_nlp/environments/acpt/context/Dockerfile index fbe9dc485c..3542a0aceb 100644 --- a/assets/training/finetune_acft_hf_nlp/environments/acpt/context/Dockerfile +++ b/assets/training/finetune_acft_hf_nlp/environments/acpt/context/Dockerfile @@ -24,4 +24,4 @@ RUN MAX_JOBS=4 pip install flash-attn==2.5.5 --no-build-isolation # clean conda and pip caches RUN rm -rf ~/.cache/pip -# dummy number to change when needing to force rebuild without changing the definition: 1 +# dummy number to change when needing to force rebuild without changing the definition: 2 From 437313ffafa4e2a0f7285e7b3cefd262cca36363 Mon Sep 17 00:00:00 2001 From: Yeshwanth N Date: Mon, 16 Dec 2024 15:37:18 +0530 Subject: [PATCH 30/31] [vFix] : Update expat for vulnerability fix in vision images (#3684) * [vFix] : Update expat for vulnerability fix in vision images * [Update] : multimodal image ubuntu upgrade --- .../environments/acft_image_huggingface/context/Dockerfile | 2 +- .../environments/acft_video_mmtracking/context/Dockerfile | 2 +- .../acpt_image_framework_selector/context/Dockerfile | 2 +- .../environments/acpt_multimodal/context/Dockerfile | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/assets/training/finetune_acft_image/environments/acft_image_huggingface/context/Dockerfile b/assets/training/finetune_acft_image/environments/acft_image_huggingface/context/Dockerfile index 9f8f74d74f..47b67c644b 100644 --- a/assets/training/finetune_acft_image/environments/acft_image_huggingface/context/Dockerfile +++ b/assets/training/finetune_acft_image/environments/acft_image_huggingface/context/Dockerfile @@ -2,7 +2,7 @@ FROM mcr.microsoft.com/aifx/acpt/stable-ubuntu2204-cu118-py310-torch222:{{latest-image-tag:biweekly\.\d{6}\.\d{1}.*}} USER root -RUN apt-get -y update +RUN apt-get -y update && apt-get install -y expat=2.4.7-1ubuntu0.5 # Install required packages from pypi COPY requirements.txt . diff --git a/assets/training/finetune_acft_image/environments/acft_video_mmtracking/context/Dockerfile b/assets/training/finetune_acft_image/environments/acft_video_mmtracking/context/Dockerfile index 87d88dec2f..c6b9b55ced 100644 --- a/assets/training/finetune_acft_image/environments/acft_video_mmtracking/context/Dockerfile +++ b/assets/training/finetune_acft_image/environments/acft_video_mmtracking/context/Dockerfile @@ -2,7 +2,7 @@ FROM mcr.microsoft.com/aifx/acpt/stable-ubuntu2204-cu118-py310-torch222:{{latest-image-tag:biweekly\.\d{6}\.\d{1}.*}} USER root -RUN apt-get -y update +RUN apt-get -y update && apt-get install -y expat=2.4.7-1ubuntu0.5 # Install required packages from pypi COPY requirements.txt . diff --git a/assets/training/finetune_acft_image/environments/acpt_image_framework_selector/context/Dockerfile b/assets/training/finetune_acft_image/environments/acpt_image_framework_selector/context/Dockerfile index 9c5e376f89..3d283f40a8 100644 --- a/assets/training/finetune_acft_image/environments/acpt_image_framework_selector/context/Dockerfile +++ b/assets/training/finetune_acft_image/environments/acpt_image_framework_selector/context/Dockerfile @@ -1,7 +1,7 @@ # PTCA image FROM mcr.microsoft.com/aifx/acpt/stable-ubuntu2204-cu118-py310-torch222:{{latest-image-tag:biweekly\.\d{6}\.\d{1}.*}} -RUN apt-get -y update +RUN apt-get -y update && apt-get install -y expat=2.4.7-1ubuntu0.5 # Install required packages COPY requirements.txt . diff --git a/assets/training/finetune_acft_multimodal/environments/acpt_multimodal/context/Dockerfile b/assets/training/finetune_acft_multimodal/environments/acpt_multimodal/context/Dockerfile index 5bdee4b786..ab46779468 100644 --- a/assets/training/finetune_acft_multimodal/environments/acpt_multimodal/context/Dockerfile +++ b/assets/training/finetune_acft_multimodal/environments/acpt_multimodal/context/Dockerfile @@ -1,8 +1,8 @@ # PTCA image -FROM mcr.microsoft.com/aifx/acpt/stable-ubuntu2004-cu118-py310-torch222:{{latest-image-tag:biweekly\.\d{6}\.\d{1}.*}} +FROM mcr.microsoft.com/aifx/acpt/stable-ubuntu2204-cu118-py310-torch222:{{latest-image-tag:biweekly\.\d{6}\.\d{1}.*}} USER root -RUN apt-get -y update +RUN apt-get -y update && apt-get install -y expat=2.4.7-1ubuntu0.5 # Install required packages from pypi COPY requirements.txt . From d2c31de8936837742c18753e338b2f9183515fb0 Mon Sep 17 00:00:00 2001 From: Ankush Bhatia Date: Mon, 16 Dec 2024 16:16:36 +0530 Subject: [PATCH 31/31] [Model Evaluation] Fix Env vulnerabilities (#3682) * Fix Env vulnerabilities * Move mlflow dependency from conda yaml to dockerfile * Bug fix --------- Co-authored-by: Ankush Bhatia --- .../training/model_evaluation/environment/context/Dockerfile | 3 +++ assets/training/model_evaluation/environment/spec.yaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/assets/training/model_evaluation/environment/context/Dockerfile b/assets/training/model_evaluation/environment/context/Dockerfile index 8b8429aa48..d1db377bfc 100644 --- a/assets/training/model_evaluation/environment/context/Dockerfile +++ b/assets/training/model_evaluation/environment/context/Dockerfile @@ -22,3 +22,6 @@ ENV PATH=$CONDA_PREFIX/bin:$PATH # This is needed for mpi to locate libpython ENV LD_LIBRARY_PATH $CONDA_PREFIX/lib:$LD_LIBRARY_PATH + +# Temp fix for env vuln +RUN pip install mlflow==2.16.0 diff --git a/assets/training/model_evaluation/environment/spec.yaml b/assets/training/model_evaluation/environment/spec.yaml index 6fa4a3e07a..e0ab2c6551 100644 --- a/assets/training/model_evaluation/environment/spec.yaml +++ b/assets/training/model_evaluation/environment/spec.yaml @@ -13,4 +13,4 @@ os_type: linux tags: OS: Ubuntu20.04 Evaluation: "" - MLFlow: "2.2.1" + MLFlow: "2.16.0"