You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-22Lines changed: 15 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,8 +25,7 @@ pip install ".[dev]"
25
25
In order to run PVNet summation, we assume that you are already set up with
26
26
[PVNet](https://github.com/openclimatefix/pvnet) and have a trained PVNet model already available either locally or pushed to HuggingFace.
27
27
28
-
Before running any code, copy the example configuration to a
29
-
configs directory:
28
+
Before running any code, copy the example configuration to a configs directory:
30
29
31
30
```
32
31
cp -r configs.example configs
@@ -41,31 +40,26 @@ The datasets required are the same as documented in
41
40
data for the national sum i.e. GSP ID 0.
42
41
43
42
44
-
### Set up and config example for batch creation
45
-
46
-
47
-
The concurrent batches created in the step above will be augmented with a few additional pieces of
48
-
data required for the summation model. Within your copy of `PVNet_summation/configs` make sure you
49
-
have replaced all of the items marked with `PLACEHOLDER`
50
-
51
43
### Training PVNet_summation
52
44
53
45
How PVNet_summation is run is determined by the extensive configuration in the config files. The
54
-
configs stored in `PVNet/configs.example` should work with batches created using the steps and
55
-
batch creation config mentioned above.
46
+
configs stored in `configs.example`.
56
47
57
48
Make sure to update the following config files before training your model:
58
49
59
-
1. In `configs/datamodule/default.yaml`:
60
-
- update `batch_dir` to point to the directory you stored your concurrent batches in during
61
-
batch creation.
62
-
- update `gsp_zarr_path` to point to the PVLive data containing the national estimate
63
-
2. In `configs/model/default.yaml`:
64
-
- update the PVNet model for which you are training a summation model for. A new summation model
65
-
should be trained for each PVNet model
66
-
- update the hyperparameters and structure of the summation model
67
-
3. In `configs/trainer/default.yaml`:
68
-
- set `accelerator: 0` if running on a system without a supported GPU
50
+
51
+
1. At the very start of training we loop over all of the input samples and make predictions for them using PVNet. These predictions are saved to disk and will be loaded in the training loop for more efficient training. In `configs/config.yaml` update `sample_save_dir` to set where the predictions will be saved to.
52
+
53
+
2. In `configs/datamodule/default.yaml`:
54
+
- Update `pvnet_model.model_id` and `pvnet_model.revision` to point to the Huggingface commit or local directory where the exported PVNet model is.
55
+
- Update `configuration` to point to a data configuration compatible with the PVNet model whose outputs will be fed into the summation model.
56
+
- Set `train_period` and `val_period` to control the time ranges of the train and val period
57
+
- Optionally set `max_num_train_samples` and `max_num_val_samples` to limit the number of possible train and validation example which will be used.
58
+
59
+
3. In `configs/model/default.yaml`:
60
+
- Update the hyperparameters and structure of the summation model
61
+
4. In `configs/trainer/default.yaml`:
62
+
- Set `accelerator: 0` if running on a system without a supported GPU
69
63
70
64
71
65
Assuming you have updated the configs, you should now be able to run:
@@ -74,7 +68,6 @@ Assuming you have updated the configs, you should now be able to run:
74
68
python run.py
75
69
```
76
70
77
-
This will then use the pretrained PVNet model to run inference on the concurrent batches, the outputs from this inference will then be used as the training data for the summation model alongside the national PVLive data (GSP ID 0).
0 commit comments