Skip to main content

Cross-Project Models

· 2 min read

trainML Models can now be copied between projects.

info

This functionality requires a Team plan or above.

How It Works

All trainML jobs, dataset, and models are contained within projects. If a model in one project needs to be used by jobs in another project, you can now copy the model as long as you have write access to both projects. Once copied, the models are independent. Deleting one does not delete the other.

caution

Because the model copies are independent, each copy incurs its own storage charges its project owner.

Using the Web Platform

Select the model you wish to copy from the model dashboard and click Copy. Specify a name for the new model and the destination project to copy the model to. To observe the progress of the model copy, select the destination project from the project menu on the top toolbar. The model dashboard will refresh with the newly selected project's models.

Using the SDK

To copy a model from the currently activated project in the SDK to another project, use the following code:

model_copy = await trainml.models.create(
name="Model Copy",
source_type="trainml",
source_uri=original_model_id,
source_options=dict(
project_uuid=destination_project_id,
type="model",
),
)
model_copy = await copy_model.wait_for("ready")

Replace original_model_id with the id of the model to copy and destination_project_id with the id of the project to copy the model to.