Skip to content

Commit e301120

Browse files
committed
Merge branch 'register-component-ui' of https://github.com/likebupt/azure-docs-pr into amlregcomp0423
2 parents e1b4238 + 1d34c27 commit e301120

File tree

4 files changed

+32
-14
lines changed

4 files changed

+32
-14
lines changed

articles/machine-learning/how-to-create-component-pipelines-ui.md

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.subservice: core
88
ms.author: keli19
99
author: likebupt
1010
ms.reviewer: lagayhar
11-
ms.date: 05/10/2022
11+
ms.date: 03/27/2022
1212
ms.topic: how-to
1313
ms.custom: devplatv2, designer, event-tier1-build-2022, ignite-2022
1414
---
@@ -34,8 +34,6 @@ In this article, you'll learn how to create and run [machine learning pipelines]
3434
cd azureml-examples/cli/jobs/pipelines-with-components/
3535
```
3636
37-
## Register component in your workspace
38-
3937
>[!Note]
4038
> Designer supports two type of components, classic prebuilt components and custom components. These two types of components are not compatible.
4139
>
@@ -44,23 +42,34 @@ In this article, you'll learn how to create and run [machine learning pipelines]
4442
>
4543
>Custom components allow you to provide your own code as a component. It supports sharing across workspaces and seamless authoring across Studio, CLI, and SDK interfaces.
4644
>
47-
>This article applies to custom components.
45+
>This article applies to **custom components**.
46+
47+
## Register component in your workspace
4848
49-
To build pipeline using components in UI, you need to register components to your workspace first. You can use CLI or SDK to register components to your workspace, so that you can share and reuse the component within the workspace. Registered components support automatic versioning so you can update the component but assure that pipelines that require an older version will continue to work.
49+
To build pipeline using components in UI, you need to register components to your workspace first. You can use UI, CLI or SDK to register components to your workspace, so that you can share and reuse the component within the workspace. Registered components support automatic versioning so you can update the component but assure that pipelines that require an older version will continue to work.
5050
51-
In the example below take using CLI for example. If you want to learn more about how to build a component, see [Create and run pipelines using components with CLI](how-to-create-component-pipelines-cli.md).
51+
The example below will use UI to register components, and the component source files are in the [`cli/jobs/pipelines-with-components/basics/1b_e2e_registered_components` directory](https://github.com/Azure/azureml-examples/tree/main/cli/jobs/pipelines-with-components/basics/1b_e2e_registered_components) of the [`azureml-examples` repository](https://github.com/Azure/azureml-examples). You need to clone the repo to local at first.
5252
53-
1. From the `cli/jobs/pipelines-with-components/basics` directory of the [`azureml-examples` repository](https://github.com/Azure/azureml-examples), navigate to the `1b_e2e_registered_components` subdirectory.
53+
1. In you AzureML workspace, navigate to **Components** page and select **New Component**.
5454
55-
1. Register the components to Azure Machine Learning workspace using following commands. Learn more about [ML components](concept-component.md).
55+
:::image type="content" source="./media/how-to-create-component-pipelines-ui/register-component-entry-button.png" alt-text="Screenshot showing register entry button in component page." lightbox ="./media/how-to-create-component-pipelines-ui/register-component-entry-button.png":::
5656
57-
```CLI
58-
az ml component create --file train.yml
59-
az ml component create --file score.yml
60-
az ml component create --file eval.yml
61-
```
57+
1. This example will use `train.yml` [in the directory](https://github.com/Azure/azureml-examples/tree/main/cli/jobs/pipelines-with-components/basics/1b_e2e_registered_components). The YAML file defines the name, type, interface including inputs and outputs, code, environment and command of this component. The code of this component `train.py` is under `./train_src` folder which describes the execution logic of this component. You can learn more about the component schema [here](reference-yaml-component-command.md).
58+
59+
>[!Note]
60+
> When register components in UI, `code` defined in the component YAML file can only point to the current folder where YAML file locates or the subfolders, which means you cannot specify `../` for `code` as UI cannot recognize the parent directory.
61+
> `additional_includes` can only point to the current or sub folder.
62+
63+
64+
1. Select Upload from **Folder**, and select the `1b_e2e_registered_components` foler to upload. Select `train.yml` from the drop down list below.
65+
66+
:::image type="content" source="./media/how-to-create-component-pipelines-ui/upload-from-local-folder.png" alt-text="Screenshot showing upload from local folder." lightbox ="./media/how-to-create-component-pipelines-ui/upload-from-local-folder.png":::
67+
68+
1. Select **Next** in the bottom, and you can confirm the details of this component. Once you have confirmed, select **Create** to finish the registration process.
69+
70+
1. Repeat the steps above to register Score and Eval component using `score.yml` and `eval.yml` as well.
6271
63-
1. After register component successfully, you can see your component in the studio UI.
72+
1. After register the 3 components successfully, you can see your components in the studio UI.
6473
6574
:::image type="content" source="./media/how-to-create-component-pipelines-ui/component-page.png" alt-text="Screenshot showing registered component in component page." lightbox ="./media/how-to-create-component-pipelines-ui/component-page.png":::
6675
76 KB
Loading
71.3 KB
Loading

articles/machine-learning/reference-yaml-component-command.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,15 @@ If no value is specified at runtime, `learning_rate` and `learning_rate_schedule
121121
python train.py --training_data some_input_path --max_epocs 10 --learning_rate 0.01 --learning_rate_schedule time-based --model_output some_output_path
122122
```
123123

124+
## Common errors and recommendation
125+
126+
Following are some common errors and corresponding recommended suggestions when you define a component.
127+
128+
| Key | Errors | Recommendation |
129+
| --- | ---- | ----------- |
130+
|command|1. Only optional inputs can be in `$[[]]`<br>2. Using `\` to make a new line is not supported in command.<br>3. Inputs or outputs are not found.|1. Check that all the inputs or outputs used in command are already defined in the `inputs` and `outputs` sections, and use the correct format for optional inputs `$[[]]` or required ones `${{}}`.<br>2. Do not use `\` to make a new line.|
131+
|environment|1. No definition exists for environment `{envName}` version `{envVersion}`. <br>2. No environment exists for name `{envName}`, version `{envVersion}`.<br>3. Could not find asset with ID `{envAssetId}`. |1. Make sure the environment name and version you refer in the component definition exists. <br>2. You need to specify the version if you refer to a registered environment.|
132+
|inputs/outputs|1. Inputs/outputs names conflict with system reserved parameters.<br>2. Deplicated names of inputs or outputs.|1. Do not use any of these reserved parameters as your inputs/outputs name: `path`, `ld_library_path`, `user`, `logname`, `home`, `pwd`, `shell`.<br>2. Make sure names of inputs and outputs are not duplicated.|
124133

125134
## Next steps
126135

0 commit comments

Comments
 (0)