Azure / Azure/azureml-examples
train_component_func in hyperparameter sweep example does not have model_output argument
- Dominant language
- Jupyter Notebook
- Stars
- 2k
- Forks
- 1.7k
- Avg merge
- 18h 18m
- Merged PRs (30d)
- 2
Description
### Operating System
Windows
### Version Information
This is about the tutorial
https://github.com/Azure/azureml-examples/blob/main/sdk/python/jobs/pipelines/1c_pipeline_with_hyperparameter_sweep/pipeline_with_hyperparameter_sweep.ipynb
### Steps to reproduce
Examine tutorial.
### Expected behavior
Why does the `train_component_func` in the example below not contain the model_output argument? It's very confusing since the model_output argument is an input to train.py.
```
train_component_func = load_component(source="./train.yml")
score_component_func = load_component(source="./predict.yml")
# define a pipeline
@pipeline()
def pipeline_with_hyperparameter_sweep():
"""Tune hyperparameters using sample components."""
train_model = train_component_func(
data=Input(
type="uri_file",
path="wasbs://datasets@azuremlexamples.blob.core.windows.net/iris.csv",
),
c_value=Uniform(min_value=0.5, max_value=0.9),
kernel=Choice(["rbf", "linear", "poly"]),
coef0=Uniform(min_value=0.1, max_value=1),
degree=3,
gamma="scale",
shrinking=False,
probability=False,
tol=0.001,
cache_size=1024,
verbose=False,
max_iter=-1,
decision_function_shape="ovr",
break_ties=False,
random_state=42,
)
```
I understand it's technically an optional argument, but it's really confusing what happens within train.py when this argument is missing.
It would be best to just include that argument to avoid confusion.
### Actual behavior
---
### Addition information
_No response_
Contributor guide
Research direction
Open pipeline_with_hyperparameter_sweep.ipynb and compare the train_component_func call with train.yml and train.py, focusing on the model_output argument. Update the tutorial example so its component invocation matches the documented training component, then rerun or inspect the example to confirm the pipeline remains consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, jupyter-notebook, python
- Domain
- documentation, machine-learning
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100