-
Notifications
You must be signed in to change notification settings - Fork 36
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
Support for catboost inference #299
base: master
Are you sure you want to change the base?
Conversation
openeo/processes.py
Outdated
:return: The predicted value. | ||
""" | ||
return predict_catboost(data=self, model=model) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
openeo/processes.py is a generated file
openeo-python-client/openeo/processes.py
Lines 2 to 3 in 6f0a865
# Do not edit this file directly. | |
# It is automatically generated. |
so it's nor recommended to manually add processes here (they will be removed with the next update)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as long as predict_catboost
is not an official process, we can not put it here
openeo/rest/datacube.py
Outdated
a job id (``str``) or a :py:class:`RESTJob` instance of a batch job that saved a single model. | ||
:param dimension: dimension along which to apply the ``reduce_dimension`` process. | ||
|
||
.. versionadded:: 0.10.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version will be 0.10.1
openeo/rest/datacube.py
Outdated
|
||
:param model: a :py:class:`MlModel` (e.g. loaded from :py:meth:`~openeo.Connection.load_ml_model`) | ||
or a reference to such a model: a URL (``str``) to a STAC Item (implementing the `ml-model` extension) | ||
a job id (``str``) or a :py:class:`RESTJob` instance of a batch job that saved a single model. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see latest doc of predict_random_forest for a cleaner parameter description:
openeo-python-client/openeo/rest/datacube.py
Lines 1870 to 1876 in 6f0a865
:param model: a reference to a trained model, one of | |
- a :py:class:`MlModel` instance (e.g. loaded from :py:meth:`Connection.load_ml_model`) | |
- a :py:class:`RESTJob` instance of a batch job that saved a single random forest model | |
- a job id (``str``) of a batch job that saved a single random forest model | |
- a STAC item URL (``str``) to load the random forest from. | |
(The STAC Item must implement the `ml-model` extension.) |
openeo/rest/datacube.py
Outdated
if not isinstance(model, MlModel): | ||
model = MlModel.load_ml_model(connection=self.connection, id=model) | ||
from openeo.processes import predict_catboost | ||
reducer = lambda data, context: predict_catboost(data=data, model=context) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead use
from openeo.processes import process
reducer = lambda data, context: process('predict_catboost', data=data, model=model)
It's probably better to avoid model-specific predict processes like |
No description provided.