Skip to main content

Model.export

Model.export(location, connection=None, framework=None)

This method exports a model to an export location using the connection or target
connection with the optional framework.

Parameters:

   location: str
Location to export the model to.

   connection: Optional[str]
Optional connection id or name for export location. If not specified, make sure that you have set a global connection using pc.set_connection

   framework: Optional[str]
Framework to download the model as. Default is to download as a Ludwig Model. Available frameworks
are: 'ludwig', 'torchscript', and 'triton'.

Returns:

   pd.DataFrame

Examples:

Export a model by setting a global connection.

    pc.set_connection('s3-connection')
model = pc.get_model(model_id=5678)
model.export("s3://{path to connection}", framework="ludwig")

Or you can set the connection within the method itself.

    model = pc.get_model(model_id=5678)
model.export("s3://{path to connection}", connection='s3-connection', framework="ludwig")