ocf-data-sampler 0.5.11__py3-none-any.whl → 0.5.12__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.

Potentially problematic release.


This version of ocf-data-sampler might be problematic. Click here for more details.

ocf_data_sampler/utils.py CHANGED
@@ -23,15 +23,18 @@ def compute(xarray_dict: dict) -> dict:
23
23
  return xarray_dict
24
24
 
25
25
 
26
- def tensorstore_compute(xarray_dict: dict) -> dict:
27
- """Eagerly read and load a nested dictionary of xarray-tensorstore DataArrays."""
26
+ def tensorstore_read(xarray_dict: dict) -> dict:
27
+ """Start reading a nested dictionary of xarray-tensorstore DataArrays."""
28
28
  # Kick off the tensorstore async reading
29
29
  for k, v in xarray_dict.items():
30
30
  if isinstance(v, dict):
31
- xarray_dict[k] = tensorstore_compute(v)
31
+ xarray_dict[k] = tensorstore_read(v)
32
32
  else:
33
33
  xarray_dict[k] = read(v)
34
+ return xarray_dict
34
35
 
35
- # Running the compute function will wait until all arrays have been read
36
- return compute(xarray_dict)
36
+
37
+ def tensorstore_compute(xarray_dict: dict) -> dict:
38
+ """Eagerly read and load a nested dictionary of xarray-tensorstore DataArrays."""
39
+ return compute(tensorstore_read(xarray_dict))
37
40
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ocf-data-sampler
3
- Version: 0.5.11
3
+ Version: 0.5.12
4
4
  Author: James Fulton, Peter Dudfield
5
5
  Author-email: Open Climate Fix team <info@openclimatefix.org>
6
6
  License: MIT License
@@ -1,5 +1,5 @@
1
1
  ocf_data_sampler/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
2
- ocf_data_sampler/utils.py,sha256=0Wlx7SNOJE5ZNs_F3m-fkKsF58haF-IxDxcQD2hKN34,1088
2
+ ocf_data_sampler/utils.py,sha256=CTJf9bjHjO8vOJebUtXiMpvgwUpF7gEOjjaoE77fhTk,1177
3
3
  ocf_data_sampler/config/__init__.py,sha256=O29mbH0XG2gIY1g3BaveGCnpBO2SFqdu-qzJ7a6evl0,223
4
4
  ocf_data_sampler/config/load.py,sha256=LL-7wemI8o4KPkx35j-wQ3HjsMvDgqXr7G46IcASfnU,632
5
5
  ocf_data_sampler/config/model.py,sha256=Jss8UDJAaQIBDr9megX2pERoT0ocFmwLNFC8pCWN6VA,12386
@@ -56,7 +56,7 @@ ocf_data_sampler/torch_datasets/utils/valid_time_periods.py,sha256=xcy75cVxl0Wrg
56
56
  ocf_data_sampler/torch_datasets/utils/validation_utils.py,sha256=YqmT-lExWlI8_ul3l0EP73Ik002fStr_bhsZh9mQqEU,4735
57
57
  scripts/download_gsp_location_data.py,sha256=rRDXMoqX-RYY4jPdxhdlxJGhWdl6r245F5UARgKV6P4,3121
58
58
  scripts/refactor_site.py,sha256=skzvsPP0Cn9yTKndzkilyNcGz4DZ88ctvCJ0XrBdc2A,3135
59
- ocf_data_sampler-0.5.11.dist-info/METADATA,sha256=chEySqULSuOFJQ-zeK8l_b_wn3TiNymRML-Tj4GWsNU,12817
60
- ocf_data_sampler-0.5.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
61
- ocf_data_sampler-0.5.11.dist-info/top_level.txt,sha256=deUxqmsONNAGZDNbsntbXH7BRA1MqWaUeAJrCo6q_xA,25
62
- ocf_data_sampler-0.5.11.dist-info/RECORD,,
59
+ ocf_data_sampler-0.5.12.dist-info/METADATA,sha256=2s4Pf9ZEgBo72guZFO6JI3mwJzOGRxLmkmeihiQ8Ogw,12817
60
+ ocf_data_sampler-0.5.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
61
+ ocf_data_sampler-0.5.12.dist-info/top_level.txt,sha256=deUxqmsONNAGZDNbsntbXH7BRA1MqWaUeAJrCo6q_xA,25
62
+ ocf_data_sampler-0.5.12.dist-info/RECORD,,