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

@@ -8,17 +8,15 @@ logger = logging.getLogger(__name__)
8
8
 
9
9
 
10
10
 
11
- def stack_np_examples_into_sample(dict_list):
11
+ def stack_np_samples_into_batch(dict_list):
12
12
  # """
13
- # Stacks Numpy examples into a sample
14
-
15
- # See also: `unstack_np_sample_into_examples()` for opposite
13
+ # Stacks Numpy samples into a batch
16
14
 
17
15
  # Args:
18
- # dict_list: A list of dict-like Numpy examples to stack
16
+ # dict_list: A list of dict-like Numpy samples to stack
19
17
 
20
18
  # Returns:
21
- # The stacked NumpySample object
19
+ # The stacked NumpySample object, aka a batch
22
20
  # """
23
21
 
24
22
  if not dict_list:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ocf_data_sampler
3
- Version: 0.0.42
3
+ Version: 0.0.43
4
4
  Summary: Sample from weather data for renewable energy prediction
5
5
  Author: James Fulton, Peter Dudfield, and the Open Climate Fix team
6
6
  Author-email: info@openclimatefix.org
@@ -56,7 +56,7 @@ Requires-Dist: mkdocs-material>=8.0; extra == "docs"
56
56
  # ocf-data-sampler
57
57
 
58
58
  <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
