Skip to content

Commit fc7aa30

Browse files
committed
batch inference GA doc update
1 parent 425fff3 commit fc7aa30

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

articles/machine-learning/how-to-use-parallel-run-step.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,17 +296,21 @@ batch_env.spark.precache_packages = False
296296
- `run_invocation_timeout`: The `run()` method invocation timeout in seconds. (optional; default value is `60`)
297297
- `run_max_try`: Max call count for `run()` method against a mini batch in case of failure. A `run()` is failed if there's any system error, an exception, or timed out (optional; default value is `3`).
298298

299+
You can also use `PipelineParameter` for parameters in `ParallelRunConfig` so that when you resubmit a pipeline run, you can pass in different values. In this example, we use PipelineParameter for `mini_batch_size` and `Process_count_per_node` and we will tune these values when resubmit run later.
300+
299301
```python
300302
from azureml.pipeline.steps import ParallelRunConfig
301303

302304
parallel_run_config = ParallelRunConfig(
303305
source_directory=scripts_folder,
304306
entry_script="digit_identification.py",
305-
mini_batch_size="5",
307+
mini_batch_size=PipelineParameter(name="batch_size_param", default_value="5"),
306308
error_threshold=10,
307309
output_action="append_row",
310+
append_row_file_name="mnist_outputs.txt",
308311
environment=batch_env,
309312
compute_target=compute_target,
313+
process_count_per_node=PipelineParameter(name="process_count_param", default_value=2),
310314
node_count=2)
311315
```
312316

@@ -327,7 +331,7 @@ from azureml.contrib.pipeline.steps import ParallelRunStep
327331
parallelrun_step = ParallelRunStep(
328332
name="batch-mnist",
329333
parallel_run_config=parallel_run_config,
330-
inputs=[named_mnist_ds],
334+
inputs=[input_mnist_ds_consumption],
331335
output=output_dir,
332336
allow_reuse=True
333337
)
@@ -364,7 +368,7 @@ RunDetails(pipeline_run).show()
364368
pipeline_run.wait_for_completion(show_output=True)
365369
```
366370

367-
## Resubmit a batch inference pipeline run with a different dataset
371+
## Resubmit a batch inference pipeline run with a different dataset and parameters
368372

369373
You can resubmit a run with a different dataset without having to create an entirely new experiment.
370374

0 commit comments

Comments
 (0)