rslearn 0.0.26__py3-none-any.whl → 0.0.28__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.
Files changed (56) hide show
  1. rslearn/data_sources/__init__.py +2 -0
  2. rslearn/data_sources/aws_landsat.py +44 -161
  3. rslearn/data_sources/aws_open_data.py +2 -4
  4. rslearn/data_sources/aws_sentinel1.py +1 -3
  5. rslearn/data_sources/aws_sentinel2_element84.py +54 -165
  6. rslearn/data_sources/climate_data_store.py +1 -3
  7. rslearn/data_sources/copernicus.py +1 -2
  8. rslearn/data_sources/data_source.py +1 -1
  9. rslearn/data_sources/direct_materialize_data_source.py +336 -0
  10. rslearn/data_sources/earthdaily.py +52 -155
  11. rslearn/data_sources/earthdatahub.py +425 -0
  12. rslearn/data_sources/eurocrops.py +1 -2
  13. rslearn/data_sources/gcp_public_data.py +1 -2
  14. rslearn/data_sources/google_earth_engine.py +1 -2
  15. rslearn/data_sources/hf_srtm.py +595 -0
  16. rslearn/data_sources/local_files.py +1 -1
  17. rslearn/data_sources/openstreetmap.py +1 -1
  18. rslearn/data_sources/planet.py +1 -2
  19. rslearn/data_sources/planet_basemap.py +1 -2
  20. rslearn/data_sources/planetary_computer.py +183 -186
  21. rslearn/data_sources/soilgrids.py +3 -3
  22. rslearn/data_sources/stac.py +1 -2
  23. rslearn/data_sources/usda_cdl.py +1 -3
  24. rslearn/data_sources/usgs_landsat.py +7 -254
  25. rslearn/data_sources/worldcereal.py +1 -1
  26. rslearn/data_sources/worldcover.py +1 -1
  27. rslearn/data_sources/worldpop.py +1 -1
  28. rslearn/data_sources/xyz_tiles.py +5 -9
  29. rslearn/dataset/storage/file.py +16 -12
  30. rslearn/models/concatenate_features.py +6 -1
  31. rslearn/tile_stores/default.py +4 -2
  32. rslearn/train/{all_patches_dataset.py → all_crops_dataset.py} +120 -117
  33. rslearn/train/data_module.py +36 -33
  34. rslearn/train/dataset.py +159 -68
  35. rslearn/train/lightning_module.py +60 -4
  36. rslearn/train/metrics.py +162 -0
  37. rslearn/train/model_context.py +3 -3
  38. rslearn/train/prediction_writer.py +69 -41
  39. rslearn/train/tasks/classification.py +14 -1
  40. rslearn/train/tasks/detection.py +5 -5
  41. rslearn/train/tasks/per_pixel_regression.py +19 -6
  42. rslearn/train/tasks/regression.py +19 -3
  43. rslearn/train/tasks/segmentation.py +17 -0
  44. rslearn/utils/__init__.py +2 -0
  45. rslearn/utils/fsspec.py +51 -1
  46. rslearn/utils/geometry.py +21 -0
  47. rslearn/utils/m2m_api.py +251 -0
  48. rslearn/utils/retry_session.py +43 -0
  49. {rslearn-0.0.26.dist-info → rslearn-0.0.28.dist-info}/METADATA +6 -3
  50. {rslearn-0.0.26.dist-info → rslearn-0.0.28.dist-info}/RECORD +55 -50
  51. rslearn/data_sources/earthdata_srtm.py +0 -282
  52. {rslearn-0.0.26.dist-info → rslearn-0.0.28.dist-info}/WHEEL +0 -0
  53. {rslearn-0.0.26.dist-info → rslearn-0.0.28.dist-info}/entry_points.txt +0 -0
  54. {rslearn-0.0.26.dist-info → rslearn-0.0.28.dist-info}/licenses/LICENSE +0 -0
  55. {rslearn-0.0.26.dist-info → rslearn-0.0.28.dist-info}/licenses/NOTICE +0 -0
  56. {rslearn-0.0.26.dist-info → rslearn-0.0.28.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,251 @@
1
+ """API client for the USGS M2M API."""
2
+
3
+ import json
4
+ import os
5
+ import time
6
+ import uuid
7
+ from datetime import datetime, timedelta
8
+ from typing import Any
9
+
10
+ import requests
11
+
12
+ from rslearn.log_utils import get_logger
13
+
14
+ logger = get_logger(__name__)
15
+
16
+
17
+ class APIException(Exception):
18
+ """Exception raised for M2M API errors."""
19
+
20
+ pass
21
+
22
+
23
+ class M2MAPIClient:
24
+ """An API client for interacting with the USGS M2M API."""
25
+
26
+ api_url = "https://m2m.cr.usgs.gov/api/api/json/stable/"
27
+ pagination_size = 1000
28
+
29
+ def __init__(
30
+ self,
31
+ username: str | None = None,
32
+ token: str | None = None,
33
+ timeout: timedelta = timedelta(seconds=120),
34
+ session: requests.Session | None = None,
35
+ ) -> None:
36
+ """Initialize a new M2MAPIClient.
37
+
38
+ Args:
39
+ username: the EROS username. If None, uses M2M_USERNAME environment variable.
40
+ token: the application token. If None, uses M2M_TOKEN environment variable.
41
+ timeout: timeout for requests.
42
+ session: optional requests session to use. If None, a default session is
43
+ created.
44
+ """
45
+ if username is None:
46
+ username = os.environ.get("M2M_USERNAME")
47
+ if username is None:
48
+ raise ValueError(
49
+ "username must be provided or M2M_USERNAME environment variable must be set"
50
+ )
51
+ if token is None:
52
+ token = os.environ.get("M2M_TOKEN")
53
+ if token is None:
54
+ raise ValueError(
55
+ "token must be provided or M2M_TOKEN environment variable must be set"
56
+ )
57
+
58
+ self.username = username
59
+ self.timeout = timeout
60
+ self.session = session if session is not None else requests.Session()
61
+
62
+ json_data = json.dumps({"username": username, "token": token})
63
+ response = self.session.post(
64
+ self.api_url + "login-token",
65
+ data=json_data,
66
+ timeout=self.timeout.total_seconds(),
67
+ )
68
+
69
+ response.raise_for_status()
70
+ self.auth_token = response.json()["data"]
71
+
72
+ def request(
73
+ self, endpoint: str, data: dict[str, Any] | None = None
74
+ ) -> dict[str, Any] | None:
75
+ """Make a request to the API.
76
+
77
+ Args:
78
+ endpoint: the endpoint to call
79
+ data: POST data to pass
80
+
81
+ Returns:
82
+ JSON response data if any
83
+ """
84
+ response = self.session.post(
85
+ self.api_url + endpoint,
86
+ headers={"X-Auth-Token": self.auth_token},
87
+ data=json.dumps(data),
88
+ timeout=self.timeout.total_seconds(),
89
+ )
90
+ response.raise_for_status()
91
+ if response.text:
92
+ response_dict = response.json()
93
+
94
+ if response_dict["errorMessage"]:
95
+ raise APIException(response_dict["errorMessage"])
96
+ return response_dict
97
+ return None
98
+
99
+ def get_filters(self, dataset_name: str) -> list[dict[str, Any]]:
100
+ """Returns filters available for the given dataset.
101
+
102
+ Args:
103
+ dataset_name: the dataset name e.g. landsat_ot_c2_l1
104
+
105
+ Returns:
106
+ list of filter objects
107
+ """
108
+ response_dict = self.request("dataset-filters", {"datasetName": dataset_name})
109
+ if response_dict is None:
110
+ raise APIException("No response from API")
111
+ return response_dict["data"]
112
+
113
+ def scene_search(
114
+ self,
115
+ dataset_name: str,
116
+ acquisition_time_range: tuple[datetime, datetime] | None = None,
117
+ cloud_cover_range: tuple[int, int] | None = None,
118
+ bbox: tuple[float, float, float, float] | None = None,
119
+ metadata_filter: dict[str, Any] | None = None,
120
+ ) -> list[dict[str, Any]]:
121
+ """Search for scenes matching the arguments.
122
+
123
+ Args:
124
+ dataset_name: the dataset name e.g. landsat_ot_c2_l1
125
+ acquisition_time_range: optional filter on the acquisition time
126
+ cloud_cover_range: optional filter on the cloud cover
127
+ bbox: optional spatial filter
128
+ metadata_filter: optional metadata filter dict
129
+ """
130
+ base_data: dict[str, Any] = {"datasetName": dataset_name, "sceneFilter": {}}
131
+ if acquisition_time_range:
132
+ base_data["sceneFilter"]["acquisitionFilter"] = {
133
+ "start": acquisition_time_range[0].isoformat(),
134
+ "end": acquisition_time_range[1].isoformat(),
135
+ }
136
+ if cloud_cover_range:
137
+ base_data["sceneFilter"]["cloudCoverFilter"] = {
138
+ "min": cloud_cover_range[0],
139
+ "max": cloud_cover_range[1],
140
+ "includeUnknown": False,
141
+ }
142
+ if bbox:
143
+ base_data["sceneFilter"]["spatialFilter"] = {
144
+ "filterType": "mbr",
145
+ "lowerLeft": {"longitude": bbox[0], "latitude": bbox[1]},
146
+ "upperRight": {"longitude": bbox[2], "latitude": bbox[3]},
147
+ }
148
+ if metadata_filter:
149
+ base_data["sceneFilter"]["metadataFilter"] = metadata_filter
150
+
151
+ starting_number = 1
152
+ results = []
153
+ while True:
154
+ cur_data = base_data.copy()
155
+ cur_data["startingNumber"] = starting_number
156
+ cur_data["maxResults"] = self.pagination_size
157
+ response_dict = self.request("scene-search", cur_data)
158
+ if response_dict is None:
159
+ raise APIException("No response from API")
160
+ data = response_dict["data"]
161
+ results.extend(data["results"])
162
+ if data["recordsReturned"] < self.pagination_size:
163
+ break
164
+ starting_number += self.pagination_size
165
+
166
+ return results
167
+
168
+ def get_scene_metadata(self, dataset_name: str, entity_id: str) -> dict[str, Any]:
169
+ """Get detailed metadata for a scene.
170
+
171
+ Args:
172
+ dataset_name: the dataset name in which to search
173
+ entity_id: the entity ID of the scene
174
+
175
+ Returns:
176
+ full scene metadata
177
+ """
178
+ response_dict = self.request(
179
+ "scene-metadata",
180
+ {
181
+ "datasetName": dataset_name,
182
+ "entityId": entity_id,
183
+ "metadataType": "full",
184
+ },
185
+ )
186
+ if response_dict is None:
187
+ raise APIException("No response from API")
188
+ return response_dict["data"]
189
+
190
+ def get_downloadable_products(
191
+ self, dataset_name: str, entity_id: str
192
+ ) -> list[dict[str, Any]]:
193
+ """Get the downloadable products for a given scene.
194
+
195
+ Args:
196
+ dataset_name: the dataset name
197
+ entity_id: the entity ID of the scene
198
+
199
+ Returns:
200
+ list of downloadable products
201
+ """
202
+ data = {"datasetName": dataset_name, "entityIds": [entity_id]}
203
+ response_dict = self.request("download-options", data)
204
+ if response_dict is None:
205
+ raise APIException("No response from API")
206
+ return response_dict["data"]
207
+
208
+ def get_download_url(self, entity_id: str, product_id: str) -> str:
209
+ """Get the download URL for a given product.
210
+
211
+ Args:
212
+ entity_id: the entity ID of the product
213
+ product_id: the product ID of the product
214
+
215
+ Returns:
216
+ the download URL
217
+ """
218
+ label = str(uuid.uuid4())
219
+ data = {
220
+ "downloads": [
221
+ {"label": label, "entityId": entity_id, "productId": product_id}
222
+ ]
223
+ }
224
+ response_dict = self.request("download-request", data)
225
+ if response_dict is None:
226
+ raise APIException("No response from API")
227
+ response = response_dict["data"]
228
+
229
+ # Check if URL is immediately available in the response
230
+ if response.get("availableDownloads"):
231
+ return response["availableDownloads"][0]["url"]
232
+
233
+ # Otherwise poll download-retrieve until the URL is ready
234
+ while True:
235
+ # We sleep first because we have observed that if we immediately call
236
+ # download-retrieve it sometimes has a response that includes neither
237
+ # available nor requested list.
238
+ time.sleep(10)
239
+ response_dict = self.request("download-retrieve", {"label": label})
240
+ if response_dict is None:
241
+ raise APIException("No response from API")
242
+ response = response_dict["data"]
243
+ if len(response["available"]) > 0:
244
+ return response["available"][0]["url"]
245
+ if len(response["requested"]) == 0:
246
+ logger.debug(
247
+ f"Response to download-retrieve did not include our requested download under label {label}: {response}"
248
+ )
249
+ raise APIException("Did not get download URL")
250
+ if response["requested"][0].get("url"):
251
+ return response["requested"][0]["url"]
@@ -0,0 +1,43 @@
1
+ """Utility for creating requests sessions with retry logic."""
2
+
3
+ from datetime import timedelta
4
+ from http import HTTPStatus
5
+
6
+ import requests
7
+ from requests.adapters import HTTPAdapter
8
+ from urllib3.util.retry import Retry
9
+
10
+
11
+ def create_retry_session(
12
+ total_retries: int = 5,
13
+ backoff_factor: float = 1.0,
14
+ backoff_max: timedelta = timedelta(seconds=60),
15
+ ) -> requests.Session:
16
+ """Create a requests session with retry logic.
17
+
18
+ Args:
19
+ total_retries: maximum number of retries
20
+ backoff_factor: factor for exponential backoff
21
+ backoff_max: maximum backoff time
22
+
23
+ Returns:
24
+ configured requests session
25
+ """
26
+ session = requests.Session()
27
+ retry = Retry(
28
+ total=total_retries,
29
+ backoff_factor=backoff_factor,
30
+ backoff_max=backoff_max.total_seconds(),
31
+ allowed_methods=["GET", "POST"],
32
+ status_forcelist=[
33
+ HTTPStatus.TOO_MANY_REQUESTS,
34
+ HTTPStatus.INTERNAL_SERVER_ERROR,
35
+ HTTPStatus.BAD_GATEWAY,
36
+ HTTPStatus.SERVICE_UNAVAILABLE,
37
+ HTTPStatus.GATEWAY_TIMEOUT,
38
+ ],
39
+ raise_on_status=False,
40
+ )
41
+ session.mount("http://", HTTPAdapter(max_retries=retry))
42
+ session.mount("https://", HTTPAdapter(max_retries=retry))
43
+ return session
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rslearn
3
- Version: 0.0.26
3
+ Version: 0.0.28
4
4
  Summary: A library for developing remote sensing datasets and models
5
5
  Author: OlmoEarth Team
6
6
  License: Apache License
@@ -248,6 +248,9 @@ Requires-Dist: pycocotools>=2.0; extra == "extra"
248
248
  Requires-Dist: pystac_client>=0.9; extra == "extra"
249
249
  Requires-Dist: rtree>=1.4; extra == "extra"
250
250
  Requires-Dist: termcolor>=3.0; extra == "extra"
251
+ Requires-Dist: xarray>=2024.1; extra == "extra"
252
+ Requires-Dist: zarr>=3.1.2; extra == "extra"
253
+ Requires-Dist: numcodecs>=0.16; extra == "extra"
251
254
  Requires-Dist: satlaspretrain_models>=0.3; extra == "extra"
252
255
  Requires-Dist: scipy>=1.16; extra == "extra"
253
256
  Requires-Dist: terratorch>=1.0.2; extra == "extra"
@@ -587,7 +590,7 @@ data:
587
590
  groups: ["default"]
588
591
  predict_config:
589
592
  groups: ["predict"]
590
- load_all_patches: true
593
+ load_all_crops: true
591
594
  skip_targets: true
592
595
  patch_size: 512
593
596
  trainer:
@@ -750,7 +753,7 @@ test_config:
750
753
  split: val
751
754
  predict_config:
752
755
  groups: ["predict"]
753
- load_all_patches: true
756
+ load_all_crops: true
754
757
  skip_targets: true
755
758
  patch_size: 512
756
759
  ```
@@ -8,34 +8,36 @@ rslearn/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  rslearn/template_params.py,sha256=Vop0Ha-S44ctCa9lvSZRjrMETznJZlR5y_gJrVIwrPg,791
9
9
  rslearn/config/__init__.py,sha256=n1qpZ0ImshTtLYl5mC73BORYyUcjPJyHiyZkqUY1hiY,474
10
10
  rslearn/config/dataset.py,sha256=abxIUFDAYmCd4pzGnkPnW_pYyws1yhXFWJ5HnVU4WHo,23942
11
- rslearn/data_sources/__init__.py,sha256=zzuZUxrlEIw84YpD2I0HJvCoLDB29LbmnKTXiJykzGU,660
12
- rslearn/data_sources/aws_landsat.py,sha256=0ZQtmd2NCnvLy4vFSB1AlmoguJbiQB_e_T4eS1tnW9Q,20443
13
- rslearn/data_sources/aws_open_data.py,sha256=rDE9VZXXA669fD9jfOizxpN41lmvvJc-skZz3LettJU,29197
14
- rslearn/data_sources/aws_sentinel1.py,sha256=knBg2ZdwzGRIibUPAqnhYR-DbHqFL4tLsuRVrucTWU4,4745
15
- rslearn/data_sources/aws_sentinel2_element84.py,sha256=VkIAjCqzqi_m6StSQ-aY_AMtesFhkYYgwiUNkpBe7AA,13984
16
- rslearn/data_sources/climate_data_store.py,sha256=gwlbugwAT0YoOINOKNVlZuzpxUO5G0tfzwy4XVlURFg,18360
17
- rslearn/data_sources/copernicus.py,sha256=DLyXwnkFo2LzbxfLKHkOvHyZcNYFg5w-yXQPeBL67_w,35049
18
- rslearn/data_sources/data_source.py,sha256=lxdcxefETX5ui5uUdZn-ACSBhy6YVo4XDfk368EMD40,4862
19
- rslearn/data_sources/earthdaily.py,sha256=BNP7BK_vb9yQw6LaIaJ80vjCfBZ9TeALGkjHYIet_W0,18205
20
- rslearn/data_sources/earthdata_srtm.py,sha256=bwo8e_y9fFPliZ411tTWOiAUlEcb3AWBkeZxnkFY5SI,10633
21
- rslearn/data_sources/eurocrops.py,sha256=FQqdBcNl43fArq6rd_-iffVJyliIDbB0lIHvNdmtQBU,8663
22
- rslearn/data_sources/gcp_public_data.py,sha256=qXWFQ4y0cCVBla68H4bpolG0FKW9_vLyTlA-0mJc1Y0,37349
23
- rslearn/data_sources/google_earth_engine.py,sha256=xdoSDjSVp6lPVPMv4UJZ6BRUozUA2hFbSTl1707TBoM,23523
24
- rslearn/data_sources/local_files.py,sha256=xg3IqMVXi6s_Kpnp91QGF7hSiTw4y-vgoe2bQNglWcs,19064
25
- rslearn/data_sources/openstreetmap.py,sha256=TzZfouc2Z4_xjx2v_uv7aPn4tVW3flRVQN4qBfl507E,18161
26
- rslearn/data_sources/planet.py,sha256=6FWQ0bl1k3jwvwp4EVGi2qs3OD1QhnKOKP36mN4HELI,9446
27
- rslearn/data_sources/planet_basemap.py,sha256=e9R6FlagJjg8Z6Rc1dC6zK3xMkCohz8eohXqXmd29xg,9670
28
- rslearn/data_sources/planetary_computer.py,sha256=k6CO5Yim2I-frlD8r2_uBo0CQFw89mN3_5mrv0Xk2WU,26449
29
- rslearn/data_sources/soilgrids.py,sha256=rwO4goFPQ7lx420FvYBHYFXdihnZqn_-IjdqtxQ9j2g,12455
30
- rslearn/data_sources/stac.py,sha256=Xty1JDueAAonNVLRo8vfNBhlHrVLjhmZ-uRBYbrGvtA,10753
31
- rslearn/data_sources/usda_cdl.py,sha256=_WvxZkm0fbXfniRs6NT8iVCbTTmVPflDhsFT2ci6_Dk,6879
32
- rslearn/data_sources/usgs_landsat.py,sha256=kPOb3hsZe5-guUcFZZkwzcRpYZ3Zo7Bk4E829q_xiyU,18516
11
+ rslearn/data_sources/__init__.py,sha256=FZQckYwsnnLokMeYmi0ktUyQd9bAHyLN1_-Xc3qYLag,767
12
+ rslearn/data_sources/aws_landsat.py,sha256=bJmwBbUV4vjKBNp1MHt4sHhnIjhMis_jOI3FpksQc6w,16435
13
+ rslearn/data_sources/aws_open_data.py,sha256=fum34DqqDiuiiYBfZtGFrNNOLylE9o3o7Cyb2e0Eo0g,29101
14
+ rslearn/data_sources/aws_sentinel1.py,sha256=LfJLDhsd_6h_JinD8PbiiAyxajkIdvAc--5BJryUKlo,4674
15
+ rslearn/data_sources/aws_sentinel2_element84.py,sha256=qeCuiSlvhWChSY3AwYsKT6nZUsjNNWoOBPEUxkV8kJI,10112
16
+ rslearn/data_sources/climate_data_store.py,sha256=mqLJfYubD6m9VwxpLunoIv_MNFN6Ue1hBBVj552e8uQ,18289
17
+ rslearn/data_sources/copernicus.py,sha256=ushAgYGxU2MzPcUNnEvEfPgO0RCC9Rbjzi189xq0jgc,35001
18
+ rslearn/data_sources/data_source.py,sha256=xojlCoAnGTCHKbEx98JkW0oYzAKBbgGMNc0kicEjHWk,4863
19
+ rslearn/data_sources/direct_materialize_data_source.py,sha256=PBmxsLBNakJeX1s92pc4FCuHANfhkYHS2vt60RGdkj0,11276
20
+ rslearn/data_sources/earthdaily.py,sha256=qUtHUG1oV5IlCWXVovUcYxQhqdNDKWaEe-BKnooWX88,14623
21
+ rslearn/data_sources/earthdatahub.py,sha256=KRf1VnxPI9jsT0utEkeYvsCwu7LXo9t-RvMi8gXehag,15889
22
+ rslearn/data_sources/eurocrops.py,sha256=dJ4d0xvt-rID_HuAchyucFJBuAQL-Kk1h_qm6GOH-mE,8641
23
+ rslearn/data_sources/gcp_public_data.py,sha256=9M_tqGUG9740TC3ZRJ8-sekWkKFRp7_XdYHQEAloJpw,37301
24
+ rslearn/data_sources/google_earth_engine.py,sha256=7fytWecT7oWCx9u4nXidb4ycdOoX2hV3qCeVvOPleC8,23475
25
+ rslearn/data_sources/hf_srtm.py,sha256=tIKPdPt2vpRscsAmbsKbn_UlEIgJYua6lXRU2wwyXq4,21250
26
+ rslearn/data_sources/local_files.py,sha256=1m2fz5d5ZLDtx-qMxqVNGzVeGSL8RVYmrNe4NiQS5_Y,19065
27
+ rslearn/data_sources/openstreetmap.py,sha256=KZe52ZYwzetjsyCaWN43-WUcH1Xd8j6AocaOPidG6Yo,18162
28
+ rslearn/data_sources/planet.py,sha256=K4Lpm9UyUJjIiSISe3jDlV_o0UipLRJ2Snw7rmJfz2g,9398
29
+ rslearn/data_sources/planet_basemap.py,sha256=oColM4udr23e8c9dK-gc08a2q4Iil23tun3P9zjPOqc,9622
30
+ rslearn/data_sources/planetary_computer.py,sha256=hiYdYgU5gP2mJuDvF4tS4Sk4vWOndUcwfFUpQ7x-lZY,27231
31
+ rslearn/data_sources/soilgrids.py,sha256=qbnnCIOa6tlN8wxmNCzAj60-pghKEbRxa7lVIgM95Dk,12484
32
+ rslearn/data_sources/stac.py,sha256=Gj8TZ5pifVzWPCuzgphrle2ekQ02OET54rj-02sR2nw,10705
33
+ rslearn/data_sources/usda_cdl.py,sha256=3GhcgTB50T7GA44nB9WwItqDJliELquw_YbiAVxh6kc,6808
34
+ rslearn/data_sources/usgs_landsat.py,sha256=IsQOhWY8nwmgixJu1uMSR4CqsC3igcP3TArdBXkETd8,10178
33
35
  rslearn/data_sources/utils.py,sha256=NOC0qOyYVS6f8EUrSeP4mH0XZbSrtTLV-gKGbCC6ccg,16586
34
36
  rslearn/data_sources/vector_source.py,sha256=NCa7CxIrGKe9yRT0NyyFKFQboDGDZ1h7663PV9OfMOM,44
35
- rslearn/data_sources/worldcereal.py,sha256=rGGxwJAC3pAASVBQoUhwS3qL-qcmF6W__Tb53qWCEmE,21501
36
- rslearn/data_sources/worldcover.py,sha256=n7gi-JRytxkvkUhKT--dVziMcWSSyMbZA7ZCzLT2MJY,6037
37
- rslearn/data_sources/worldpop.py,sha256=S3RSc5kTwSs2bcREjNarBsqf3MBX5CN0eHj7Qkx4K74,5625
38
- rslearn/data_sources/xyz_tiles.py,sha256=P601CvUmoVDC_ZRVhPKaIoPYYCq5UhZ-v7DaGlN5y_0,13797
37
+ rslearn/data_sources/worldcereal.py,sha256=OWZA0pvQQiKvuA5AVAc0lw8JStMEeF4DYOh0n2vdg6I,21521
38
+ rslearn/data_sources/worldcover.py,sha256=ahyrGoXMAGWsIUDHSrqPywiK7ycwUD3E3BruNMxpo90,6057
39
+ rslearn/data_sources/worldpop.py,sha256=lUI7syzNs4FiGVLz2KIiFo63MafFSyWg__YdrSOXtWA,5645
40
+ rslearn/data_sources/xyz_tiles.py,sha256=RKn3q19FbgOR8a-qQ4ijnNPjmYPaVimIaSL7lsWlYqM,13729
39
41
  rslearn/dataset/__init__.py,sha256=bHtBlEEBCekO-gaJqiww0-VjvZTE5ahx0llleo8bfP8,289
40
42
  rslearn/dataset/add_windows.py,sha256=NwIvku6zxCJ9kgVFa5phJc0Gj1Y1bCzh6TLb9nEGl0s,8462
41
43
  rslearn/dataset/dataset.py,sha256=YyGFy_VGUaOPfrEQqBl0Fp5JAsH3KNCqo6ZTu3TW4yY,3223
@@ -45,14 +47,14 @@ rslearn/dataset/materialize.py,sha256=VoL5Qf5pGcQV4QMlO5vrcu7w0Sl1NdIRLUVk0kSCMO
45
47
  rslearn/dataset/remap.py,sha256=6MaImsY02GNACpvRM81RvWmjZWRfAHxo_R3Ox6XLF6A,2723
46
48
  rslearn/dataset/window.py,sha256=X4q8YzcSOTtwKxCPf71QLMoyKUtYMSnZu0kPnmVSUx4,10644
47
49
  rslearn/dataset/storage/__init__.py,sha256=R50AVV5LH2g7ol0-jyvGcB390VsclXGbJXz4fmkn9as,52
48
- rslearn/dataset/storage/file.py,sha256=g9HZ3CD4QcgyVNsBaXhjIKQgDOAeZ4R08sJ7ntx4wo8,6815
50
+ rslearn/dataset/storage/file.py,sha256=GJJgH_eHknLbMQwoC3mOoXJKl6Ha3oNXzz62FIEMWlg,7130
49
51
  rslearn/dataset/storage/storage.py,sha256=DxZ7iwV938PiLwdQzb5EXSb4Mj8bRGmOTmA9fzq_Ge8,4840
50
52
  rslearn/models/__init__.py,sha256=_vWoF9d2Slah8-6XhYhdU4SRsy_CNxXjCGQTD2yvu3Q,22
51
53
  rslearn/models/anysat.py,sha256=nzk6hB83ltNFNXYRNA1rTvq2AQcAhwyvgBaZui1M37o,8107
52
54
  rslearn/models/attention_pooling.py,sha256=Kss1W_HYNzfX78RVDi18m0-cG2BoPsC240u0oEqJ0d4,7187
53
55
  rslearn/models/clip.py,sha256=QG1oUFqcVuNEhx7BNfJ1FnxIOMNUwRNBwXCe3CR6wFI,2415
54
56
  rslearn/models/component.py,sha256=uikFDzPYaW_LSXsrSsES1aup4IDIuWHsitWLpKgF7zU,3432
55
- rslearn/models/concatenate_features.py,sha256=Attemr5KurxlOojpclD0Pd5Cu2KHpNdpXe8jCSjpJ9U,3818
57
+ rslearn/models/concatenate_features.py,sha256=0gZPkUBpyhzq1HNhN7mKl44u2vsL2p-o3gy5gpAy2go,3947
56
58
  rslearn/models/conv.py,sha256=dEAAfhPo4bFlZPSAQjzqZTpP-hdJ394TytYssVK-fDA,2001
57
59
  rslearn/models/croma.py,sha256=BcKV4-D4uira6f9zvW73aslF_XitAhObnyrE_3iTcTs,11008
58
60
  rslearn/models/dinov3.py,sha256=Q9X7VTwzjllLSEvc235C9BY_jMnIoSybsiOkeA58uHo,6472
@@ -110,17 +112,18 @@ rslearn/models/presto/__init__.py,sha256=eZrB-XKi_vYqZhpyAOwppJi4dRuMtYVAdbq7KRy
110
112
  rslearn/models/presto/presto.py,sha256=fkyHB85Hfx5L-4yejSFAFv83gk9VFqAR1GTgggtq0EA,11049
111
113
  rslearn/models/presto/single_file_presto.py,sha256=-P00xjhj9dx3O6HqWpQmG9dPk_i6bT_t8vhX4uQm5tA,30242
112
114
  rslearn/tile_stores/__init__.py,sha256=-cW1J7So60SEP5ZLHCPdaFBV5CxvV3QlOhaFnUkhTJ0,1675
113
- rslearn/tile_stores/default.py,sha256=PYaDNvBxhJTDKJGw0EjDTSE1OKajR7_iJpMbOjj-mE8,15054
115
+ rslearn/tile_stores/default.py,sha256=AG2j0FCNi_4cnXqLjRIef5wMqMJ5_YtSkTIhk7qJQVQ,15134
114
116
  rslearn/tile_stores/tile_store.py,sha256=9AeYduDYPp_Ia2NMlq6osptpz_AFGIOQcLJrqZ_m-z0,10469
115
117
  rslearn/train/__init__.py,sha256=fnJyY4aHs5zQqbDKSfXsJZXY_M9fbTsf7dRYaPwZr2M,30
116
- rslearn/train/all_patches_dataset.py,sha256=EVoYCmS3g4OfWPt5CZzwHVx9isbnWh5HIGA0RBqPFeA,21145
117
- rslearn/train/data_module.py,sha256=gar7RsyurdBLtbd1y8llkbMrRU7_RTX2tonp45qPIns,23784
118
- rslearn/train/dataset.py,sha256=a4ehgAiPbEWJQ8T8JJuhfF62CN9KKr6iOW67U6WLPmY,41380
118
+ rslearn/train/all_crops_dataset.py,sha256=CWnqbSjRXJZQsudljvpA07oldiP4fZTmjwrT0sjVnq4,21399
119
+ rslearn/train/data_module.py,sha256=G1TRhXg8SPewYy0BTZN5KpeLPK72qIaH15ePfUwrxgM,23865
120
+ rslearn/train/dataset.py,sha256=vCmm6yrW2bAc5A94aBwQe-SOIGdVcZYMM2oBYRq2_sw,45253
119
121
  rslearn/train/dataset_index.py,sha256=S5iXhQga5gnnkDqThXXlyjIwkJBPVWiUfDPx3iVs-pw,5306
120
- rslearn/train/lightning_module.py,sha256=V4YoEg9PrwrgG4q9Dmv_9OBrSIK-SRPzjWtZRIfmPFg,15366
121
- rslearn/train/model_context.py,sha256=FCHPHLrQ57RjJpsWi3u1HV0tZc-gf0tzvx4lpdEf6gU,3204
122
+ rslearn/train/lightning_module.py,sha256=n4hasJBVlAmMhvf2yaFo0gy1vGz5haQkJpZdCSKlJ8A,17482
123
+ rslearn/train/metrics.py,sha256=RknMf2n09D5XBCf0YM4Zmm0XI-pFbRtsmbY51ipVMPk,4799
124
+ rslearn/train/model_context.py,sha256=8DMWGj5xCRmRDo_38lkhkUMHfK_yg3XZrUJQIz5a1vA,3200
122
125
  rslearn/train/optimizer.py,sha256=EKSqkmERalDA0bF32Gey7n6z69KLyaUWKlRsGJfKBmE,927
123
- rslearn/train/prediction_writer.py,sha256=rW0BUaYT_F1QqmpnQlbrLiLya1iBfC5Pb78G_NlF-vA,15956
126
+ rslearn/train/prediction_writer.py,sha256=cRFehEtr0iBuVqzE69a0B4Lvb8ywxLeyon34KWI86H0,16961
124
127
  rslearn/train/scheduler.py,sha256=Yyq2fMHH08OyGt9qWD7iLc92XNIBbZHLtzlLR-f732s,2728
125
128
  rslearn/train/callbacks/__init__.py,sha256=VNV0ArZyYMvl3dGK2wl6F046khYJ1dEBlJS6G_SYNm0,47
126
129
  rslearn/train/callbacks/adapters.py,sha256=yfv8nyCj3jmo2_dNkFrjukKxh0MHsf2xKqWwMF0QUtY,1869
@@ -128,13 +131,13 @@ rslearn/train/callbacks/freeze_unfreeze.py,sha256=8fIzBMhCKKjpTffIeAdhdSjsBd8NjT
128
131
  rslearn/train/callbacks/gradients.py,sha256=4YqCf0tBb6E5FnyFYbveXfQFlgNPyxIXb2FCWX4-6qs,5075
129
132
  rslearn/train/callbacks/peft.py,sha256=wEOKsS3RhsRaZTXn_Kz2wdsZdIiIaZPdCJWtdJBurT8,4156
130
133
  rslearn/train/tasks/__init__.py,sha256=dag1u72x1-me6y0YcOubUo5MYZ0Tjf6-dOir9UeFNMs,75
131
- rslearn/train/tasks/classification.py,sha256=72ZBcbunMsdPYQN53S-4GfiLIDrr1X3Hni07dBJ0pu0,14261
132
- rslearn/train/tasks/detection.py,sha256=8nxa90ht0-xlcO_gsI-zR02nL82-wJXq4LpXNFvg5Lw,21730
134
+ rslearn/train/tasks/classification.py,sha256=_3cRa8ojd9sG2ELRW_BvByZh2YFdCBaklR8Kv9LAgOY,14864
135
+ rslearn/train/tasks/detection.py,sha256=uDMGtsCMSk9OGXn-vpFKBAyHyVN0ji2NCfqBgg1BQyw,21725
133
136
  rslearn/train/tasks/embedding.py,sha256=NdJEAaDWlWYzvOBVf7eIHfFOzqTgavfFH1J1gMbAMVo,3891
134
137
  rslearn/train/tasks/multi_task.py,sha256=32hvwyVsHqt7N_M3zXsTErK1K7-0-BPHzt7iGNehyaI,6314
135
- rslearn/train/tasks/per_pixel_regression.py,sha256=njShN-U9fx3SPcCxGgbDlZAp3DT_GlTt0BRZS416gnw,10387
136
- rslearn/train/tasks/regression.py,sha256=bVS_ApZSpbL0NaaM8Mu5Bsu4SBUyLpVtrPslulvvZHs,12695
137
- rslearn/train/tasks/segmentation.py,sha256=dn1yo1dIArKvW9Giw8-LZyIZ87q76eslL0mk58GyApo,29663
138
+ rslearn/train/tasks/per_pixel_regression.py,sha256=3m_BTP2akadYe3IuAlCG2bd_alfNyom55-pFrI2q4PE,10928
139
+ rslearn/train/tasks/regression.py,sha256=TzHL42gm3aIdev0R7_uz_TSYbAwSvQPjCD42y1p9_7Y,13269
140
+ rslearn/train/tasks/segmentation.py,sha256=b9XS09EQvum89eoW3vWqFMKuCRtznODteKIr1hFnIz4,30531
138
141
  rslearn/train/tasks/task.py,sha256=nMPunl9OlnOimr48saeTnwKMQ7Du4syGrwNKVQq4FL4,4110
139
142
  rslearn/train/transforms/__init__.py,sha256=BkCAzm4f-8TEhPIuyvCj7eJGh36aMkZFYlq-H_jkSvY,778
140
143
  rslearn/train/transforms/concatenate.py,sha256=S8f1svzwb5UmeAgzXe4Af_hFvt5o0tQctIE6t3QYuPI,2625
@@ -147,17 +150,19 @@ rslearn/train/transforms/resize.py,sha256=LPXCD6NS8Xi1uPOtHxRWtT5CAkpEzsVafHkHIQ
147
150
  rslearn/train/transforms/select_bands.py,sha256=owxMOvWEp8lRZhj6pQ1qFYebKZCQJZZCW8sBrK_T9-I,1868
148
151
  rslearn/train/transforms/sentinel1.py,sha256=zYwT3amv1M7BYZIfkIX3J2Rzh161d-ngCqp3ypO9gBE,2011
149
152
  rslearn/train/transforms/transform.py,sha256=n1Qzqix2dVvej-Q7iPzHeOQbqH79IBlvqPoymxhNVpE,4446
150
- rslearn/utils/__init__.py,sha256=GNvdTUmXakiEMnLdje7k1fe5aC7SFVqP757kbpN6Fzw,558
153
+ rslearn/utils/__init__.py,sha256=GZc1erpEfXTc32yjEDbt5rnMrnXEBY7WVm3v4NlwwWY,620
151
154
  rslearn/utils/array.py,sha256=RC7ygtPnQwU6Lb9kwORvNxatJcaJ76JPsykQvndAfes,2444
152
155
  rslearn/utils/colors.py,sha256=ELY9_buH06TOVPLrDAyf2S0G--ZiOxnnP8Ujim6_3ig,369
153
156
  rslearn/utils/feature.py,sha256=lsg0WThZDJzo1mrbaL04dXYI5G3x-n5FG9aEjj7uUaI,1649
154
- rslearn/utils/fsspec.py,sha256=h3fER_bkewzR9liEAULXguTIvXLUXA17pC_yZoWN5Tk,5902
155
- rslearn/utils/geometry.py,sha256=S60uEvCQ3SyR2-3TJ1yUucFmGRM_rcoIT_gH83PN3RE,21485
157
+ rslearn/utils/fsspec.py,sha256=TcEUgXKvsmtKHv5JVOI2Vp4WNfVNeTok0x4JgZaD1iw,7052
158
+ rslearn/utils/geometry.py,sha256=VzLoxtwdV3uC3szowT-bGuCFF6ge8eK0m01lq8q-01Q,22423
156
159
  rslearn/utils/get_utm_ups_crs.py,sha256=kUrcyjCK7KWvuP1XR-nURPeRqYeRO-3L8QUJ1QTF9Ps,3599
157
160
  rslearn/utils/grid_index.py,sha256=hRmrtgpqN1pLa-djnZtgSXqKJlbgGyttGnCEmPLD0zo,2347
158
161
  rslearn/utils/jsonargparse.py,sha256=TRyZA151KzhjJlZczIHYguEA-YxCDYaZ2IwCRgx76nM,4791
162
+ rslearn/utils/m2m_api.py,sha256=YemQkh9ItdU6ojP3XBUf9rj1we_P-8mdy7IHvlMNlKQ,8893
159
163
  rslearn/utils/mp.py,sha256=XYmVckI5TOQuCKc49NJyirDJyFgvb4AI-gGypG2j680,1399
160
164
  rslearn/utils/raster_format.py,sha256=fwotJBadwqYSdK8UokiKOk1pOF8JMim3kP_VwLWivPI,27382
165
+ rslearn/utils/retry_session.py,sha256=alVwqvZqqG3TZNg7NVbgfpUnSMdWve8T7gYzZmBz1jc,1284
161
166
  rslearn/utils/rtree_index.py,sha256=j0Zwrq3pXuAJ-hKpiRFQ7VNtvO3fZYk-Em2uBPAqfx4,6460
162
167
  rslearn/utils/spatial_index.py,sha256=eomJAUgzmjir8j9HZnSgQoJHwN9H0wGTjmJkMkLLfsU,762
163
168
  rslearn/utils/sqlite_index.py,sha256=YGOJi66544e6JNtfSft6YIlHklFdSJO2duxQ4TJ2iu4,2920
@@ -171,10 +176,10 @@ rslearn/vis/render_sensor_image.py,sha256=D0ynK6ABPV046970lIKwF98klpSCtrsUvZTwtZ
171
176
  rslearn/vis/render_vector_label.py,sha256=ncwgRKCYCJCK1-wTpjgksOiDDebku37LpAyq6wsg4jg,14939
172
177
  rslearn/vis/utils.py,sha256=Zop3dEmyaXUYhPiGdYzrTO8BRXWscP2dEZy2myQUnNk,2765
173
178
  rslearn/vis/vis_server.py,sha256=kIGnhTy-yfu5lBOVCoo8VVG259i974JPszudCePbzfI,20157
174
- rslearn-0.0.26.dist-info/licenses/LICENSE,sha256=_99ZWPoLdlUbqZoSC5DF4ihiNwl5rTEmBaq2fACecdg,11352
175
- rslearn-0.0.26.dist-info/licenses/NOTICE,sha256=wLPr6rwV_jCg-xEknNGwhnkfRfuoOE9MZ-lru2yZyLI,5070
176
- rslearn-0.0.26.dist-info/METADATA,sha256=ZkFWiVzrI_4J1qtC6zSF1dxGDtW4a8wPKdYaZbmGsoQ,38576
177
- rslearn-0.0.26.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
178
- rslearn-0.0.26.dist-info/entry_points.txt,sha256=doTBQ57NT7nq-dgYGgTTw6mafcGWb_4PWYtYR4rGm50,46
179
- rslearn-0.0.26.dist-info/top_level.txt,sha256=XDKo90WBH8P9RQumHxo0giLJsoufT4r9odv-WE6Ahk4,8
180
- rslearn-0.0.26.dist-info/RECORD,,
179
+ rslearn-0.0.28.dist-info/licenses/LICENSE,sha256=_99ZWPoLdlUbqZoSC5DF4ihiNwl5rTEmBaq2fACecdg,11352
180
+ rslearn-0.0.28.dist-info/licenses/NOTICE,sha256=wLPr6rwV_jCg-xEknNGwhnkfRfuoOE9MZ-lru2yZyLI,5070
181
+ rslearn-0.0.28.dist-info/METADATA,sha256=OSGXg3yVyndUAZYL9EwvCl095O_Vfknpxlhx8O5dLmQ,38714
182
+ rslearn-0.0.28.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
183
+ rslearn-0.0.28.dist-info/entry_points.txt,sha256=doTBQ57NT7nq-dgYGgTTw6mafcGWb_4PWYtYR4rGm50,46
184
+ rslearn-0.0.28.dist-info/top_level.txt,sha256=XDKo90WBH8P9RQumHxo0giLJsoufT4r9odv-WE6Ahk4,8
185
+ rslearn-0.0.28.dist-info/RECORD,,