Skip to content

Commit b308b76

Browse files
committed
Issue #279 MlModel has no need for CollectionMetadata
1 parent efb4ccc commit b308b76

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

openeo/rest/datacube.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1802,7 +1802,7 @@ def fit_class_random_forest(
18021802
mtry=mtry
18031803
)
18041804
)
1805-
model = MlModel(graph=pgnode, connection=self._connection, metadata=None)
1805+
model = MlModel(graph=pgnode, connection=self._connection)
18061806
return model
18071807

18081808
def flatten_dimensions(self, dimensions: List[str], target_dimension: str, label_separator: Optional[str] = None):

openeo/rest/mlmodel.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import typing
55

66
from openeo.internal.graph_building import PGNode
7-
from openeo.metadata import CollectionMetadata
87
from openeo.rest.job import RESTJob
98
from openeo.util import legacy_alias
109

@@ -18,11 +17,10 @@ class MlModel:
1817
"""
1918
A machine learning model accompanied with STAC metadata, including the ml-model extension.
2019
"""
21-
def __init__(self, graph: PGNode, connection: 'Connection', metadata: CollectionMetadata = None):
20+
def __init__(self, graph: PGNode, connection: 'Connection'):
2221
super().__init__()
2322
self._pg = graph
2423
self._connection = connection
25-
self.metadata = metadata
2624

2725
def __str__(self):
2826
return "MlModel({pg})".format(pg=self._pg)
@@ -62,7 +60,7 @@ def save_ml_model(self, format: str = "default", options: dict = None):
6260
"options": options or {}
6361
}
6462
)
65-
return MlModel(graph=pgnode, connection=self._connection, metadata=None or self.metadata)
63+
return MlModel(graph=pgnode, connection=self._connection)
6664

6765
def execute_batch(
6866
self,

0 commit comments

Comments
 (0)