nshtrainer 0.5.0__py3-none-any.whl → 0.5.1__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.
nshtrainer/runner.py
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import copy
|
|
2
2
|
import functools
|
|
3
|
-
from collections.abc import
|
|
3
|
+
from collections.abc import Mapping, Sequence
|
|
4
4
|
from typing import Generic
|
|
5
5
|
|
|
6
|
-
from nshrunner import RunInfo
|
|
6
|
+
from nshrunner import RunInfo, RunList, TransformFn
|
|
7
7
|
from nshrunner import Runner as _Runner
|
|
8
|
-
from nshrunner.
|
|
8
|
+
from nshrunner.snapshot import SnapshotArgType
|
|
9
9
|
from typing_extensions import TypeVar, TypeVarTuple, Unpack, override
|
|
10
10
|
|
|
11
11
|
from .model.config import BaseConfig
|
|
@@ -46,14 +46,11 @@ class Runner(
|
|
|
46
46
|
|
|
47
47
|
def fast_dev_run(
|
|
48
48
|
self,
|
|
49
|
-
runs:
|
|
49
|
+
runs: RunList[TConfig, Unpack[TArguments]],
|
|
50
50
|
n_batches: int = 1,
|
|
51
51
|
*,
|
|
52
52
|
env: Mapping[str, str] | None = None,
|
|
53
|
-
transforms: list[
|
|
54
|
-
Callable[[TConfig, Unpack[TArguments]], tuple[TConfig, Unpack[TArguments]]]
|
|
55
|
-
]
|
|
56
|
-
| None = None,
|
|
53
|
+
transforms: list[TransformFn[TConfig, Unpack[TArguments]]] | None = None,
|
|
57
54
|
):
|
|
58
55
|
transforms = transforms or []
|
|
59
56
|
transforms.append(
|
|
@@ -67,14 +64,11 @@ class Runner(
|
|
|
67
64
|
|
|
68
65
|
def fast_dev_run_generator(
|
|
69
66
|
self,
|
|
70
|
-
runs:
|
|
67
|
+
runs: RunList[TConfig, Unpack[TArguments]],
|
|
71
68
|
n_batches: int = 1,
|
|
72
69
|
*,
|
|
73
70
|
env: Mapping[str, str] | None = None,
|
|
74
|
-
transforms: list[
|
|
75
|
-
Callable[[TConfig, Unpack[TArguments]], tuple[TConfig, Unpack[TArguments]]]
|
|
76
|
-
]
|
|
77
|
-
| None = None,
|
|
71
|
+
transforms: list[TransformFn[TConfig, Unpack[TArguments]]] | None = None,
|
|
78
72
|
):
|
|
79
73
|
transforms = transforms or []
|
|
80
74
|
transforms.append(
|
|
@@ -88,16 +82,13 @@ class Runner(
|
|
|
88
82
|
|
|
89
83
|
def fast_dev_run_session(
|
|
90
84
|
self,
|
|
91
|
-
runs:
|
|
85
|
+
runs: RunList[TConfig, Unpack[TArguments]],
|
|
92
86
|
n_batches: int = 1,
|
|
93
87
|
*,
|
|
94
88
|
snapshot: SnapshotArgType,
|
|
95
89
|
setup_commands: Sequence[str] | None = None,
|
|
96
90
|
env: Mapping[str, str] | None = None,
|
|
97
|
-
transforms: list[
|
|
98
|
-
Callable[[TConfig, Unpack[TArguments]], tuple[TConfig, Unpack[TArguments]]]
|
|
99
|
-
]
|
|
100
|
-
| None = None,
|
|
91
|
+
transforms: list[TransformFn[TConfig, Unpack[TArguments]]] | None = None,
|
|
101
92
|
activate_venv: bool = True,
|
|
102
93
|
session_name: str = "nshrunner",
|
|
103
94
|
attach: bool = True,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: nshtrainer
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.1
|
|
4
4
|
Summary:
|
|
5
5
|
Author: Nima Shoghi
|
|
6
6
|
Author-email: nimashoghi@gmail.com
|
|
@@ -13,7 +13,7 @@ Requires-Dist: lightning
|
|
|
13
13
|
Requires-Dist: lovely-numpy (>=0.2.13,<0.3.0)
|
|
14
14
|
Requires-Dist: lovely-tensors (>=0.1.16,<0.2.0)
|
|
15
15
|
Requires-Dist: nshconfig (>=0.2.0,<0.3.0)
|
|
16
|
-
Requires-Dist: nshrunner (>=0.6.
|
|
16
|
+
Requires-Dist: nshrunner (>=0.6.1,<0.7.0)
|
|
17
17
|
Requires-Dist: nshutils (>=0.3.0,<0.4.0)
|
|
18
18
|
Requires-Dist: numpy
|
|
19
19
|
Requires-Dist: pytorch-lightning
|
|
@@ -47,7 +47,7 @@ nshtrainer/nn/module_dict.py,sha256=NOY0B6WDTnktyWH4GthsprMQo0bpehC-hCq9SfD8paE,
|
|
|
47
47
|
nshtrainer/nn/module_list.py,sha256=fb2u5Rqdjff8Pekyr9hkCPkBorQ-fldzzFAjsgWAm30,1719
|
|
48
48
|
nshtrainer/nn/nonlinearity.py,sha256=owtU4kh4G98psD0axOJWVfBhm-OtJVgFM-TXSHmbNPU,3625
|
|
49
49
|
nshtrainer/optimizer.py,sha256=kuJEA1pvB3y1FcsfhAoOJujVqEZqFHlmYO8GW6JeA1g,1527
|
|
50
|
-
nshtrainer/runner.py,sha256=
|
|
50
|
+
nshtrainer/runner.py,sha256=lBTx7eccoHezRie2GNh9iIJNnjPDV3bsH26wgKQQTqk,3554
|
|
51
51
|
nshtrainer/scripts/check_env.py,sha256=IMl6dSqsLYppI0XuCsVq8lK4bYqXwY9KHJkzsShz4Kg,806
|
|
52
52
|
nshtrainer/scripts/find_packages.py,sha256=FbdlfmAefttFSMfaT0A46a-oHLP_ioaQKihwBfBeWeA,1467
|
|
53
53
|
nshtrainer/trainer/__init__.py,sha256=P2rmr8oBVTHk-HJHYPcUwWqDEArMbPR4_rPpATbWK3E,40
|
|
@@ -59,6 +59,6 @@ nshtrainer/util/seed.py,sha256=HEXgVs-wldByahOysKwq7506OHxdYTEgmP-tDQVAEkQ,287
|
|
|
59
59
|
nshtrainer/util/slurm.py,sha256=rofIU26z3SdL79SF45tNez6juou1cyDLz07oXEZb9Hg,1566
|
|
60
60
|
nshtrainer/util/typed.py,sha256=NGuDkDzFlc1fAoaXjOFZVbmj0mRFjsQi1E_hPa7Bn5U,128
|
|
61
61
|
nshtrainer/util/typing_utils.py,sha256=8ptjSSLZxlmy4FY6lzzkoGoF5fGNClo8-B_c0XHQaNU,385
|
|
62
|
-
nshtrainer-0.5.
|
|
63
|
-
nshtrainer-0.5.
|
|
64
|
-
nshtrainer-0.5.
|
|
62
|
+
nshtrainer-0.5.1.dist-info/METADATA,sha256=ajSyujR9GqfArDI-JfMem74Qae_mQTJpR1quQ2MD4pk,812
|
|
63
|
+
nshtrainer-0.5.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
64
|
+
nshtrainer-0.5.1.dist-info/RECORD,,
|
|
File without changes
|