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

@@ -32,7 +32,7 @@ def open_gsp(
32
32
  boundaries_version: str = "20220314",
33
33
  public: bool = False,
34
34
  ) -> xr.DataArray:
35
- """Open the GSP data and validates its data types.
35
+ """Open and eagerly load the GSP data and validates its data types.
36
36
 
37
37
  Args:
38
38
  zarr_path: Path to the GSP zarr data
@@ -93,4 +93,6 @@ def open_gsp(
93
93
  dtype = gsp_da.coords[coord].dtype
94
94
  raise TypeError(f"{coord} should be {expected_dtype.__name__}, not {dtype}")
95
95
 
96
- return gsp_da
96
+ # Below we load the data eagerly into memory - this makes the dataset faster to sample from, but
97
+ # at the cost of a little extra memory usage
98
+ return gsp_da.compute()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ocf-data-sampler
3
- Version: 0.5.18
3
+ Version: 0.5.19
4
4
  Author: James Fulton, Peter Dudfield
5
5
  Author-email: Open Climate Fix team <info@openclimatefix.org>
6
6
  License: MIT License
@@ -7,7 +7,7 @@ ocf_data_sampler/config/save.py,sha256=m8SPw5rXjkMm1rByjh3pK5StdBi4e8ysnn3jQopdR
7
7
  ocf_data_sampler/data/uk_gsp_locations_20220314.csv,sha256=RSh7DRh55E3n8lVAaWXGTaXXHevZZtI58td4d4DhGos,10415772
8
8
  ocf_data_sampler/data/uk_gsp_locations_20250109.csv,sha256=XZISFatnbpO9j8LwaxNKFzQSjs6hcHFsV8a9uDDpy2E,9055334
9
9
  ocf_data_sampler/load/__init__.py,sha256=-vQP9g0UOWdVbjEGyVX_ipa7R1btmiETIKAf6aw4d78,201
10
- ocf_data_sampler/load/gsp.py,sha256=C-r5IidXFq1-zw_KkMjuXczjJ-5t3k4UyjXk6BjQNoU,2881
10
+ ocf_data_sampler/load/gsp.py,sha256=zsQ39dZBS45qd86lGfCZUjheLRTtMzIUozj-j8c87UQ,3058
11
11
  ocf_data_sampler/load/load_dataset.py,sha256=K8rWykjII-3g127If7WRRFivzHNx3SshCvZj4uQlf28,2089
12
12
  ocf_data_sampler/load/open_xarray_tensorstore.py,sha256=kAqlIavGe1dcCPkzAtoZo2dFS-tW36E-wRE_3w1HMfg,5620
13
13
  ocf_data_sampler/load/satellite.py,sha256=B-m0_Py_D0GwzwX5o-ixyeXntV5Z4k4MbmMBHZLUWMM,1831
@@ -58,7 +58,7 @@ ocf_data_sampler/torch_datasets/utils/valid_time_periods.py,sha256=xcy75cVxl0Wrg
58
58
  ocf_data_sampler/torch_datasets/utils/validation_utils.py,sha256=YqmT-lExWlI8_ul3l0EP73Ik002fStr_bhsZh9mQqEU,4735
59
59
  scripts/download_gsp_location_data.py,sha256=rRDXMoqX-RYY4jPdxhdlxJGhWdl6r245F5UARgKV6P4,3121
60
60
  scripts/refactor_site.py,sha256=skzvsPP0Cn9yTKndzkilyNcGz4DZ88ctvCJ0XrBdc2A,3135
61
- ocf_data_sampler-0.5.18.dist-info/METADATA,sha256=X8GB_jGQyev3yFEAmGCW1NvDnKiIw5hVWPyzNTGteLE,12817
62
- ocf_data_sampler-0.5.18.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
63
- ocf_data_sampler-0.5.18.dist-info/top_level.txt,sha256=deUxqmsONNAGZDNbsntbXH7BRA1MqWaUeAJrCo6q_xA,25
64
- ocf_data_sampler-0.5.18.dist-info/RECORD,,
61
+ ocf_data_sampler-0.5.19.dist-info/METADATA,sha256=CyMcURh5QvAzzxVvu_DzbK4krMLtGtSlVjr4KURpFiw,12817
62
+ ocf_data_sampler-0.5.19.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
63
+ ocf_data_sampler-0.5.19.dist-info/top_level.txt,sha256=deUxqmsONNAGZDNbsntbXH7BRA1MqWaUeAJrCo6q_xA,25
64
+ ocf_data_sampler-0.5.19.dist-info/RECORD,,