59
- [![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors-)
59
+ [![All Contributors](https://img.shields.io/badge/all_contributors-10-orange.svg?style=flat-square)](#contributors-)
60
60
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
61
61
 
62
62
  [![tags badge](https://img.shields.io/github/v/tag/openclimatefix/ocf-data-sampler?include_prereleases&sort=semver&color=FFAC5F)](https://github.com/openclimatefix/ocf-data-sampler/tags)
@@ -134,6 +134,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
134
134
  <tr>
135
135
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/felix-e-h-p"><img src="https://avatars.githubusercontent.com/u/137530077?v=4?s=100" width="100px;" alt="Felix"/><br /><sub><b>Felix</b></sub></a><br /><a href="https://github.com/openclimatefix/ocf-data-sampler/commits?author=felix-e-h-p" title="Code">💻</a></td>
136
136
  <td align="center" valign="top" width="14.28%"><a href="https://timothyajaniportfolio-b6v3zq29k-timthegreat.vercel.app/"><img src="https://avatars.githubusercontent.com/u/60073728?v=4?s=100" width="100px;" alt="Ajani Timothy"/><br /><sub><b>Ajani Timothy</b></sub></a><br /><a href="https://github.com/openclimatefix/ocf-data-sampler/commits?author=Tim1119" title="Code">💻</a></td>
137
+ <td align="center" valign="top" width="14.28%"><a href="https://rupeshmangalam.vercel.app/"><img src="https://avatars.githubusercontent.com/u/91172425?v=4?s=100" width="100px;" alt="Rupesh Mangalam"/><br /><sub><b>Rupesh Mangalam</b></sub></a><br /><a href="https://github.com/openclimatefix/ocf-data-sampler/commits?author=RupeshMangalam21" title="Code">💻</a></td>
137
138
  </tr>
138
139
  </tbody>
139
140
  </table>
@@ -19,7 +19,7 @@ ocf_data_sampler/load/nwp/providers/ecmwf.py,sha256=2iR1Iy542lo51rC6XFLV-3pbUE68
19
19
  ocf_data_sampler/load/nwp/providers/ukv.py,sha256=79Bm7q-K_GJPYMy62SUIZbRWRF4-tIaB1dYPEgLD9vo,1207
20
20
  ocf_data_sampler/load/nwp/providers/utils.py,sha256=Sy2exG1wpXLLhMXYdsfR-DZMR3txG1_bBmBdchlc-yA,848
21
21
  ocf_data_sampler/numpy_sample/__init__.py,sha256=jWvN4BDYAgoFkdGBxjNrYioZdZNVbIcP4RsNGJCEGm0,345
22
- ocf_data_sampler/numpy_sample/collate.py,sha256=RSG6wedj31qMTO9I31fXRfcZd-PU8YSy1su4XHF0g10,2285
22
+ ocf_data_sampler/numpy_sample/collate.py,sha256=y8QFUhskaAfOMP22aVkexwyGAwLHbNE-q1pOZ6txWKA,2227
23
23
  ocf_data_sampler/numpy_sample/gsp.py,sha256=4ZckEN7S82UY36e9z6rp5DTp10SAn_cNISBNilpOADw,1008
24
24
  ocf_data_sampler/numpy_sample/nwp.py,sha256=eEIRXP09wY99Vq-ItnfQ6U9AY1vJPLYKfUOc83V6ICo,1302
25
25
  ocf_data_sampler/numpy_sample/satellite.py,sha256=WYG9_ryOk3RWHWjgcMjIaU-YahEhTXz2xN0rQm-_TTQ,914
@@ -49,7 +49,7 @@ tests/load/test_load_gsp.py,sha256=aT_nqaSXmUTcdHzuTT7AmXJr3R31k4OEN-Fv3eLxlQE,4
49
49
  tests/load/test_load_nwp.py,sha256=3qyyDkB1q9t3tyAwogfotNrxqUOpXXimco1CImoEWGg,753
50
50
  tests/load/test_load_satellite.py,sha256=STX5AqqmOAgUgE9R1xyq_sM3P1b8NKdGjO-hDhayfxM,524
51
51
  tests/load/test_load_sites.py,sha256=T9lSEnGPI8FQISudVYHHNTHeplNS62Vrx48jaZ6J_Jo,364
52
- tests/numpy_sample/test_collate.py,sha256=Oks9YxLBRX1Abz9wwGO36VT4-ftYxlDKVIQ9ra7xrhY,851
52
+ tests/numpy_sample/test_collate.py,sha256=oWVNRR0LyF0iqaxjsq6hPMmkSGIyvGVlAM6q2rqvXqQ,840
53
53
  tests/numpy_sample/test_gsp.py,sha256=FLlq4SlJ-9cSRAepf4_ksA6PsUVKegnKEAc5pUojCJ0,1458
54
54
  tests/numpy_sample/test_nwp.py,sha256=yf4u7mAU0E3FQ4xAH6YjuHuHBzzFoXjHSFNkOVJUdSM,1455
55
55
  tests/numpy_sample/test_satellite.py,sha256=cCqtn5See-uSNfh89COGTUQNuFm6sIZ8QmBVHsuUeRI,1189
@@ -64,8 +64,8 @@ tests/torch_datasets/conftest.py,sha256=eRCzHE7cxS4AoskExkCGFDBeqItktAYNAdkfpMoF
64
64
  tests/torch_datasets/test_process_and_combine.py,sha256=mbjQdqzLhox-U2sc1Ec68xLz95b3XOyPa7WchgxUM88,4256
65
65
  tests/torch_datasets/test_pvnet_uk_regional.py,sha256=dLY861PMyQ_buTksP8d0UXzfKsZ_CFNgceSYVGXRIRs,2134
66
66
  tests/torch_datasets/test_site.py,sha256=TSmdpD0OFid6e8eRgeB5FGxglUN1L2t4cIuMTfjA7jE,4539
67
- ocf_data_sampler-0.0.42.dist-info/LICENSE,sha256=F-Q3UFCR-BECSocV55BFDpn4YKxve9PKrm-lTt6o_Tg,1073
68
- ocf_data_sampler-0.0.42.dist-info/METADATA,sha256=tLh8ajGI3CLruw5ZEasx7beUa3FiKs_fXSg9cRexgdQ,11055
69
- ocf_data_sampler-0.0.42.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
70
- ocf_data_sampler-0.0.42.dist-info/top_level.txt,sha256=Faob6N6cFdPc5eUpCTYcXgCaNhi4XLLteUL5W5ayYmg,31
71
- ocf_data_sampler-0.0.42.dist-info/RECORD,,
67
+ ocf_data_sampler-0.0.43.dist-info/LICENSE,sha256=F-Q3UFCR-BECSocV55BFDpn4YKxve9PKrm-lTt6o_Tg,1073
68
+ ocf_data_sampler-0.0.43.dist-info/METADATA,sha256=pqYvFJO9iGZnsMneHiF0WobuYrSpfxG_Cw701uBi480,11431
69
+ ocf_data_sampler-0.0.43.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
70
+ ocf_data_sampler-0.0.43.dist-info/top_level.txt,sha256=Faob6N6cFdPc5eUpCTYcXgCaNhi4XLLteUL5W5ayYmg,31
71
+ ocf_data_sampler-0.0.43.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  from ocf_data_sampler.numpy_sample import GSPSampleKey, SatelliteSampleKey
2
- from ocf_data_sampler.numpy_sample.collate import stack_np_examples_into_sample
2
+ from ocf_data_sampler.numpy_sample.collate import stack_np_samples_into_batch
3
3
  from ocf_data_sampler.torch_datasets import PVNetUKRegionalDataset
4
4
 
5
5
 
@@ -16,11 +16,11 @@ def test_pvnet(pvnet_config_filename):
16
16
  sample1 = dataset[0]
17
17
  sample2 = dataset[1]
18
18
 
19
- sample = stack_np_examples_into_sample([sample1, sample2])
19
+ batch = stack_np_samples_into_batch([sample1, sample2])
20
20
 
21
- assert isinstance(sample, dict)
22
- assert "nwp" in sample
23
- assert isinstance(sample["nwp"], dict)
24
- assert "ukv" in sample["nwp"]
25
- assert GSPSampleKey.gsp in sample
26
- assert SatelliteSampleKey.satellite_actual in sample
21
+ assert isinstance(batch, dict)
22
+ assert "nwp" in batch
23
+ assert isinstance(batch["nwp"], dict)
24
+ assert "ukv" in batch["nwp"]
25
+ assert GSPSampleKey.gsp in batch
26
+ assert SatelliteSampleKey.satellite_actual in batch