ocf-data-sampler 0.0.42__tar.gz → 0.0.43__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 ocf-data-sampler might be problematic. Click here for more details.

Files changed (77) hide show
  1. {ocf_data_sampler-0.0.42/ocf_data_sampler.egg-info → ocf_data_sampler-0.0.43}/PKG-INFO +3 -2
  2. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/README.md +2 -1
  3. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/numpy_sample/collate.py +4 -6
  4. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43/ocf_data_sampler.egg-info}/PKG-INFO +3 -2
  5. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/pyproject.toml +1 -1
  6. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/tests/numpy_sample/test_collate.py +8 -8
  7. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/LICENSE +0 -0
  8. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/MANIFEST.in +0 -0
  9. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/__init__.py +0 -0
  10. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/config/__init__.py +0 -0
  11. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/config/load.py +0 -0
  12. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/config/model.py +0 -0
  13. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/config/save.py +0 -0
  14. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/constants.py +0 -0
  15. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/data/uk_gsp_locations.csv +0 -0
  16. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/load/__init__.py +0 -0
  17. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/load/gsp.py +0 -0
  18. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/load/load_dataset.py +0 -0
  19. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/load/nwp/__init__.py +0 -0
  20. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/load/nwp/nwp.py +0 -0
  21. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/load/nwp/providers/__init__.py +0 -0
  22. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/load/nwp/providers/ecmwf.py +0 -0
  23. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/load/nwp/providers/ukv.py +0 -0
  24. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/load/nwp/providers/utils.py +0 -0
  25. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/load/satellite.py +0 -0
  26. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/load/site.py +0 -0
  27. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/load/utils.py +0 -0
  28. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/numpy_sample/__init__.py +0 -0
  29. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/numpy_sample/gsp.py +0 -0
  30. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/numpy_sample/nwp.py +0 -0
  31. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/numpy_sample/satellite.py +0 -0
  32. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/numpy_sample/site.py +0 -0
  33. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/numpy_sample/sun_position.py +0 -0
  34. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/select/__init__.py +0 -0
  35. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/select/dropout.py +0 -0
  36. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/select/fill_time_periods.py +0 -0
  37. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/select/find_contiguous_time_periods.py +0 -0
  38. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/select/geospatial.py +0 -0
  39. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/select/location.py +0 -0
  40. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/select/select_spatial_slice.py +0 -0
  41. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/select/select_time_slice.py +0 -0
  42. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/select/spatial_slice_for_dataset.py +0 -0
  43. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/select/time_slice_for_dataset.py +0 -0
  44. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/torch_datasets/__init__.py +0 -0
  45. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/torch_datasets/process_and_combine.py +0 -0
  46. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/torch_datasets/pvnet_uk_regional.py +0 -0
  47. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/torch_datasets/site.py +0 -0
  48. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/torch_datasets/valid_time_periods.py +0 -0
  49. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler/utils.py +0 -0
  50. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler.egg-info/SOURCES.txt +0 -0
  51. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler.egg-info/dependency_links.txt +0 -0
  52. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler.egg-info/requires.txt +0 -0
  53. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/ocf_data_sampler.egg-info/top_level.txt +0 -0
  54. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/scripts/refactor_site.py +0 -0
  55. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/setup.cfg +0 -0
  56. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/tests/__init__.py +0 -0
  57. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/tests/config/test_config.py +0 -0
  58. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/tests/config/test_save.py +0 -0
  59. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/tests/conftest.py +0 -0
  60. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/tests/load/test_load_gsp.py +0 -0
  61. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/tests/load/test_load_nwp.py +0 -0
  62. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/tests/load/test_load_satellite.py +0 -0
  63. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/tests/load/test_load_sites.py +0 -0
  64. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/tests/numpy_sample/test_gsp.py +0 -0
  65. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/tests/numpy_sample/test_nwp.py +0 -0
  66. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/tests/numpy_sample/test_satellite.py +0 -0
  67. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/tests/numpy_sample/test_sun_position.py +0 -0
  68. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/tests/select/test_dropout.py +0 -0
  69. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/tests/select/test_fill_time_periods.py +0 -0
  70. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/tests/select/test_find_contiguous_time_periods.py +0 -0
  71. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/tests/select/test_location.py +0 -0
  72. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/tests/select/test_select_spatial_slice.py +0 -0
  73. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/tests/select/test_select_time_slice.py +0 -0
  74. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/tests/torch_datasets/conftest.py +0 -0
  75. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/tests/torch_datasets/test_process_and_combine.py +0 -0
  76. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/tests/torch_datasets/test_pvnet_uk_regional.py +0 -0
  77. {ocf_data_sampler-0.0.42 → ocf_data_sampler-0.0.43}/tests/torch_datasets/test_site.py +0 -0
@@ -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>
@@ -1,7 +1,7 @@
1
1
  # ocf-data-sampler
2
2
 
3
3
  <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
4
- [![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors-)
4
+ [![All Contributors](https://img.shields.io/badge/all_contributors-10-orange.svg?style=flat-square)](#contributors-)
5
5
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
6
6
 
7
7
  [![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)
@@ -79,6 +79,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
79
79
  <tr>
80
80
  <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>
81
81
  <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>
82
+ <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>
82
83
  </tr>
83
84
  </tbody>
84
85
  </table>
@@ -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>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ocf_data_sampler"
7
- version = "0.0.42"
7
+ version = "0.0.43"
8
8
  license = { file = "LICENSE" }
9
9
  readme = "README.md"
10
10
  description = "Sample from weather data for renewable energy prediction"
@@ -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