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
The following table explains the fields in the example. For a full list of available fields, see the [YAML component specification reference page](reference-yaml-component-command.md).
86
53
@@ -105,55 +72,8 @@ Your Python script contains the executable logic for your component. Your script
105
72
106
73
To run, you must match the arguments for your Python script with the arguments you defined in the YAML specification. The following example is a Python training script that matches the YAML specification from the previous section.
107
74
108
-
```python
109
-
## Required imports
110
-
import argparse
111
-
import os
112
-
## Import other dependencies your script needs
113
-
from pathlib import Path
114
-
from uuid import uuid4
115
-
from datetime import datetime
116
-
117
-
## Define an argument parser that matches the arguments from the components specification file
118
-
parser = argparse.ArgumentParser("train")
119
-
parser.add_argument("--training_data", type=str, help="Path to training data")
120
-
parser.add_argument("--max_epochs", type=int, help="Max # of epochs for the training")
0 commit comments