mlsync.engine package
Submodules
mlsync.engine.diff module
- mlsync.engine.diff.diff(report_old, report_new)
Generate the diff report
MLSync reports can change the following ways: 1. Older experiments/runs were deleted: Supported 2. Newer experiments/runs were added: Supported 3. Newer experiments/runs have different metrics 4. Older experiments/runs have changed
MLSync reports can NOT change the following ways: 1. Older experiments/runs have different metrics
- Parameters
report_old – the old report
report_new – the new report
mlsync.engine.sync module
- class mlsync.engine.sync.Sync(report_format, producer, consumer, **kwargs)
Bases:
object
Main class that runs the sync process.
Instantiates producer and destination APIs. Check docs for more details.
- Parameters
report_format (str) – Path to the report format file in YAML format (see docs for more details)
producer (str) – Name of the producer API (e.g., mlflow)
consumer (str) – Name of the consumer API (e.g., notion)
- Keyword Arguments
mlflow_uri (str) – MLFlow URI during the run (Optional)
notion_token (str) – Notion token (Optional)
notion_page_id (str) – Notion page ID (Optional)
- Raises
NotImplementedError – If the producer or destination is not supported
ValueError – If required configurations are not provided (e.g., mlflow_uri, notion_token, notion_page_id)
- sync(refresh_rate)
Sync between the producer and the destination.
Creates a diff report whenever there is a difference between the producer and the destination. Then the diff report is uploaded to the destination. We do not update the producer for any changes. The sync process runs in a loop until the user stops it. Refresh rate is an argument.
- Parameters
refresh_rate (int) – Refresh rate in seconds