ocf-data-sampler 0.5.33__py3-none-any.whl → 0.5.35__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/config/model.py +3 -6
- ocf_data_sampler/torch_datasets/datasets/site.py +6 -1
- {ocf_data_sampler-0.5.33.dist-info → ocf_data_sampler-0.5.35.dist-info}/METADATA +1 -1
- {ocf_data_sampler-0.5.33.dist-info → ocf_data_sampler-0.5.35.dist-info}/RECORD +6 -6
- {ocf_data_sampler-0.5.33.dist-info → ocf_data_sampler-0.5.35.dist-info}/WHEEL +0 -0
- {ocf_data_sampler-0.5.33.dist-info → ocf_data_sampler-0.5.35.dist-info}/top_level.txt +0 -0
ocf_data_sampler/config/model.py
CHANGED
|
@@ -7,7 +7,7 @@ Prefix with a protocol like s3:// to read from alternative filesystems.
|
|
|
7
7
|
from collections.abc import Iterator
|
|
8
8
|
from typing import Literal
|
|
9
9
|
|
|
10
|
-
from pydantic import BaseModel, Field, RootModel, field_validator, model_validator
|
|
10
|
+
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator, model_validator
|
|
11
11
|
from typing_extensions import override
|
|
12
12
|
|
|
13
13
|
NWP_PROVIDERS = [
|
|
@@ -23,10 +23,7 @@ NWP_PROVIDERS = [
|
|
|
23
23
|
class Base(BaseModel):
|
|
24
24
|
"""Pydantic Base model where no extras can be added."""
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
"""Config class."""
|
|
28
|
-
|
|
29
|
-
extra = "forbid" # forbid use of extra kwargs
|
|
26
|
+
model_config = ConfigDict(extra="forbid")
|
|
30
27
|
|
|
31
28
|
|
|
32
29
|
class General(Base):
|
|
@@ -91,7 +88,7 @@ class DropoutMixin(Base):
|
|
|
91
88
|
)
|
|
92
89
|
|
|
93
90
|
dropout_fraction: float | list[float] = Field(
|
|
94
|
-
default=0,
|
|
91
|
+
default=0.0,
|
|
95
92
|
description="Either a float(Chance of dropout being applied to each sample) or a list of "
|
|
96
93
|
"floats (probability that dropout of the corresponding timedelta is applied)",
|
|
97
94
|
)
|
|
@@ -330,7 +330,12 @@ class SitesDatasetConcurrent(PickleCacheMixin, Dataset):
|
|
|
330
330
|
self.config = config
|
|
331
331
|
|
|
332
332
|
# get all locations
|
|
333
|
-
|
|
333
|
+
locations = get_locations(datasets_dict["site"])
|
|
334
|
+
self.locations = add_alterate_coordinate_projections(
|
|
335
|
+
locations,
|
|
336
|
+
datasets_dict,
|
|
337
|
+
primary_coords="lon_lat",
|
|
338
|
+
)
|
|
334
339
|
|
|
335
340
|
# Get t0 times where all input data is available
|
|
336
341
|
valid_t0s = self.find_valid_t0s(datasets_dict)
|
|
@@ -2,7 +2,7 @@ ocf_data_sampler/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,
|
|
|
2
2
|
ocf_data_sampler/utils.py,sha256=WfmyBacjFGsv_IlUHRezNGc4ixi4wBvom_JF76iJYbY,1487
|
|
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
|
-
ocf_data_sampler/config/model.py,sha256=
|
|
5
|
+
ocf_data_sampler/config/model.py,sha256=3aaMZIITDOQ6IGeod9xOYGOzft5zNVfEVBWbmWM50nA,11843
|
|
6
6
|
ocf_data_sampler/config/save.py,sha256=m8SPw5rXjkMm1rByjh3pK5StdBi4e8ysnn3jQopdRaI,1064
|
|
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
|
|
@@ -43,7 +43,7 @@ ocf_data_sampler/select/select_time_slice.py,sha256=cpkdovJMvcjxSGfq9G0OJK5aDAeC
|
|
|
43
43
|
ocf_data_sampler/torch_datasets/datasets/__init__.py,sha256=o0SsEXXZ6k9iL__5_RN1Sf60lw_eqK91P3UFEHAD2k0,102
|
|
44
44
|
ocf_data_sampler/torch_datasets/datasets/picklecache.py,sha256=b8T5lgKfiPXLwuVQuFpCQBlU-HNBrA-Z-eSwYICKvsQ,1350
|
|
45
45
|
ocf_data_sampler/torch_datasets/datasets/pvnet_uk.py,sha256=Tpf1zVPtBy-815n__-zgsTeNRxlxjLwuu6UgCCyIEL0,12365
|
|
46
|
-
ocf_data_sampler/torch_datasets/datasets/site.py,sha256=
|
|
46
|
+
ocf_data_sampler/torch_datasets/datasets/site.py,sha256=RuFQZwJ74AJncnnGXIXlpFTgnTIu4_hshm4NotoQ_-Y,15250
|
|
47
47
|
ocf_data_sampler/torch_datasets/sample/__init__.py,sha256=GL84vdZl_SjHDGVyh9Uekx2XhPYuZ0dnO3l6f6KXnHI,100
|
|
48
48
|
ocf_data_sampler/torch_datasets/sample/base.py,sha256=cQ1oIyhdmlotejZK8B3Cw6MNvpdnBPD8G_o2h7Ye4Vc,2206
|
|
49
49
|
ocf_data_sampler/torch_datasets/sample/site.py,sha256=40NwNTqjL1WVhPdwe02zDHHfDLG2u_bvCfRCtGAtFc0,1466
|
|
@@ -59,7 +59,7 @@ ocf_data_sampler/torch_datasets/utils/valid_time_periods.py,sha256=xcy75cVxl0Wrg
|
|
|
59
59
|
ocf_data_sampler/torch_datasets/utils/validation_utils.py,sha256=YqmT-lExWlI8_ul3l0EP73Ik002fStr_bhsZh9mQqEU,4735
|
|
60
60
|
scripts/download_gsp_location_data.py,sha256=rRDXMoqX-RYY4jPdxhdlxJGhWdl6r245F5UARgKV6P4,3121
|
|
61
61
|
scripts/refactor_site.py,sha256=skzvsPP0Cn9yTKndzkilyNcGz4DZ88ctvCJ0XrBdc2A,3135
|
|
62
|
-
ocf_data_sampler-0.5.
|
|
63
|
-
ocf_data_sampler-0.5.
|
|
64
|
-
ocf_data_sampler-0.5.
|
|
65
|
-
ocf_data_sampler-0.5.
|
|
62
|
+
ocf_data_sampler-0.5.35.dist-info/METADATA,sha256=eXjW8gEArkH3NA4tVS5beCxGjsizxomdVUYh0ra8JKE,13541
|
|
63
|
+
ocf_data_sampler-0.5.35.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
64
|
+
ocf_data_sampler-0.5.35.dist-info/top_level.txt,sha256=deUxqmsONNAGZDNbsntbXH7BRA1MqWaUeAJrCo6q_xA,25
|
|
65
|
+
ocf_data_sampler-0.5.35.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|