diff --git a/cli/foundation-models/system/finetune/question-answering/extractive-qa-pipeline.yml b/cli/foundation-models/system/finetune/question-answering/extractive-qa-pipeline.yml index 9db2405668..a2e7b828c7 100644 --- a/cli/foundation-models/system/finetune/question-answering/extractive-qa-pipeline.yml +++ b/cli/foundation-models/system/finetune/question-answering/extractive-qa-pipeline.yml @@ -11,7 +11,7 @@ inputs: # specify the foundation model available in the azureml system registry mlflow_model_path: - path: azureml://registries/azureml-preview/models/bert-based-uncased/versions/3 + path: azureml://registries/azureml/models/bert-based-uncased/versions/3 # huggingface_id: 'bert-base-uncased' # if you want to use a huggingface model, uncomment this line and comment the above line # map the dataset files to parameters @@ -60,10 +60,9 @@ settings: force_rerun: true jobs: - extractive_qna_finetune_job: + question_answering_pipeline: type: pipeline - # component: azureml://registries/azureml-preview/components/question_answering_pipeline/versions/0.0.3 - component: azureml://registries/azureml-preview/components/question_answering_pipeline/labels/latest + component: azureml://registries/azureml/components/question_answering_pipeline/labels/latest inputs: mlflow_model_path: ${{parent.inputs.mlflow_model_path}} diff --git a/cli/foundation-models/system/finetune/question-answering/extractive-qa.sh b/cli/foundation-models/system/finetune/question-answering/extractive-qa.sh index 20dd673bf3..a466465075 100644 --- a/cli/foundation-models/system/finetune/question-answering/extractive-qa.sh +++ b/cli/foundation-models/system/finetune/question-answering/extractive-qa.sh @@ -18,7 +18,7 @@ gpus_per_node=2 # This is the foundation model for finetuning model_name="bert-base-uncased" # using the latest version of the model - not working yet -model_version=1 +model_version=3 version=$(date +%s) finetuned_model_name=$model_name"-extractive-qna" @@ -118,7 +118,7 @@ fi # need to switch to using latest version for model, currently blocked with a bug. # submit finetuning job parent_job_name=$( az ml job create --file ./extractive-qa-pipeline.yml $workspace_info --query name -o tsv --set \ - jobs.extractive_qna_finetune_job.component="azureml://registries/$registry_name/components/$finetuning_pipeline_component/labels/latest" \ + jobs.question_answering_pipeline.component="azureml://registries/$registry_name/components/$finetuning_pipeline_component/labels/latest" \ inputs.compute_model_import=$compute_cluster \ inputs.compute_preprocess=$compute_cluster \ inputs.compute_finetune=$compute_cluster \ diff --git a/cli/foundation-models/system/finetune/summarization/news-summary-pipeline.yml b/cli/foundation-models/system/finetune/summarization/news-summary-pipeline.yml index 77490c046e..e74242e88e 100644 --- a/cli/foundation-models/system/finetune/summarization/news-summary-pipeline.yml +++ b/cli/foundation-models/system/finetune/summarization/news-summary-pipeline.yml @@ -11,7 +11,7 @@ inputs: # specify the foundation model available in the azureml system registry mlflow_model_path: - path: azureml://registries/azureml-preview/models/t5-small/versions/4 + path: azureml://registries/azureml/models/t5-small/versions/3 # huggingface_id: 't5-small' # if you want to use a huggingface model, uncomment this line and comment the above line # map the dataset files to parameters @@ -50,10 +50,9 @@ settings: force_rerun: true jobs: - news_summary_finetune_job: + summarization_pipeline: type: pipeline - # component: azureml://registries/azureml-preview/components/summarization_pipeline/versions/0.0.3 - component: azureml://registries/azureml-preview/components/summarization_pipeline/labels/latest + component: azureml://registries/azureml/components/summarization_pipeline/labels/latest inputs: mlflow_model_path: ${{parent.inputs.mlflow_model_path}} diff --git a/cli/foundation-models/system/finetune/summarization/news-summary.sh b/cli/foundation-models/system/finetune/summarization/news-summary.sh index 3078fd2abf..0609a0fdf9 100644 --- a/cli/foundation-models/system/finetune/summarization/news-summary.sh +++ b/cli/foundation-models/system/finetune/summarization/news-summary.sh @@ -18,7 +18,7 @@ gpus_per_node=2 # This is the foundation model for finetuning model_name="t5-small" # using the latest version of the model - not working yet -model_version=1 +model_version=3 version=$(date +%s) finetuned_model_name=$model_name"-news-summary" @@ -107,7 +107,7 @@ fi # need to switch to using latest version for model, currently blocked with a bug. # submit finetuning job parent_job_name=$( az ml job create --file ./news-summary-pipeline.yml $workspace_info --query name -o tsv --set \ - jobs.news_summary_finetune_job.component="azureml://registries/$registry_name/components/$finetuning_pipeline_component/labels/latest" \ + jobs.summarization_pipeline.component="azureml://registries/$registry_name/components/$finetuning_pipeline_component/labels/latest" \ inputs.compute_model_import=$compute_cluster \ inputs.compute_preprocess=$compute_cluster \ inputs.compute_finetune=$compute_cluster \ diff --git a/cli/foundation-models/system/finetune/text-classification/emotion-detection-pipeline.yml b/cli/foundation-models/system/finetune/text-classification/emotion-detection-pipeline.yml index c7f88973d4..033731be98 100644 --- a/cli/foundation-models/system/finetune/text-classification/emotion-detection-pipeline.yml +++ b/cli/foundation-models/system/finetune/text-classification/emotion-detection-pipeline.yml @@ -11,7 +11,7 @@ inputs: # specify the foundation model available in the azureml system registry mlflow_model_path: - path: azureml://registries/azureml-preview/models/bert-based-uncased/versions/3 + path: azureml://registries/azureml/models/bert-based-uncased/versions/3 # huggingface_id: 'bert-base-uncased' # if you want to use a huggingface model, uncomment this line and comment the above line # map the dataset files to parameters @@ -48,10 +48,9 @@ settings: force_rerun: true jobs: - emotion_detection_finetune_job: + text_classification_pipeline: type: pipeline - # component: azureml://registries/azureml-preview/components/text_classification_pipeline/versions/0.0.3 - component: azureml://registries/azureml-preview/components/text_classification_pipeline/labels/latest + component: azureml://registries/azureml/components/text_classification_pipeline/labels/latest inputs: mlflow_model_path: ${{parent.inputs.mlflow_model_path}} diff --git a/cli/foundation-models/system/finetune/text-classification/emotion-detection.sh b/cli/foundation-models/system/finetune/text-classification/emotion-detection.sh index f09d212324..aa3e866a7c 100644 --- a/cli/foundation-models/system/finetune/text-classification/emotion-detection.sh +++ b/cli/foundation-models/system/finetune/text-classification/emotion-detection.sh @@ -18,7 +18,7 @@ gpus_per_node=2 # This is the foundation model for finetuning model_name="bert-base-uncased" # using the latest version of the model - not working yet -model_version=1 +model_version=3 version=$(date +%s) finetuned_model_name=$model_name"-emotion-detection" @@ -105,7 +105,7 @@ fi # need to switch to using latest version for model, currently blocked with a bug. # submit finetuning job parent_job_name=$( az ml job create --file ./emotion-detection-pipeline.yml $workspace_info --query name -o tsv --set \ - jobs.emotion_detection_finetune_job.component="azureml://registries/$registry_name/components/$finetuning_pipeline_component/labels/latest" \ + jobs.text_classification_pipeline.component="azureml://registries/$registry_name/components/$finetuning_pipeline_component/labels/latest" \ inputs.compute_model_import=$compute_cluster \ inputs.compute_preprocess=$compute_cluster \ inputs.compute_finetune=$compute_cluster \ diff --git a/cli/foundation-models/system/finetune/token-classification/token-classification-pipeline.yml b/cli/foundation-models/system/finetune/token-classification/token-classification-pipeline.yml index eeba47f899..8abee92ca8 100644 --- a/cli/foundation-models/system/finetune/token-classification/token-classification-pipeline.yml +++ b/cli/foundation-models/system/finetune/token-classification/token-classification-pipeline.yml @@ -11,7 +11,7 @@ inputs: # specify the foundation model available in the azureml system registry mlflow_model_path: - path: azureml://registries/azureml-preview/models/bert-based-uncased/versions/3 + path: azureml://registries/azureml/models/bert-based-uncased/versions/3 # huggingface_id: 'bert-base-uncased' # if you want to use a huggingface model, uncomment this line and comment the above line # map the dataset files to parameters @@ -48,10 +48,9 @@ settings: force_rerun: true jobs: - ner_finetune_job: + token_classification_pipeline: type: pipeline - # component: azureml://registries/azureml-preview/components/token_classification_pipeline/versions/0.0.3 - component: azureml://registries/azureml-preview/components/token_classification_pipeline/labels/latest + component: azureml://registries/azureml/components/token_classification_pipeline/labels/latest inputs: mlflow_model_path: ${{parent.inputs.mlflow_model_path}} diff --git a/cli/foundation-models/system/finetune/token-classification/token-classification.sh b/cli/foundation-models/system/finetune/token-classification/token-classification.sh index 40151b3c5b..9e9312c31c 100644 --- a/cli/foundation-models/system/finetune/token-classification/token-classification.sh +++ b/cli/foundation-models/system/finetune/token-classification/token-classification.sh @@ -18,7 +18,7 @@ gpus_per_node=2 # This is the foundation model for finetuning model_name="bert-base-uncased" # using the latest version of the model - not working yet -model_version=1 +model_version=3 version=$(date +%s) finetuned_model_name=$model_name"-ner" @@ -105,7 +105,7 @@ fi # need to switch to using latest version for model, currently blocked with a bug. # submit finetuning job parent_job_name=$( az ml job create --file ./token-classification-pipeline.yml $workspace_info --query name -o tsv --set \ - jobs.ner_finetune_job.component="azureml://registries/$registry_name/components/$finetuning_pipeline_component/labels/latest" \ + jobs.token_classification_pipeline.component="azureml://registries/$registry_name/components/$finetuning_pipeline_component/labels/latest" \ inputs.compute_model_import=$compute_cluster \ inputs.compute_preprocess=$compute_cluster \ inputs.compute_finetune=$compute_cluster \ diff --git a/cli/foundation-models/system/finetune/translation/translation-pipeline.yml b/cli/foundation-models/system/finetune/translation/translation-pipeline.yml index 6392a655a8..5f9a2a8c3c 100644 --- a/cli/foundation-models/system/finetune/translation/translation-pipeline.yml +++ b/cli/foundation-models/system/finetune/translation/translation-pipeline.yml @@ -11,7 +11,7 @@ inputs: # specify the foundation model available in the azureml system registry mlflow_model_path: - path: azureml://registries/azureml-preview/models/t5-small/versions/4 + path: azureml://registries/azureml/models/t5-small/versions/3 # huggingface_id: 't5-small' # if you want to use a huggingface model, uncomment this line and comment the above line # map the dataset files to parameters @@ -50,10 +50,9 @@ settings: force_rerun: true jobs: - translation_en_ro_finetune_job: + translation_pipeline: type: pipeline - # component: azureml://registries/azureml-preview/components/translation_pipeline/versions/0.0.3 - component: azureml://registries/azureml-preview/components/translation_pipeline/labels/latest + component: azureml://registries/azureml/components/translation_pipeline/labels/latest inputs: mlflow_model_path: ${{parent.inputs.mlflow_model_path}} diff --git a/cli/foundation-models/system/finetune/translation/translation.sh b/cli/foundation-models/system/finetune/translation/translation.sh index 494addff0d..155d45c7b8 100644 --- a/cli/foundation-models/system/finetune/translation/translation.sh +++ b/cli/foundation-models/system/finetune/translation/translation.sh @@ -19,7 +19,7 @@ gpus_per_node=2 # This is the foundation model for finetuning model_name="t5-small" # using the latest version of the model - not working yet -model_version=1 +model_version=3 version=$(date +%s) finetuned_model_name=$model_name"-wmt16-en-ro" @@ -106,7 +106,7 @@ fi # need to switch to using latest version for model, currently blocked with a bug. # submit finetuning job parent_job_name=$( az ml job create --file ./translation-pipeline.yml $workspace_info --query name -o tsv --set \ - jobs.translation_en_ro_finetune_job.component="azureml://registries/$registry_name/components/$finetuning_pipeline_component/labels/latest" \ + jobs.translation_pipeline.component="azureml://registries/$registry_name/components/$finetuning_pipeline_component/labels/latest" \ inputs.compute_model_import=$compute_cluster \ inputs.compute_preprocess=$compute_cluster \ inputs.compute_finetune=$compute_cluster \ diff --git a/sdk/python/foundation-models/system/finetune/question-answering/extractive-qa.ipynb b/sdk/python/foundation-models/system/finetune/question-answering/extractive-qa.ipynb index bda741c304..412258607f 100644 --- a/sdk/python/foundation-models/system/finetune/question-answering/extractive-qa.ipynb +++ b/sdk/python/foundation-models/system/finetune/question-answering/extractive-qa.ipynb @@ -158,7 +158,7 @@ "outputs": [], "source": [ "model_name = \"bert-base-uncased\"\n", - "model_version = \"1\"\n", + "model_version = \"3\"\n", "foundation_model = registry_ml_client.models.get(model_name, model_version)\n", "print(\n", " \"\\n\\nUsing model name: {0}, version: {1}, id: {2} for fine tuning\".format(\n", @@ -250,7 +250,7 @@ "# define the pipeline job\n", "@pipeline()\n", "def create_pipeline():\n", - " finetuning_job = pipeline_component_func(\n", + " question_answering_pipeline = pipeline_component_func(\n", " # specify the foundation model available in the azureml system registry id identified in step #3\n", " mlflow_model_path=foundation_model.id,\n", " # huggingface_id = 'bert-base-uncased', # if you want to use a huggingface model, uncomment this line and comment the above line\n", @@ -293,7 +293,7 @@ " return {\n", " # map the output of the fine tuning job to the output of the pipeline job so that we can easily register the fine tuned model\n", " # registering the model is required to deploy the model to an online or batch endpoint\n", - " \"trained_model\": finetuning_job.outputs.mlflow_model_folder\n", + " \"trained_model\": question_answering_pipeline.outputs.mlflow_model_folder\n", " }\n", "\n", "\n", diff --git a/sdk/python/foundation-models/system/finetune/summarization/news-summary.ipynb b/sdk/python/foundation-models/system/finetune/summarization/news-summary.ipynb index a4c9433fb3..39721cbad3 100644 --- a/sdk/python/foundation-models/system/finetune/summarization/news-summary.ipynb +++ b/sdk/python/foundation-models/system/finetune/summarization/news-summary.ipynb @@ -156,7 +156,7 @@ "outputs": [], "source": [ "model_name = \"t5-small\"\n", - "model_version = \"1\"\n", + "model_version = \"3\"\n", "foundation_model = registry_ml_client.models.get(model_name, model_version)\n", "print(\n", " \"\\n\\nUsing model name: {0}, version: {1}, id: {2} for fine tuning\".format(\n", @@ -248,7 +248,7 @@ "# define the pipeline job\n", "@pipeline()\n", "def create_pipeline():\n", - " finetuning_job = pipeline_component_func(\n", + " summarization_pipeline = pipeline_component_func(\n", " # specify the foundation model available in the azureml system registry id identified in step #3\n", " mlflow_model_path=foundation_model.id,\n", " # huggingface_id = 'bert-base-uncased', # if you want to use a huggingface model, uncomment this line and comment the above line\n", @@ -280,7 +280,7 @@ " return {\n", " # map the output of the fine tuning job to the output of the pipeline job so that we can easily register the fine tuned model\n", " # registering the model is required to deploy the model to an online or batch endpoint\n", - " \"trained_model\": finetuning_job.outputs.mlflow_model_folder\n", + " \"trained_model\": summarization_pipeline.outputs.mlflow_model_folder\n", " }\n", "\n", "\n", diff --git a/sdk/python/foundation-models/system/finetune/text-classification/emotion-detection.ipynb b/sdk/python/foundation-models/system/finetune/text-classification/emotion-detection.ipynb index fd99a247ea..384ded65cc 100644 --- a/sdk/python/foundation-models/system/finetune/text-classification/emotion-detection.ipynb +++ b/sdk/python/foundation-models/system/finetune/text-classification/emotion-detection.ipynb @@ -157,7 +157,7 @@ "outputs": [], "source": [ "model_name = \"bert-base-uncased\"\n", - "model_version = \"1\"\n", + "model_version = \"3\"\n", "foundation_model = registry_ml_client.models.get(model_name, model_version)\n", "print(\n", " \"\\n\\nUsing model name: {0}, version: {1}, id: {2} for fine tuning\".format(\n", @@ -280,7 +280,7 @@ "# define the pipeline job\n", "@pipeline()\n", "def create_pipeline():\n", - " finetuning_job = pipeline_component_func(\n", + " text_classification_pipeline = pipeline_component_func(\n", " # specify the foundation model available in the azureml system registry id identified in step #3\n", " mlflow_model_path=foundation_model.id,\n", " # huggingface_id = 'bert-base-uncased', # if you want to use a huggingface model, uncomment this line and comment the above line\n", @@ -298,9 +298,9 @@ " test_file_path=Input(\n", " type=\"uri_file\", path=\"./emotion-dataset/small_test.jsonl\"\n", " ),\n", - " # evaluation_config=Input(\n", - " # type=\"uri_file\", path=\"./text-classification-config.json\"\n", - " # ),\n", + " evaluation_config=Input(\n", + " type=\"uri_file\", path=\"./text-classification-config.json\"\n", + " ),\n", " # The following parameters map to the dataset fields\n", " sentence1_key=\"text\",\n", " label_key=\"label_string\",\n", @@ -312,7 +312,7 @@ " return {\n", " # map the output of the fine tuning job to the output of pipeline job so that we can easily register the fine tuned model\n", " # registering the model is required to deploy the model to an online or batch endpoint\n", - " \"trained_model\": finetuning_job.outputs.mlflow_model_folder\n", + " \"trained_model\": text_classification_pipeline.outputs.mlflow_model_folder\n", " }\n", "\n", "\n", diff --git a/sdk/python/foundation-models/system/finetune/token-classification/token-classification.ipynb b/sdk/python/foundation-models/system/finetune/token-classification/token-classification.ipynb index c7377c17da..297a703790 100644 --- a/sdk/python/foundation-models/system/finetune/token-classification/token-classification.ipynb +++ b/sdk/python/foundation-models/system/finetune/token-classification/token-classification.ipynb @@ -157,7 +157,7 @@ "outputs": [], "source": [ "model_name = \"bert-base-uncased\"\n", - "model_version = \"1\"\n", + "model_version = \"3\"\n", "foundation_model = registry_ml_client.models.get(model_name, model_version)\n", "print(\n", " \"\\n\\nUsing model name: {0}, version: {1}, id: {2} for fine tuning\".format(\n", @@ -255,7 +255,7 @@ "# define the pipeline job\n", "@pipeline()\n", "def create_pipeline():\n", - " finetuning_job = pipeline_component_func(\n", + " token_classification_pipeline = pipeline_component_func(\n", " # specify the foundation model available in the azureml system registry id identified in step #3\n", " mlflow_model_path=foundation_model.id,\n", " # huggingface_id = 'bert-base-uncased', # if you want to use a huggingface model, uncomment this line and comment the above line\n", @@ -287,7 +287,7 @@ " return {\n", " # map the output of the fine tuning job to the output of pipeline job so that we can easily register the fine tuned model\n", " # registering the model is required to deploy the model to an online or batch endpoint\n", - " \"trained_model\": finetuning_job.outputs.mlflow_model_folder\n", + " \"trained_model\": token_classification_pipeline.outputs.mlflow_model_folder\n", " }\n", "\n", "\n", diff --git a/sdk/python/foundation-models/system/finetune/translation/translation.ipynb b/sdk/python/foundation-models/system/finetune/translation/translation.ipynb index 1270692962..3b074febfd 100644 --- a/sdk/python/foundation-models/system/finetune/translation/translation.ipynb +++ b/sdk/python/foundation-models/system/finetune/translation/translation.ipynb @@ -156,7 +156,7 @@ "outputs": [], "source": [ "model_name = \"t5-small\"\n", - "model_version = \"1\"\n", + "model_version = \"3\"\n", "foundation_model = registry_ml_client.models.get(model_name, model_version)\n", "print(\n", " \"\\n\\nUsing model name: {0}, version: {1}, id: {2} for fine tuning\".format(\n", @@ -245,7 +245,7 @@ "# define the pipeline job\n", "@pipeline()\n", "def create_pipeline():\n", - " finetuning_job = pipeline_component_func(\n", + " translation_pipeline = pipeline_component_func(\n", " # specify the foundation model available in the azureml system registry id identified in step #3\n", " mlflow_model_path=foundation_model.id,\n", " # huggingface_id = 't5-small', # if you want to use a huggingface model, uncomment this line and comment the above line\n", @@ -277,7 +277,7 @@ " return {\n", " # map the output of the fine tuning job to the output of the pipeline job so that we can easily register the fine tuned model\n", " # registering the model is required to deploy the model to an online or batch endpoint\n", - " \"trained_model\": finetuning_job.outputs.mlflow_model_folder\n", + " \"trained_model\": translation_pipeline.outputs.mlflow_model_folder\n", " }\n", "\n", "\n",