Skip to content

Commit 78cb812

Browse files
committed
edits
1 parent 99f87bb commit 78cb812

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

articles/machine-learning/how-to-create-component-pipeline-python.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -132,25 +132,25 @@ This is what a component looks like in the studio UI:
132132
133133
Now, you've prepared all source files for the `Prep Data` component.
134134

135-
### Create the train-model component
135+
### Create the train model component
136136

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.
138138
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.
140140

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 for this component are in 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:
142142

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 function that's in `train.py`.
145+
* `conda.yaml` defines the runtime environment of the component.
146146

147-
#### Get a script containing execution logic
147+
#### Get a script that contains execution logic
148148

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 function that 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).
150150

151-
#### Define component using Python function
151+
#### Define the component by using a Python function
152152

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 function successfully, you can use `@command_component` in Azure Machine Learning SDK v2 to wrap your function as a component that can be used in Azure Machine Learning pipelines:
154154

155155
:::code language="python" source="~/azureml-examples-main/sdk/python/jobs/pipelines/2e_image_classification_keras_minist_convnet/train/train_component.py":::
156156

0 commit comments

Comments
 (0)