terrakio-core 0.4.98.1b11__tar.gz → 0.4.98.1b13__tar.gz

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.

Potentially problematic release.


This version of terrakio-core might be problematic. Click here for more details.

Files changed (63) hide show
  1. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/PKG-INFO +2 -2
  2. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/pyproject.toml +2 -2
  3. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/terrakio_core/__init__.py +1 -1
  4. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/terrakio_core/endpoints/mass_stats.py +18 -21
  5. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/terrakio_core/endpoints/model_management.py +7 -7
  6. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/README.md +0 -0
  7. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/__editable__.terrakio_core-0.3.9-py3-none-any/terrakio_core/__init__.py +0 -0
  8. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/__editable__.terrakio_core-0.3.9-py3-none-any/terrakio_core/async_client.py +0 -0
  9. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/__editable__.terrakio_core-0.3.9-py3-none-any/terrakio_core/client.py +0 -0
  10. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/__editable__.terrakio_core-0.3.9-py3-none-any/terrakio_core/config.py +0 -0
  11. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/__editable__.terrakio_core-0.3.9-py3-none-any/terrakio_core/convenience_functions/convenience_functions.py +0 -0
  12. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/__editable__.terrakio_core-0.3.9-py3-none-any/terrakio_core/endpoints/auth.py +0 -0
  13. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/__editable__.terrakio_core-0.3.9-py3-none-any/terrakio_core/endpoints/dataset_management.py +0 -0
  14. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/__editable__.terrakio_core-0.3.9-py3-none-any/terrakio_core/endpoints/group_management.py +0 -0
  15. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/__editable__.terrakio_core-0.3.9-py3-none-any/terrakio_core/endpoints/mass_stats.py +0 -0
  16. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/__editable__.terrakio_core-0.3.9-py3-none-any/terrakio_core/endpoints/model_management.py +0 -0
  17. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/__editable__.terrakio_core-0.3.9-py3-none-any/terrakio_core/endpoints/space_management.py +0 -0
  18. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/__editable__.terrakio_core-0.3.9-py3-none-any/terrakio_core/endpoints/user_management.py +0 -0
  19. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/__editable__.terrakio_core-0.3.9-py3-none-any/terrakio_core/exceptions.py +0 -0
  20. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/__editable__.terrakio_core-0.3.9-py3-none-any/terrakio_core/helper/bounded_taskgroup.py +0 -0
  21. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/__editable__.terrakio_core-0.3.9-py3-none-any/terrakio_core/helper/decorators.py +0 -0
  22. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/__editable__.terrakio_core-0.3.9-py3-none-any/terrakio_core/helper/tiles.py +0 -0
  23. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/__editable__.terrakio_core-0.3.9-py3-none-any/terrakio_core/sync_client.py +0 -0
  24. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/lib/terrakio_core/__init__.py +0 -0
  25. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/lib/terrakio_core/accessors.py +0 -0
  26. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/lib/terrakio_core/async_client.py +0 -0
  27. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/lib/terrakio_core/client.py +0 -0
  28. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/lib/terrakio_core/config.py +0 -0
  29. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/lib/terrakio_core/convenience_functions/convenience_functions.py +0 -0
  30. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/lib/terrakio_core/endpoints/auth.py +0 -0
  31. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/lib/terrakio_core/endpoints/dataset_management.py +0 -0
  32. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/lib/terrakio_core/endpoints/group_management.py +0 -0
  33. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/lib/terrakio_core/endpoints/mass_stats.py +0 -0
  34. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/lib/terrakio_core/endpoints/model_management.py +0 -0
  35. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/lib/terrakio_core/endpoints/space_management.py +0 -0
  36. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/lib/terrakio_core/endpoints/user_management.py +0 -0
  37. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/lib/terrakio_core/exceptions.py +0 -0
  38. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/lib/terrakio_core/helper/bounded_taskgroup.py +0 -0
  39. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/lib/terrakio_core/helper/decorators.py +0 -0
  40. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/lib/terrakio_core/helper/tiles.py +0 -0
  41. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/build/lib/terrakio_core/sync_client.py +0 -0
  42. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/terrakio_core/accessors.py +0 -0
  43. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/terrakio_core/async_client.py +0 -0
  44. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/terrakio_core/client.py +0 -0
  45. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/terrakio_core/config.py +0 -0
  46. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/terrakio_core/convenience_functions/create_dataset_file.py +0 -0
  47. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/terrakio_core/convenience_functions/geoquries.py +0 -0
  48. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/terrakio_core/convenience_functions/zonal_stats.py +0 -0
  49. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/terrakio_core/endpoints/auth.py +0 -0
  50. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/terrakio_core/endpoints/dataset_management.py +0 -0
  51. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/terrakio_core/endpoints/group_management.py +0 -0
  52. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/terrakio_core/endpoints/space_management.py +0 -0
  53. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/terrakio_core/endpoints/user_management.py +0 -0
  54. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/terrakio_core/exceptions.py +0 -0
  55. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/terrakio_core/helper/bounded_taskgroup.py +0 -0
  56. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/terrakio_core/helper/decorators.py +0 -0
  57. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/terrakio_core/helper/tiles.py +0 -0
  58. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/terrakio_core/sync_client.py +0 -0
  59. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/terrakio_core.egg-info/PKG-INFO +0 -0
  60. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/terrakio_core.egg-info/SOURCES.txt +0 -0
  61. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/terrakio_core.egg-info/dependency_links.txt +0 -0
  62. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/terrakio_core.egg-info/requires.txt +0 -0
  63. {terrakio_core-0.4.98.1b11 → terrakio_core-0.4.98.1b13}/terrakio_core.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: terrakio-core
