mlflow / mlflow-export-import

Apache License 2.0
139 stars 87 forks source link

Is it possible to keep the run id? #163

Open retzero opened 10 months ago

retzero commented 10 months ago

Hello.

I'd like to keep the run id while importing runs. Is it possible? If not, can I manually change the run id from the DB(mysql)?

Thanks.

amesar commented 10 months ago

No. Run IDs are UUIDs auto-generated by the system.

daviddwlee84 commented 4 months ago

Is there any way we can align/associate the "same run" between two MLFlow Tracking Servers? Or can we have an option to keep the run id (e.g. --use-src-run-id BOOLEAN) while importing since it is not likely to conflict? (Even if conflict I think we can just show a warning and regenerate one)

daviddwlee84 commented 4 months ago

I think somehow if we can "create run" with a specific run id (src_run_dct["info"].get("run_id", None)) would work...

https://github.com/mlflow/mlflow-export-import/blob/7dc6afdc1ed10f6bddf4a34c61e9ff55b4c7d399/mlflow_export_import/run/import_run.py#L72-L73

daviddwlee84 commented 4 months ago

Maybe if we can have run_id: Optional[str] = None in create_run, then we can replace run_uuid = uuid.uuid4().hex if not run_id else run_id (and maybe add assertion to make sure input run_id is a valid UUID

https://github.com/mlflow/mlflow/blob/a6d94c8a7709e0f398aa99be0e7bb65f6a07fd28/mlflow/store/tracking/file_store.py#L618-L671