terrakio-core 0.4.98.1b15__py3-none-any.whl → 0.5.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
terrakio_core/__init__.py CHANGED
@@ -8,7 +8,7 @@ Core components for Terrakio API clients.
8
8
  # Suppress ONNX Runtime GPU device discovery warnings - MUST BE FIRST!
9
9
  import os
10
10
  os.environ['ORT_LOGGING_LEVEL'] = '3'
11
- __version__ = "0.4.98.1"
11
+ __version__ = "0.5.1"
12
12
 
13
13
  from .async_client import AsyncClient
14
14
  from .sync_client import SyncClient as Client
@@ -4,10 +4,6 @@ import textwrap
4
4
  from io import BytesIO
5
5
  from typing import Optional, Tuple
6
6
 
7
- import os
8
-
9
- os.environ['ORT_LOGGING_LEVEL'] = '3'
10
-
11
7
  import onnxruntime as ort
12
8
 
13
9
  from ..helper.decorators import require_api_key
@@ -919,13 +915,13 @@ class ModelManagement:
919
915
  if not SKL2ONNX_AVAILABLE:
920
916
  raise ImportError("skl2onnx is not installed. Please install it with: pip install skl2onnx")
921
917
  return self._convert_sklearn_to_onnx(model, input_shape), "random_forest"
922
- # elif isinstance(model, ort.InferenceSession):
923
- # if model_type is None:
924
- # raise ValueError(
925
- # "For ONNX InferenceSession models, you must specify the 'model_type' parameter. Currently 'nerual network' and 'random forest' are supported."
926
- # "Example: model_type='random forest' or model_type='neural network'"
927
- # )
928
- # return model.SerializeToString(), model_type
918
+ elif isinstance(model, ort.InferenceSession):
919
+ if model_type is None:
920
+ raise ValueError(
921
+ "For ONNX InferenceSession models, you must specify the 'model_type' parameter. Currently 'nerual network' and 'random forest' are supported."
922
+ "Example: model_type='random forest' or model_type='neural network'"
923
+ )
924
+ return model.SerializeToString(), model_type
929
925
  else:
930
926
  model_type = type(model).__name__
931
927
  raise ValueError(f"Unsupported model type: {model_type}. Supported types: PyTorch nn.Module, sklearn BaseEstimator")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: terrakio-core
3
- Version: 0.4.98.1b15
3
+ Version: 0.5.1
4
4
  Summary: Core package for the terrakio-python-api
5
5
  Requires-Python: >=3.11
6
6
  Requires-Dist: aiofiles>=24.1.0
@@ -1,4 +1,4 @@
1
- terrakio_core/__init__.py,sha256=PfUM3-juKx4e5Qz2EG45lKEDUrplFjc3e42YkXWdm6k,394
1
+ terrakio_core/__init__.py,sha256=qD9OAwIU1zNjl4tLvOoHW8ifquSiWQzLxeRiB9M-0mM,391
2
2
  terrakio_core/accessors.py,sha256=UZIi9y4RpBxouSmKuwuNYLIYqDxD8BH-GnUzwJuc1JI,47570
3
3
  terrakio_core/async_client.py,sha256=aCLjiAmhRS20efrA11hhGUbtwsxapIBp4hBAwG79K6Y,9766
4
4
  terrakio_core/client.py,sha256=VXP7BtJWIfpPPZR7_yNdSTcGwNgTwhb7KorusqkQrzk,5603
@@ -12,12 +12,12 @@ terrakio_core/endpoints/auth.py,sha256=5WvAO39aLsbJAVtxISwiOZseKr3B9I5tHjamPRehD
12
12
  terrakio_core/endpoints/dataset_management.py,sha256=jpwftiKOI59NhXXypqm6wtILIkfyjy9NfYifRIvhZS0,16791
13
13
  terrakio_core/endpoints/group_management.py,sha256=V0KOGTXwmePBFeym55G_m3ONR-jVj2IU4OVLiL5UKz4,15869
14
14
  terrakio_core/endpoints/mass_stats.py,sha256=KuUaqF9h2z__2UvrFwrVDVB3eXPGTvU8dHjy7NWll1g,42000
15
- terrakio_core/endpoints/model_management.py,sha256=_vdlG-xYrfcFfQvswS6t0t6LSn4eMmOnNm1mXvxGes0,51405
15
+ terrakio_core/endpoints/model_management.py,sha256=tvJ4BOBsyXKKH430byGH25CkLIzXWgxaPaL0CvL8_0Y,51341
16
16
  terrakio_core/endpoints/space_management.py,sha256=YWb55nkJnFJGlALJ520DvurxDqVqwYtsvqQPWzxzhDs,2266
17
17
  terrakio_core/endpoints/user_management.py,sha256=L_g4ysrh2xyz_JbObUU_tCxgHxisrDUPntWgQOs15GE,7709
18
18
  terrakio_core/helper/bounded_taskgroup.py,sha256=wiTH10jhKZgrsgrFUNG6gig8bFkUEPHkGRT2XY7Rgmo,677
19
19
  terrakio_core/helper/decorators.py,sha256=L6om7wmWNgCei3Wy5U0aZ-70OzsCwclkjIf7SfQuhCg,2289
20
20
  terrakio_core/helper/tiles.py,sha256=lcLCO6KiP05lCI9vngo3zCZJ6Z9C0pUxHSQS4H58EHc,2699
21
- terrakio_core-0.4.98.1b15.dist-info/METADATA,sha256=NUVCbhCvvChBi-sNCHuoE24dQfy97bvnVi_eyHC0TP0,1185
22
- terrakio_core-0.4.98.1b15.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
23
- terrakio_core-0.4.98.1b15.dist-info/RECORD,,
21
+ terrakio_core-0.5.1.dist-info/METADATA,sha256=BN9srGf8MFyrJs-JW57Ikpckr417r73ZtkGhypIDFGw,1179
22
+ terrakio_core-0.5.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
23
+ terrakio_core-0.5.1.dist-info/RECORD,,