Skip to content

Use element reference key to pipe output of a flow as an input to another flow #3

@theweaklink

Description

@theweaklink

Change request type

  • New feature or Improvement?
    • New feature
    • Improvement
  • Is it OS-specific?
    • Not particularly
    • Linux
    • Windows
  • Who is it for?
    • Expert
    • Tech-Savvy
    • Developer

Details

  • Description:
    Currently you can pipe a file output from a flow as input to another flow by using its path as it is the case for the DeepLearning example:
# flow: train.py
model.save(file_output('model', 'saved_model', tags=['Keras', 'Binary', 'Model']))

# flow: predict.py
model = keras.models.load_model(Project().get_output_path('saved_model'))

This could be error-prone: if we change the path to saved_model in the 1st flow, then the 2nd flow will fail as the output/input is no longer in sync. A way to avoid this potential problem would be to use the output by its key.

  • Sample code:
# flow: train.py
model.save(file_output('model', 'saved_model', tags=['Keras', 'Binary', 'Model']))

# flow: predict.py
model = keras.models.load_model(Project().get_output('model'))

This way, even if we change saved_model in the 1st step, the predict.py will still work.

  • Desired screenshot/output:
    Project.get_output() returns the value of the output element.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions