PVNet 5.1.0__py3-none-any.whl → 5.1.2__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.
pvnet/utils.py CHANGED
@@ -21,7 +21,6 @@ FULL_CONFIG_NAME = "full_experiment_config.yaml"
21
21
  MODEL_CARD_NAME = "README.md"
22
22
 
23
23
 
24
-
25
24
  def run_config_utilities(config: DictConfig) -> None:
26
25
  """A couple of optional utilities.
27
26
 
@@ -155,3 +154,16 @@ def validate_batch_against_config(
155
154
  )
156
155
 
157
156
  logger.info("Batch shape validation successful!")
157
+
158
+
159
+ def validate_gpu_config(config: DictConfig) -> None:
160
+ """Abort if multiple GPUs requested by mistake i.e. `devices: 2` instead of `[2]`."""
161
+ tr = config.get("trainer", {})
162
+ dev = tr.get("devices")
163
+
164
+ if isinstance(dev, int) and dev > 1:
165
+ raise ValueError(
166
+ f"Detected `devices: {dev}` — this requests {dev} GPUs. "
167
+ "If you meant a specific GPU (e.g. GPU 2), use `devices: [2]`. "
168
+ "Parallel training not supported."
169
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PVNet
3
- Version: 5.1.0
3
+ Version: 5.1.2
4
4
  Summary: PVNet
5
5
  Author-email: Peter Dudfield <info@openclimatefix.org>
6
6
  Requires-Python: >=3.11
@@ -2,7 +2,7 @@ pvnet/__init__.py,sha256=TAZm88TJ5ieL1XjEyRg1LciIGuSScEucdAruQLfM92I,25
2
2
  pvnet/datamodule.py,sha256=1qWYoRaxIvewnQJZ3GYz3zveQ7BT92XAT9vHqpLci0I,6356
3
3
  pvnet/load_model.py,sha256=P1QODX_mJRnKZ_kIll9BlOjK_A1W4YM3QG-mZd-2Mcc,3852
4
4
  pvnet/optimizers.py,sha256=1N4b-Xd6QiIrcUU8cbU326bbFC0BvMNIV8VYWtGILJc,6548
5
- pvnet/utils.py,sha256=iHG0wlN_cITKXpR16w54fs2R68wkX7vy3a_6f4SuanY,5414
5
+ pvnet/utils.py,sha256=6hVKQN8F89pJbiC9VSuHCm5yJqzIzs7hLF3ztkBU-TY,5895
6
6
  pvnet/models/__init__.py,sha256=owzZ9xkD0DRTT51mT2Dx_p96oJjwDz57xo_MaMIEosk,145
7
7
  pvnet/models/base_model.py,sha256=CnQaaf2kAdOcXqo1319nWa120mHfLQiwOQ639m4OzPk,16182
8
8
  pvnet/models/ensemble.py,sha256=1mFUEsl33kWcLL5d7zfDm9ypWxgAxBHgBiJLt0vwTeg,2363
@@ -22,8 +22,8 @@ pvnet/training/__init__.py,sha256=FKxmPZ59Vuj5_mXomN4saJ3En5M-aDMxSs6OttTQOcg,49
22
22
  pvnet/training/lightning_module.py,sha256=ByWv4m1QSUUYq2DNCqWCWqEBcXF5gEQ1g__8J6lOseo,12944
23
23
  pvnet/training/plots.py,sha256=4xID7TBA4IazaARaCN5AoG5fFPJF1wIprn0y6I0C31c,2469
24
24
  pvnet/training/train.py,sha256=Sry2wYgggUmtIB-k_umFts7xMr2roEL76NCu9ySbLUY,4107
25
- pvnet-5.1.0.dist-info/licenses/LICENSE,sha256=tKUnlSmcLBWMJWkHx3UjZGdrjs9LidGwLo0jsBUBAwU,1077
26
- pvnet-5.1.0.dist-info/METADATA,sha256=z6FYYQvVaGLUO4WvFicGQtnUxK0md2bBym1fFMxpCPg,16474
27
- pvnet-5.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
28
- pvnet-5.1.0.dist-info/top_level.txt,sha256=4mg6WjeW05SR7pg3-Q4JRE2yAoutHYpspOsiUzYVNv0,6
29
- pvnet-5.1.0.dist-info/RECORD,,
25
+ pvnet-5.1.2.dist-info/licenses/LICENSE,sha256=tKUnlSmcLBWMJWkHx3UjZGdrjs9LidGwLo0jsBUBAwU,1077
26
+ pvnet-5.1.2.dist-info/METADATA,sha256=nofuj7f-6ddgrNggYQmrdG3gw15QDfga0smKjclr5IE,16474
27
+ pvnet-5.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
28
+ pvnet-5.1.2.dist-info/top_level.txt,sha256=4mg6WjeW05SR7pg3-Q4JRE2yAoutHYpspOsiUzYVNv0,6
29
+ pvnet-5.1.2.dist-info/RECORD,,
File without changes