You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/machine-learning/how-to-create-component-pipeline-python.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -132,25 +132,25 @@ This is what a component looks like in the studio UI:
132
132
133
133
Now, you've prepared all source files for the `Prep Data` component.
134
134
135
-
### Create the train-model component
135
+
### Create the trainmodel component
136
136
137
-
In this section, you'll create a component for training the image classification model in the Python function like the `Prep Data` component.
137
+
In this section, you'll create a component for training the image classification model in a Python function, as you did with the `Prep Data` component.
138
138
139
-
The difference is that since the training logic is more complicated, you can put the original training code in a separate Python file.
139
+
Because the training logic is more complicated, you'll put the training code in a separate Python file.
140
140
141
-
The source files of this component are under `train/` folder in the [Azure Machine Learning examples repo](https://github.com/Azure/azureml-examples/tree/main/sdk/python/jobs/pipelines/2e_image_classification_keras_minist_convnet). This folder contains three files to construct the component:
141
+
The source files forthis component arein the `train` folder in the [Azure Machine Learning examples repo](https://github.com/Azure/azureml-examples/tree/main/sdk/python/jobs/pipelines/2e_image_classification_keras_minist_convnet). This folder contains three files to construct the component:
142
142
143
-
* `train.py`: contains the actual logic to train model.
144
-
* `train_component.py`: defines the interface of the component and imports the function in `train.py`.
145
-
* `conda.yaml`: defines the run-time environment of the component.
143
+
*`train.py` contains the logic to train the model.
144
+
*`train_component.py` defines the interface of the component and imports the functionthat'sin`train.py`.
145
+
*`conda.yaml` defines the runtime environment of the component.
146
146
147
-
#### Get a script containing execution logic
147
+
#### Get a script that contains execution logic
148
148
149
-
The `train.py` file contains a normal Python function, which performs the training model logic to train a Keras neural network for image classification. To view the code, see the [train.py file on GitHub](https://github.com/Azure/azureml-examples/tree/main/sdk/python/jobs/pipelines/2e_image_classification_keras_minist_convnet/train/train.py).
149
+
The `train.py` file contains a normal Python functionthat performs the logic for training a Keras neural network for image classification. To view the code, see the [train.py file on GitHub](https://github.com/Azure/azureml-examples/tree/main/sdk/python/jobs/pipelines/2e_image_classification_keras_minist_convnet/train/train.py).
150
150
151
-
#### Define component using Python function
151
+
#### Define the component by using a Python function
152
152
153
-
After defining the training function successfully, you can use `@command_component` in Azure Machine Learning SDK v2 to wrap your function as a component, which can be used in Azure Machine Learning pipelines.
153
+
After defining the training functionsuccessfully, you can use `@command_component`in Azure Machine Learning SDK v2 to wrap your functionas a component that can be used in Azure Machine Learning pipelines:
0 commit comments