Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit 02b913e

Browse files
committed
Remove from YAML config. #153
1 parent 44d883a commit 02b913e

File tree

7 files changed

+11
-90
lines changed

7 files changed

+11
-90
lines changed

gcp.yaml

Lines changed: 0 additions & 66 deletions
This file was deleted.

nowcasting_dataset/config/gcp.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
general:
2-
cloud: gcp
32
description: example configuration
43
name: example
54
input_data:

nowcasting_dataset/config/model.py

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
""" Configuration model for the dataset """
22
from datetime import datetime
33
from typing import Optional
4-
import logging
54

65
import git
76
from pathy import Pathy
@@ -21,25 +20,19 @@ class General(BaseModel):
2120

2221
name: str = Field("example", description="The name of this configuration file.")
2322
description: str = Field(
24-
"example configuration", description="Description of this confgiruation file"
25-
)
26-
cloud: str = Field(
27-
"gcp",
28-
description=(
29-
"local, gcp, or aws. Deprecated. Will be removed when issue"
30-
" https://github.com/openclimatefix/nowcasting_dataset/issues/153"
31-
" is implemented"
32-
),
23+
"example configuration", description="Description of this configuration file"
3324
)
3425

3526

3627
class Git(BaseModel):
3728
"""Git model"""
3829

39-
hash: str = Field(..., description="The git hash has for when a dataset is created.")
40-
message: str = Field(..., description="The git message has for when a dataset is created.")
30+
hash: str = Field(
31+
..., description="The git hash of nowcasting_dataset when a dataset is created."
32+
)
33+
message: str = Field(..., description="The git message for when a dataset is created.")
4134
committed_date: datetime = Field(
42-
..., description="The git datestamp has for when a dataset is created."
35+
..., description="The git datestamp for when a dataset is created."
4336
)
4437

4538

@@ -55,7 +48,7 @@ class DataSourceMixin(BaseModel):
5548
history_minutes: int = Field(
5649
None,
5750
ge=0,
58-
description="how many historic minutes are used. "
51+
description="how many historic minutes to use. "
5952
"If set to None, the value is defaulted to InputData.default_history_minutes",
6053
)
6154

scripts/prepare_ml_data.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
#!/usr/bin/env python3
22

3-
"""Pre-prepares batches of data on Google Cloud Storage.
3+
"""Pre-prepares batches of data.
44
55
Usage:
66
7-
First, manually create the GCS directories given by the constants
7+
First, manually create the directories given by the constants
88
DST_TRAIN_PATH and DST_VALIDATION_PATH, and create the
99
LOCAL_TEMP_PATH. Note that all files will be deleted from
1010
LOCAL_TEMP_PATH when this script starts up.
1111
12-
Currently caluclating azimuth and elevation angles, takes about 15 mins for 2548 PV systems, for about 1 year
12+
Currently caluclating azimuth and elevation angles, takes about 15 mins for 2548 PV systems,
13+
for about 1 year.
1314
1415
"""
1516
from nowcasting_dataset.filesystem import utils
@@ -75,7 +76,6 @@
7576
LOCAL_TEMP_PATH = Path(config.process.local_temp_path).expanduser()
7677

7778
UPLOAD_EVERY_N_BATCHES = config.process.upload_every_n_batches
78-
CLOUD = config.general.cloud # either gcp or aws
7979

8080
# Necessary to avoid "RuntimeError: receieved 0 items of ancdata". See:
8181
# https://discuss.pytorch.org/t/runtimeerror-received-0-items-of-ancdata/4999/2

scripts/validate_ml_data.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
maximum_batch_id_train,
4949
f"gs://{DST_TRAIN_PATH}",
5050
LOCAL_TEMP_PATH,
51-
cloud="gcp",
5251
configuration=config,
5352
),
5453
**dataloader_config,
@@ -60,7 +59,6 @@
6059
maximum_batch_id_train,
6160
f"gs://{DST_VALIDATION_PATH}",
6261
LOCAL_TEMP_PATH,
63-
cloud="gcp",
6462
configuration=config,
6563
),
6664
**dataloader_config,
@@ -71,7 +69,6 @@
7169
maximum_batch_id_train,
7270
f"gs://{DST_TEST_PATH}",
7371
LOCAL_TEMP_PATH,
74-
cloud="gcp",
7572
configuration=config,
7673
),
7774
**dataloader_config,

tests/config/nwp_size_test.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
general:
2-
cloud: gcp
32
description: example configuration
43
name: example
54
git: null

tests/config/test.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
general:
2-
cloud: gcp
32
description: example configuration
43
name: example
54
git: null

0 commit comments

Comments
 (0)