Skip to content

Future proof load_ml_model #606

@soxofaan

Description

@soxofaan

@staticmethod
@openeo_process
def load_ml_model(connection: Connection, id: Union[str, BatchJob]) -> MlModel:
"""
Loads a machine learning model from a STAC Item.
:param connection: connection object
:param id: STAC item reference, as URL, batch job (id) or user-uploaded file
:return:
.. versionadded:: 0.10.0
"""
if isinstance(id, BatchJob):
id = id.job_id
return MlModel(graph=PGNode(process_id="load_ml_model", id=id), connection=connection)

This API, with id argument is outdated (removed by Open-EO/openeo-processes#417), and will be replaced by argument uri (by Open-EO/openeo-processes#441)

we have to make sure the python client is future proof here (possibly with some backward compatibility tricks)

related:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions