valohai / valohai-cli

:heavy_dollar_sign: Command line client for Valohai
MIT License
14 stars 8 forks source link

Pass pipeline parameters when vh pipeline run #308

Open SofiaChar opened 7 months ago

SofiaChar commented 7 months ago

Would be convenient to have the opportunity to pass the pipelines parameters when starting the pipeline.

For example we have this pipeline defined:

- pipeline:
    name: training
    parameters:
      - name: input-csv
        targets:
          - data-preprocessing.parameters.input-csv
      - name: embeddings-fr
        targets:
          - classification-model-training.parameters.embeddings-fr
    nodes:
      - name: fetch-dump-date
        type: execution
        step: fetch-dump-date
      - name: data-preprocessing
        type: execution
        step: data-preprocessing
      - name: classification-model-training
        type: execution
        step: classification-model-training
    edges:
      - [fetch-dump-date.metadata.formatted_dump_date, data-preprocessing.parameter.csv-dump-date]
      - [data-preprocessing.output.dataset-prod.pickle, classification-model-training.input.input-df]

When staring the pipeline pass the parameters:

vh pipeline run --adhoc training --input-csv=datum://018f3966-85d4-4e02-3fb9-bdb5e0c7bf75 --embeddings-fr=datum://018f399c-381d-eb61-730c-87e65c33994b