Skip to content

Commit 89dc119

Browse files
author
Larry O'Brien
committed
WIP
1 parent dafb695 commit 89dc119

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

articles/machine-learning/how-to-move-data-in-and-out-of-pipelines.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,12 @@ Within your pipeline's `PythonScriptStep`, you can retrieve the available output
145145

146146
```python
147147
parser = argparse.ArgumentParser()
148-
parser.add_argument('--output_path', dest='output_path', default=None)
148+
parser.add_argument('--output_path', dest='output_path', required=True)
149149
args = parser.parse_args()
150150

151-
if args.output_path != None:
152-
print(f"Got output path {args.output_path}")
153-
with open(os.path.join(args.output_path, 'temp.txt'), 'w') as f:
154-
f.write("Temporary data")
155-
f.close()
156-
```
151+
# Make directory for file
152+
os.makedirs(os.path.dirname(args.output_path), exist_ok=True)
153+
with open(args.output_path, 'w') as f:
154+
f.write("Step 1's output")
155+
```
156+

0 commit comments

Comments
 (0)