Run
The Run
object is created via the run()
method, similar to the Task
. Run parameters are passed alongside task parameters.
Parameters
Name | Type | Description |
---|---|---|
local_execution | bool | Execute the run locally instead of remotely. |
inputs | dict | Mapping of function argument names to entity keys. |
parameters | dict | Extra parameters passed to the function. |
init_parameters | dict | Parameters supplied to the init function. |
Methods
Once the run is created, you can access its attributes and methods through the run
object.
output
Get run's output by name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
output_name
|
str
|
Key of the result. |
required |
as_key
|
bool
|
If True, return result as key. |
False
|
as_dict
|
bool
|
If True, return result as dictionary. |
False
|
Returns:
Type | Description |
---|---|
Entity | dict | str | None
|
Result. |
outputs
Get run's outputs.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
as_key
|
bool
|
If True, return results as keys. |
False
|
as_dict
|
bool
|
If True, return results as dictionaries. |
False
|
Returns:
Type | Description |
---|---|
dict
|
List of output objects. |
result
Get result by name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
result_name
|
str
|
Name of the result. |
required |
Returns:
Type | Description |
---|---|
Any
|
The result. |
results
Get results.
Returns:
Type | Description |
---|---|
dict
|
The results. |
invoke
Invoke run.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
method
|
str
|
Method of the request. |
'POST'
|
url
|
str
|
URL of the request. |
None
|
**kwargs
|
dict
|
Keyword arguments to pass to the request. |
{}
|
Returns:
Type | Description |
---|---|
Response
|
Response from service. |
wait
Wait for run to finish.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
log_info
|
bool
|
If True, log information. |
True
|
Returns:
Type | Description |
---|---|
Run
|
Run object. |
inputs
Get inputs passed in spec as objects or as dictionaries.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
as_dict
|
bool
|
If True, return inputs as dictionaries. |
False
|
Returns:
Type | Description |
---|---|
dict
|
Inputs. |