orion.fit_pipeline

orion.fit_pipeline(data, pipeline=None, hyperparameters=None, save_path=None)[source]

Fit an Orion pipeline to the data.

The pipeine can be passed as:
  • An str with a path to a JSON file.

  • An str with the name of a registered Orion pipeline.

  • An MLPipeline instance.

  • A dict with an MLPipeline specification.

If no pipeline is passed, the default Orion pipeline is used.

Parameters
  • data (str or DataFrame) – Data to which the pipeline should be fitted. It can be passed as a path to a CSV file or as a DataFrame.

  • pipeline (str, Pipeline or dict) –

    Pipeline to use. It can be passed as:
    • An str with a path to a JSON file.

    • An str with the name of a registered pipeline.

    • An MLPipeline instance.

    • A dict with an MLPipeline specification.

  • hyperparameters (str or dict) – Hyperparameters to set to the pipeline. It can be passed as a hyperparameters dict in the mlblocks format or as a path to the corresponding JSON file. Defaults to None.

  • save_path (str) – Path to the file where the fitted Orion instance will be stored using pickle. If not given, the Orion instance is returned. Defaults to None.

Returns

If no save_path is provided, the fitted Orion instance is returned.

Return type

Orion