experimaestro 1.5.8__py3-none-any.whl → 1.5.10__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/cli/jobs.py +81 -71
- experimaestro/scheduler/base.py +1 -1
- {experimaestro-1.5.8.dist-info → experimaestro-1.5.10.dist-info}/METADATA +1 -1
- {experimaestro-1.5.8.dist-info → experimaestro-1.5.10.dist-info}/RECORD +7 -7
- {experimaestro-1.5.8.dist-info → experimaestro-1.5.10.dist-info}/LICENSE +0 -0
- {experimaestro-1.5.8.dist-info → experimaestro-1.5.10.dist-info}/WHEEL +0 -0
- {experimaestro-1.5.8.dist-info → experimaestro-1.5.10.dist-info}/entry_points.txt +0 -0
experimaestro/cli/jobs.py
CHANGED
|
@@ -50,90 +50,100 @@ def process(
|
|
|
50
50
|
perform=False,
|
|
51
51
|
fullpath=False,
|
|
52
52
|
):
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if experiment and p.name != experiment:
|
|
56
|
-
continue
|
|
53
|
+
from .filter import createFilter, JobInformation
|
|
54
|
+
from experimaestro.scheduler import JobState
|
|
57
55
|
|
|
58
|
-
|
|
59
|
-
from experimaestro.scheduler import JobState
|
|
56
|
+
_filter = createFilter(filter) if filter else lambda x: True
|
|
60
57
|
|
|
61
|
-
|
|
58
|
+
# Get all jobs from experiments
|
|
59
|
+
job2xp = {}
|
|
60
|
+
|
|
61
|
+
path = workspace.path
|
|
62
|
+
for p in (path / "xp").glob("*"):
|
|
63
|
+
for job in p.glob("jobs/*/*"):
|
|
64
|
+
job_path = job.resolve()
|
|
65
|
+
if job_path.is_dir():
|
|
66
|
+
*_, scriptname = job_path.parent.name.rsplit(".", 1)
|
|
67
|
+
job2xp.setdefault(scriptname, set()).add(p.name)
|
|
62
68
|
|
|
63
|
-
print(f"* Experiment {p.name}")
|
|
64
69
|
if (p / "jobs.bak").is_dir():
|
|
65
|
-
cprint(" Experiment has not finished yet", "red")
|
|
66
|
-
if not perform and (kill or clean):
|
|
70
|
+
cprint(f" Experiment {p.name} has not finished yet", "red")
|
|
71
|
+
if (not perform) and (kill or clean):
|
|
67
72
|
cprint(" Preventing kill/clean (use --force if you want to)", "yellow")
|
|
68
73
|
kill = False
|
|
69
74
|
clean = False
|
|
70
|
-
print()
|
|
71
75
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
)
|
|
76
|
+
# Now, process jobs
|
|
77
|
+
for job in path.glob("jobs/*/*"):
|
|
78
|
+
info = None
|
|
79
|
+
p = job.resolve()
|
|
80
|
+
if p.is_dir():
|
|
81
|
+
*_, scriptname = p.parent.name.rsplit(".", 1)
|
|
82
|
+
xps = job2xp.get(scriptname, set())
|
|
83
|
+
if experiment and experiment not in xps:
|
|
84
|
+
continue
|
|
82
85
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
elif info.state.running():
|
|
90
|
-
if kill:
|
|
91
|
-
if perform:
|
|
92
|
-
process = info.getprocess()
|
|
93
|
-
if process is None:
|
|
94
|
-
cprint(
|
|
95
|
-
"internal error – no process could be retrieved",
|
|
96
|
-
"red",
|
|
97
|
-
)
|
|
98
|
-
else:
|
|
99
|
-
cprint(f"KILLING {process}", "light_red")
|
|
100
|
-
process.kill()
|
|
101
|
-
else:
|
|
102
|
-
print("KILLING (not performing)", process)
|
|
103
|
-
print(
|
|
104
|
-
colored(f"{info.state.name:8}{job_path}", "yellow"),
|
|
105
|
-
end="",
|
|
106
|
-
)
|
|
107
|
-
elif info.state == JobState.DONE:
|
|
108
|
-
print(
|
|
109
|
-
colored(f"DONE {job_path}", "green"),
|
|
110
|
-
end="",
|
|
111
|
-
)
|
|
112
|
-
elif info.state == JobState.ERROR:
|
|
113
|
-
print(colored(f"FAIL {job_path}", "red"), end="")
|
|
114
|
-
else:
|
|
115
|
-
print(
|
|
116
|
-
colored(f"{info.state.name:8}{job_path}", "red"),
|
|
117
|
-
end="",
|
|
118
|
-
)
|
|
86
|
+
info = JobInformation(p, scriptname)
|
|
87
|
+
job_str = (
|
|
88
|
+
(str(job.resolve()) if fullpath else f"{job.parent.name}/{job.name}")
|
|
89
|
+
+ " "
|
|
90
|
+
+ ",".join(xps)
|
|
91
|
+
)
|
|
119
92
|
|
|
120
|
-
|
|
121
|
-
if not
|
|
93
|
+
if filter:
|
|
94
|
+
if not _filter(info):
|
|
122
95
|
continue
|
|
123
|
-
print(colored(f"READY {job_path}", "yellow"), end="")
|
|
124
96
|
|
|
125
|
-
if
|
|
126
|
-
print(f"
|
|
97
|
+
if info.state is None:
|
|
98
|
+
print(colored(f"NODIR {job_str}", "red"), end="")
|
|
99
|
+
elif info.state.running():
|
|
100
|
+
if kill:
|
|
101
|
+
if perform:
|
|
102
|
+
process = info.getprocess()
|
|
103
|
+
if process is None:
|
|
104
|
+
cprint(
|
|
105
|
+
"internal error – no process could be retrieved",
|
|
106
|
+
"red",
|
|
107
|
+
)
|
|
108
|
+
else:
|
|
109
|
+
cprint(f"KILLING {process}", "light_red")
|
|
110
|
+
process.kill()
|
|
111
|
+
else:
|
|
112
|
+
print("KILLING (not performing)", process)
|
|
113
|
+
print(
|
|
114
|
+
colored(f"{info.state.name:8}{job_str}", "yellow"),
|
|
115
|
+
end="",
|
|
116
|
+
)
|
|
117
|
+
elif info.state == JobState.DONE:
|
|
118
|
+
print(
|
|
119
|
+
colored(f"DONE {job_str}", "green"),
|
|
120
|
+
end="",
|
|
121
|
+
)
|
|
122
|
+
elif info.state == JobState.ERROR:
|
|
123
|
+
print(colored(f"FAIL {job_str}", "red"), end="")
|
|
124
|
+
else:
|
|
125
|
+
print(
|
|
126
|
+
colored(f"{info.state.name:8}{job_str}", "red"),
|
|
127
|
+
end="",
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
else:
|
|
131
|
+
if not ready:
|
|
132
|
+
continue
|
|
133
|
+
print(colored(f"READY {job_path}", "yellow"), end="")
|
|
134
|
+
|
|
135
|
+
if tags:
|
|
136
|
+
print(f""" {" ".join(f"{k}={v}" for k, v in info.tags.items())}""")
|
|
137
|
+
else:
|
|
138
|
+
print()
|
|
139
|
+
|
|
140
|
+
if clean and info.state and info.state.finished():
|
|
141
|
+
if perform:
|
|
142
|
+
cprint("Cleaning...", "red")
|
|
143
|
+
rmtree(p)
|
|
127
144
|
else:
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
if clean and info.state and info.state.finished():
|
|
131
|
-
if perform:
|
|
132
|
-
cprint("Cleaning...", "red")
|
|
133
|
-
rmtree(p)
|
|
134
|
-
else:
|
|
135
|
-
cprint("Cleaning... (not performed)", "red")
|
|
136
|
-
print()
|
|
145
|
+
cprint("Cleaning... (not performed)", "red")
|
|
146
|
+
print()
|
|
137
147
|
|
|
138
148
|
|
|
139
149
|
@click.option("--experiment", default=None, help="Restrict to this experiment")
|
experimaestro/scheduler/base.py
CHANGED
|
@@ -889,7 +889,7 @@ class experiment:
|
|
|
889
889
|
"""Shortcut to set the environment value"""
|
|
890
890
|
if override or name not in self.workspace.env:
|
|
891
891
|
logging.info("Setting environment: %s=%s", name, value)
|
|
892
|
-
self.
|
|
892
|
+
self.workspace.env[name] = value
|
|
893
893
|
|
|
894
894
|
def token(self, name: str, count: int):
|
|
895
895
|
"""Returns a token for this experiment
|
|
@@ -4,7 +4,7 @@ experimaestro/annotations.py,sha256=dcpFmo01T12S_y5nIBIQjiXsGsq5S80ZB-58o8tW9wA,
|
|
|
4
4
|
experimaestro/checkers.py,sha256=ZCMbnE_GFC5compWjt-fuHhPImi9fCPjImF8Ow9NqK8,696
|
|
5
5
|
experimaestro/cli/__init__.py,sha256=mzc-qqTFtZnFwCQl7IiwlYXEx08kLGwdntWayCerZ6E,9610
|
|
6
6
|
experimaestro/cli/filter.py,sha256=0jJrD_2cWydovjLO32vTFTK-TxXSs9P8Zxp5WaBF5AE,5790
|
|
7
|
-
experimaestro/cli/jobs.py,sha256=
|
|
7
|
+
experimaestro/cli/jobs.py,sha256=3cXo9-qNgtVG0ct5Kod082iXu2snczQsMss-AQvJjV0,7769
|
|
8
8
|
experimaestro/click.py,sha256=6BkeQHEgcxaxzq3xEvEEzwzuBj5-dkfrpOGikuA8L00,1377
|
|
9
9
|
experimaestro/commandline.py,sha256=NS1ubme8DTJtDS2uWwdHLQiZsl6TSK1LkNxu39c3-cw,9463
|
|
10
10
|
experimaestro/compat.py,sha256=dQqE2ZNHLM2wtdfp7fBRYMfC33qNehVf9J6FGRBUQhs,171
|
|
@@ -49,7 +49,7 @@ experimaestro/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
49
49
|
experimaestro/rpyc.py,sha256=ZRKol-3tVoeoUITLNFenLF4dhWBLW_FvSV_GvsypmeI,3605
|
|
50
50
|
experimaestro/run.py,sha256=NTFORDb_RlEK6tWKa7K-_2_bGCdHzzjBJVH5C1ReYtw,5222
|
|
51
51
|
experimaestro/scheduler/__init__.py,sha256=ERmmOxz_9mUkIuccNbzUa5Y6gVLLVDdyc4cCxbCCUbY,20
|
|
52
|
-
experimaestro/scheduler/base.py,sha256=
|
|
52
|
+
experimaestro/scheduler/base.py,sha256=XGq8kokNycba5D-KYKrNZ3WcXWKDUxusTkgR-X9S0E0,31941
|
|
53
53
|
experimaestro/scheduler/dependencies.py,sha256=n9XegwrmjayOIxt3xhuTEBVEBGSq4oeVdzz-FviDGXo,1994
|
|
54
54
|
experimaestro/scheduler/services.py,sha256=aCKkNZMULlceabqf-kOs_-C7KPINnjU3Q-I00o5x6iY,2189
|
|
55
55
|
experimaestro/scheduler/workspace.py,sha256=vyVbYZML28zvmgxfWc2PsKKHGlrAejY43UYlttbm9AU,2280
|
|
@@ -139,8 +139,8 @@ experimaestro/utils/jupyter.py,sha256=JcEo2yQK7x3Cr1tNl5FqGMZOICxCv9DwMvL5xsWdQP
|
|
|
139
139
|
experimaestro/utils/resources.py,sha256=MaCQL9dLfze3lwyuBVeWF7Ki5fFSE1F0BGWrfaaHi1I,1135
|
|
140
140
|
experimaestro/utils/settings.py,sha256=jpFMqF0DLL4_P1xGal0zVR5cOrdD8O0Y2IOYvnRgN3k,793
|
|
141
141
|
experimaestro/xpmutils.py,sha256=S21eMbDYsHfvmZ1HmKpq5Pz5O-1HnCLYxKbyTBbASyQ,638
|
|
142
|
-
experimaestro-1.5.
|
|
143
|
-
experimaestro-1.5.
|
|
144
|
-
experimaestro-1.5.
|
|
145
|
-
experimaestro-1.5.
|
|
146
|
-
experimaestro-1.5.
|
|
142
|
+
experimaestro-1.5.10.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
143
|
+
experimaestro-1.5.10.dist-info/METADATA,sha256=98TsVdWS-8gKbvEs29VSbqDjboe3FiI-ohOc58Y68n0,6266
|
|
144
|
+
experimaestro-1.5.10.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
145
|
+
experimaestro-1.5.10.dist-info/entry_points.txt,sha256=TppTNiz5qm5xm1fhAcdLKdCLMrlL-eQggtCrCI00D9c,446
|
|
146
|
+
experimaestro-1.5.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|