Input Class
Initialize an Input object.
- Inheritance
-
azure.ai.ml.entities._inputs_outputs.base._InputOutputBaseInput
Constructor
Input(*, type: str, path: str | None = None, mode: str | None = None, optional: bool | None = None, description: str | None = None, **kwargs: Any)
Keyword-Only Parameters
Name | Description |
---|---|
type
|
The type of the data input. Accepted values are 'uri_folder', 'uri_file', 'mltable', 'mlflow_model', 'custom_model', 'integer', 'number', 'string', and 'boolean'. Defaults to 'uri_folder'. Default value: uri_folder
|
path
|
The path to the input data. Paths can be local paths, remote data uris, or a registered AzureML asset ID. |
mode
|
The access mode of the data input. Accepted values are:
|
path_on_compute
|
The access path of the data input for compute |
default
|
The default value of the input. If a default is set, the input data will be optional. |
min
|
The minimum value for the input. If a value smaller than the minimum is passed to the job, the job execution will fail. |
max
|
The maximum value for the input. If a value larger than the maximum is passed to a job, the job execution will fail. |
optional
|
Specifies if the input is optional. |
description
|
Description of the input |
datastore
|
The datastore to upload local files to. |
intellectual_property
|
Intellectual property for the input. |
enum
Required
|
|
Examples
Creating a CommandJob with two inputs.
from azure.ai.ml import Input, Output
from azure.ai.ml.entities import CommandJob, CommandJobLimits
command_job = CommandJob(
code="./src",
command="python train.py --ss {search_space.ss}",
inputs={
"input1": Input(path="trial.csv", mode="ro_mount", description="trial input data"),
"input_2": Input(
path="azureml:list_data_v2_test:2", type="uri_folder", description="registered data asset"
),
},
outputs={"default": Output(path="./foo")},
compute="trial",
environment="AzureML-sklearn-1.0-ubuntu20.04-py38-cpu:33",
limits=CommandJobLimits(timeout=120),
)
Methods
get | |
has_key | |
items | |
keys | |
update | |
values |
get
get(key: Any, default: Any | None = None) -> Any
Parameters
Name | Description |
---|---|
key
Required
|
|
default
|
Default value: None
|
has_key
has_key(k: Any) -> bool
Parameters
Name | Description |
---|---|
k
Required
|
|
items
items() -> list
keys
keys() -> list
update
update(*args: Any, **kwargs: Any) -> None
values
values() -> list
Azure SDK for Python