Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Future proof load_ml_model #606

Open
soxofaan opened this issue Aug 20, 2024 · 0 comments
Open

Future proof load_ml_model #606

soxofaan opened this issue Aug 20, 2024 · 0 comments

Comments

@soxofaan
Copy link
Member

@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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant