-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Description:
When using the azure.ai.ml.command to create components from a JSON file, the default values for inputs are currently set at the type level and cannot be overridden at the component level. This results in all components that reference the same type having the same default value. It would be beneficial to allow overriding the default value at the component level, which would provide more flexibility when defining components.
Details:
File: create_component.py
Configs: nyc_taxi
Proposal:
Allow the default value for an input to be specified at the component level in the JSON. If a default value is provided at the component level, it should override the default value specified at the type level.
This would allow multiple components to reference the same type (like number or integer) but have different default values.
Use case:
This feature would be useful in scenarios where multiple components reference the same type, but each component needs a different default value. Currently, all these components are locked into the default value specified at the type level.
Attempts to solve the issue:
Separate Function for Default Value: A separate function set_default_value was created to handle the task of setting the default value. This function took an input key, an input value, a component, and a dictionary of references as arguments. It contained logic to fetch the default value from the references dictionary using various keys and methods.
Multiple Fetch Methods: The set_default_value function attempted to fetch the default value from the references dictionary using several different keys. First, it tried to get the default value directly from the 'input_and_output_types'. If that failed, it tried to extract the default from an input definition obtained from 'components_framework'. If the default value was still not found, it tried to get it from 'components_framework' using a different key.
Impact:
This feature would increase the flexibility of the Azure ML Command and allow more complex workflows to be defined.
Labels:
enhancement, AzureML, AML components