3
- Version: 0.4.98.1b11
3
+ Version: 0.4.98.1b13
4
4
  Summary: Core package for the terrakio-python-api
5
5
  Requires-Python: >=3.11
6
6
  Requires-Dist: aiofiles>=24.1.0
@@ -10,7 +10,7 @@ Requires-Dist: h5netcdf>=1.6.3
10
10
  Requires-Dist: h5py>=3.14.0
11
11
  Requires-Dist: nest-asyncio>=1.6.0
12
12
  Requires-Dist: netcdf4>=1.7.2
13
- Requires-Dist: onnxruntime>=1.22.1
13
+ Requires-Dist: onnxruntime>=1.23.1
14
14
  Requires-Dist: psutil>=7.0.0
15
15
  Requires-Dist: scipy>=1.16.1
16
16
  Requires-Dist: shapely>=2.1.1
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "terrakio-core"
3
- version = "0.4.98.1b11"
3
+ version = "0.4.98.1b13"
4
4
  description = "Core package for the terrakio-python-api"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -13,7 +13,6 @@ dependencies = [
13
13
  "netcdf4>=1.7.2",
14
14
  "h5py>=3.14.0",
15
15
  "netcdf4>=1.7.2",
16
- "onnxruntime>=1.22.1",
17
16
  "psutil>=7.0.0",
18
17
  "scipy>=1.16.1",
19
18
  "scipy>=1.16.1",
@@ -21,6 +20,7 @@ dependencies = [
21
20
  "xarray>=2025.7.1",
22
21
  "nest-asyncio>=1.6.0",
23
22
  "typer>=0.19.2",
23
+ "onnxruntime>=1.23.1",
24
24
  ]
25
25
 
26
26
  [project.optional-dependencies]
@@ -5,7 +5,7 @@ Terrakio Core
5
5
  Core components for Terrakio API clients.
6
6
  """
7
7
 
8
- __version__ = "0.4.98"
8
+ __version__ = "0.4.98.1"
9
9
 
10
10
  from .async_client import AsyncClient
11
11
  from .sync_client import SyncClient as Client
@@ -669,9 +669,8 @@ class MassStats:
669
669
  CollectionNotFoundError: If the collection is not found
670
670
  GetTaskError: If the API request fails due to unknown reasons
671
671
  """
672
- await self.create_collection(
673
- collection = collection
674
- )
672
+
673
+ await self.get_collection(collection = collection)
675
674
 
676
675
  upload_urls = await self._upload_requests(
677
676
  collection = collection
@@ -719,9 +718,8 @@ class MassStats:
719
718
  CollectionNotFoundError: If the collection is not found
720
719
  GetTaskError: If the API request fails due to unknown reasons
721
720
  """
722
- await self.create_collection(
723
- collection = collection
724
- )
721
+
722
+ await self.get_collection(collection = collection)
725
723
 
726
724
  with open(consumer, 'rb') as f:
727
725
  form = aiohttp.FormData()
@@ -749,7 +747,7 @@ class MassStats:
749
747
  @require_api_key
750
748
  async def training_samples(
751
749
  self,
752
- name: str,
750
+ collection: str,
753
751
  aoi: str,
754
752
  expression_x: str,
755
753
  filter_x: str = "skip",
@@ -765,7 +763,6 @@ class MassStats:
765
763
  skip_test: bool = False,
766
764
  start_year: int = None,
767
765
  end_year: int = None,
768
- bucket: str = None,
769
766
  server: str = None,
770
767
  extra_filters: list[str] = None,
771
768
  extra_filters_rate: list[float] = None,
@@ -775,7 +772,7 @@ class MassStats:
775
772
  Generate an AI dataset using specified parameters.
776
773
 
777
774
  Args:
778
- name: Name of the collection to create
775
+ collection: The collection name where we save the results
779
776
  aoi: Path to GeoJSON file containing area of interest
780
777
  expression_x: Expression for X data (features)
781
778
  filter_x: Filter expression for X data (default: "skip")
@@ -791,7 +788,6 @@ class MassStats:
791
788
  skip_test: Skip expression validation test (default: False)
792
789
  start_year: Start year for temporal filtering
793
790
  end_year: End year for temporal filtering
794
- bucket: Storage bucket name
795
791
  server: Server to use for processing
796
792
  extra_filters: Additional filter expressions
797
793
  extra_filters_rate: Rates for additional filters
@@ -846,11 +842,9 @@ class MassStats:
846
842
 
847
843
  with open(aoi, 'r') as f:
848
844
  aoi_data = json.load(f)
849
-
850
- await self.create_collection(
851
- collection = name,
852
- bucket = bucket,
853
- collection_type = "basic"
845
+
846
+ await self.get_collection(
847
+ collection = collection,
854
848
  )
855
849
 
856
850
  payload = {
@@ -866,18 +860,18 @@ class MassStats:
866
860
  "server": server
867
861
  }
868
862
 
869
- task_id_dict, status = await self._client._terrakio_request("POST", f"collections/{name}/training_samples", json=payload)
863
+ task_id_dict, status = await self._client._terrakio_request("POST", f"collections/{collection}/training_samples", json=payload)
870
864
 
871
865
  if status != 200:
872
866
  if status == 404:
873
- raise CollectionNotFoundError(f"Collection {name} not found", status_code=status)
867
+ raise CollectionNotFoundError(f"Collection {collection} not found", status_code=status)
874
868
  raise GetTaskError(f"Training sample failed with status {status}", status_code=status)
875
869
 
876
870
  task_id = task_id_dict["task_id"]
877
871
 
878
872
  await self._client.mass_stats.track_progress(task_id)
879
873
 
880
- return {"task_id": task_id, "collection": name}
874
+ return {"task_id": task_id, "collection": collection}
881
875
 
882
876
  @require_api_key
883
877
  async def download_files(
@@ -1021,7 +1015,7 @@ class MassStats:
1021
1015
  CollectionNotFoundError: If the collection is not found
1022
1016
  GetTaskError: If the API request fails due to unknown reasons
1023
1017
  """
1024
- await self.create_collection(collection=collection)
1018
+ await self.get_collection(collection = collection)
1025
1019
 
1026
1020
  upload_urls = await self._upload_requests(collection=collection)
1027
1021
  url = upload_urls['url']
@@ -1075,6 +1069,7 @@ class MassStats:
1075
1069
  @require_api_key
1076
1070
  async def create_pyramids(
1077
1071
  self,
1072
+ collection: str,
1078
1073
  name: str,
1079
1074
  levels: int,
1080
1075
  config: Dict[str, Any]
@@ -1083,6 +1078,7 @@ class MassStats:
1083
1078
  Create pyramid tiles for a dataset.
1084
1079
 
1085
1080
  Args:
1081
+ collection: Name of collection
1086
1082
  name: Dataset name
1087
1083
  levels: Maximum zoom level for pyramid (e.g., 8)
1088
1084
  config: Full pyramid configuration dictionary containing:
@@ -1104,9 +1100,10 @@ class MassStats:
1104
1100
  Raises:
1105
1101
  GetTaskError: If the API request fails
1106
1102
  """
1107
- await self.create_collection(collection = name)
1108
-
1103
+ await self.get_collection(collection = collection)
1104
+
1109
1105
  pyramid_request = {
1106
+ 'collection_name': collection,
1110
1107
  'name': name,
1111
1108
  'max_zoom': levels,
1112
1109
  **config
@@ -919,13 +919,13 @@ class ModelManagement:
919
919
  if not SKL2ONNX_AVAILABLE:
920
920
  raise ImportError("skl2onnx is not installed. Please install it with: pip install skl2onnx")
921
921
  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
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
929
929
  else:
930
930
  model_type = type(model).__name__
931
931
  raise ValueError(f"Unsupported model type: {model_type}. Supported types: PyTorch nn.Module, sklearn BaseEstimator")