experimaestro 0.22.0__py2.py3-none-any.whl → 0.24.0__py2.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 experimaestro might be problematic. Click here for more details.
- experimaestro/__init__.py +7 -5
- experimaestro/__main__.py +3 -3
- experimaestro/commandline.py +0 -8
- experimaestro/core/objects.py +218 -164
- experimaestro/core/objects.pyi +25 -11
- experimaestro/core/serializers.py +52 -0
- experimaestro/core/types.py +44 -2
- experimaestro/generators.py +7 -6
- experimaestro/huggingface.py +2 -2
- experimaestro/launchers/__init__.py +19 -7
- experimaestro/scheduler/base.py +21 -3
- experimaestro/server/__init__.py +10 -2
- experimaestro/tests/test_identifier.py +33 -6
- experimaestro/tests/test_instance.py +18 -15
- experimaestro/tests/test_outputs.py +2 -40
- experimaestro/tests/test_progress.py +7 -9
- experimaestro/tests/test_serializers.py +54 -0
- experimaestro/utils/jobs.py +2 -2
- experimaestro/version.py +2 -2
- experimaestro/xpmutils.py +3 -3
- {experimaestro-0.22.0.dist-info → experimaestro-0.24.0.dist-info}/METADATA +26 -3
- {experimaestro-0.22.0.dist-info → experimaestro-0.24.0.dist-info}/RECORD +26 -25
- experimaestro/tests/test_serialization.py +0 -45
- {experimaestro-0.22.0.dist-info → experimaestro-0.24.0.dist-info}/LICENSE +0 -0
- {experimaestro-0.22.0.dist-info → experimaestro-0.24.0.dist-info}/WHEEL +0 -0
- {experimaestro-0.22.0.dist-info → experimaestro-0.24.0.dist-info}/entry_points.txt +0 -0
- {experimaestro-0.22.0.dist-info → experimaestro-0.24.0.dist-info}/top_level.txt +0 -0
experimaestro/__init__.py
CHANGED
|
@@ -44,22 +44,24 @@ from .core.objects import (
|
|
|
44
44
|
Config,
|
|
45
45
|
copyconfig,
|
|
46
46
|
setmeta,
|
|
47
|
-
|
|
47
|
+
ConfigWrapper,
|
|
48
|
+
ConfigWrapper as TaskOutput, # maintains compatibility
|
|
48
49
|
Task,
|
|
49
|
-
SerializedConfig,
|
|
50
|
-
Serialized,
|
|
51
50
|
)
|
|
51
|
+
from .core.serializers import SerializedConfig, PathBasedSerializedConfig
|
|
52
|
+
from .core.types import Any, SubmitHook, submit_hook_decorator
|
|
53
|
+
from .launchers import Launcher
|
|
52
54
|
from .scheduler.environment import Environment
|
|
53
55
|
from .scheduler.workspace import Workspace, RunMode
|
|
54
56
|
from .scheduler import Scheduler, experiment, FailedExperiment
|
|
55
57
|
from .notifications import progress, tqdm
|
|
56
|
-
from .core.types import Any
|
|
57
58
|
from .checkers import Choices
|
|
58
59
|
from .xpmutils import DirectoryContext
|
|
59
60
|
from .mkdocs.annotations import documentation
|
|
61
|
+
from .scheduler.base import Job
|
|
60
62
|
|
|
61
63
|
|
|
62
|
-
def set_launcher(launcher):
|
|
64
|
+
def set_launcher(launcher: Launcher):
|
|
63
65
|
Workspace.CURRENT.launcher = launcher
|
|
64
66
|
|
|
65
67
|
|
experimaestro/__main__.py
CHANGED
|
@@ -12,7 +12,7 @@ import subprocess
|
|
|
12
12
|
from termcolor import colored, cprint
|
|
13
13
|
|
|
14
14
|
import experimaestro
|
|
15
|
-
from experimaestro.core.objects import
|
|
15
|
+
from experimaestro.core.objects import ConfigWrapper
|
|
16
16
|
|
|
17
17
|
# --- Command line main options
|
|
18
18
|
logging.basicConfig(level=logging.INFO)
|
|
@@ -125,7 +125,7 @@ def diff(path: Path):
|
|
|
125
125
|
"""Show the reason of the identifier change for a job"""
|
|
126
126
|
from experimaestro.tools.jobs import load_job
|
|
127
127
|
from experimaestro import Config
|
|
128
|
-
from experimaestro.core.objects import
|
|
128
|
+
from experimaestro.core.objects import ConfigWalkContext
|
|
129
129
|
|
|
130
130
|
_, job = load_job(path / "params.json", discard_id=False)
|
|
131
131
|
_, new_job = load_job(path / "params.json")
|
|
@@ -142,7 +142,7 @@ def diff(path: Path):
|
|
|
142
142
|
if new_id != old_id:
|
|
143
143
|
print(f"{path} differ: {new_id} vs {old_id}")
|
|
144
144
|
|
|
145
|
-
if isinstance(value,
|
|
145
|
+
if isinstance(value, ConfigWrapper):
|
|
146
146
|
check(f"{path}.<task>", value.__xpm__.task, new_value.__xpm__.task)
|
|
147
147
|
else:
|
|
148
148
|
for arg in value.__xpmtype__.arguments.values():
|
experimaestro/commandline.py
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"""Command line jobs"""
|
|
2
2
|
|
|
3
|
-
from collections import ChainMap
|
|
4
3
|
import json
|
|
5
4
|
import io
|
|
6
5
|
from pathlib import Path
|
|
@@ -260,13 +259,6 @@ class CommandLineJob(Job):
|
|
|
260
259
|
|
|
261
260
|
return None
|
|
262
261
|
|
|
263
|
-
@property
|
|
264
|
-
def environ(self):
|
|
265
|
-
return ChainMap(
|
|
266
|
-
self.workspace.environment.environ,
|
|
267
|
-
self.launcher.environ if self.launcher else {},
|
|
268
|
-
)
|
|
269
|
-
|
|
270
262
|
@property
|
|
271
263
|
def notificationURL(self):
|
|
272
264
|
if self.launcher and self.launcher.notificationURL:
|