-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add input_mappings
and output_mappings
attributes
#367
Conversation
inputs_mapping
and outputs_mapping
attributes to Step
inputs_mapping
and outputs_mapping
attributes to _Step
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi here! LGTM overall, just to take into account that the DAG validation will need to use the mappings if there, so maybe a get_inputs
function needs to be implemented. Besides that I would rename outputs_mappings
to output_mappings
to be consistent with input_mappings
and to not add the plural to both words which IMO is confusing. Additionally I would also like to see what would the user workflow be for a step that has a predefined set of inputs already.
Would this be an user workflow to define the correct from ... import CustomTask
print(CustomTask.inputs)
# ["question", "options"]
print(CustomTask.outputs)
# ["answer"]
input_mappings = {"question": "Q", "options": "O"}
output_mappings = {"answer": "A"} i.e. to be able to explore the defaults before applying the mappings? Also the mappings should be disabled when there are no inputs / outputs right? Are we also handling that? |
inputs_mapping
and outputs_mapping
attributes to _Step
input_mappings
and output_mappings
attributes to _Step
input_mappings
and output_mappings
attributes to _Step
input_mappings
and output_mappings
attributes
Co-authored-by: plaguss <agus@argilla.io>
65ee568
to
f35d067
Compare
Description
This PR adds two new arguments:
input_mappings
argument to all the kind of steps allowing to map columns/keys from the data used as input for the step to the name of theinputs
required by it.output_mappings
argument for theStep
andGlobalStep
allowing to rename theoutputs
of the step: