experimaestro 1.8.0rc0__py3-none-any.whl → 1.8.0rc2__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.

@@ -1,5 +1,10 @@
1
1
  from contextlib import contextmanager
2
- from pathlib import Path, UnsupportedOperation
2
+ from pathlib import Path
3
+
4
+ try:
5
+ from pathlib import UnsupportedOperation
6
+ except ImportError:
7
+ UnsupportedOperation = OSError
3
8
  import shutil
4
9
  from typing import List, Optional, Protocol, Set, Union
5
10
  import os
@@ -1,3 +1,4 @@
1
+ import datetime
1
2
  import importlib
2
3
  import inspect
3
4
  import json
@@ -292,7 +293,7 @@ def experiments_cli( # noqa: C901
292
293
  sys.exit(0)
293
294
 
294
295
  # Move to an object container
295
- configuration = OmegaConf.to_container(
296
+ xp_configuration: ConfigurationBase = OmegaConf.to_container(
296
297
  configuration, structured_config_mode=SCMode.INSTANTIATE
297
298
  )
298
299
 
@@ -301,11 +302,22 @@ def experiments_cli( # noqa: C901
301
302
 
302
303
  workdir = ws_env.path
303
304
 
304
- logging.info("Using working directory %s", str(workdir.resolve()))
305
+ # --- Sets up the experiment ID
305
306
 
306
307
  # --- Runs the experiment
308
+ if xp_configuration.add_timestamp:
309
+ timestamp = datetime.datetime.now().strftime("%Y%m%d-%H%M")
310
+ experiment_id = f"""{xp_configuration.id}-{timestamp}"""
311
+ else:
312
+ experiment_id = xp_configuration.id
313
+
314
+ logging.info(
315
+ "Running experiment %s working directory %s",
316
+ experiment_id,
317
+ str(workdir.resolve()),
318
+ )
307
319
  with experiment(
308
- ws_env, configuration.id, host=host, port=port, run_mode=run_mode
320
+ ws_env, experiment_id, host=host, port=port, run_mode=run_mode
309
321
  ) as xp:
310
322
  # Set up the environment
311
323
  # (1) global settings (2) workspace settings and (3) command line settings
@@ -318,7 +330,7 @@ def experiments_cli( # noqa: C901
318
330
  try:
319
331
  # Run the experiment
320
332
  helper.xp = xp
321
- helper.run(list(args), configuration)
333
+ helper.run(list(args), xp_configuration)
322
334
 
323
335
  # ... and wait
324
336
  xp.wait()
@@ -51,3 +51,6 @@ class ConfigurationBase:
51
51
 
52
52
  description: str = ""
53
53
  """Description of the experiment"""
54
+
55
+ add_timestamp: bool = False
56
+ """Adds a timestamp YYYY_MM_DD-HH_MM to the experiment ID"""
@@ -41,10 +41,10 @@ def test_experiment_history():
41
41
  task_a = TaskA().submit()
42
42
  TaskB(task_a=task_a, x=tag(1)).submit()
43
43
 
44
- # Look at the experiment
45
- xp = get_experiment("experiment", workdir=workdir)
44
+ # Look at the experiment
45
+ xp = get_experiment("experiment", workdir=workdir)
46
46
 
47
- (task_a_info,) = xp.get_jobs(TaskA)
48
- (task_b_info,) = xp.get_jobs(TaskB)
49
- assert task_b_info.tags == {"x": 1}
50
- assert task_b_info.depends_on == [task_a_info]
47
+ (task_a_info,) = xp.get_jobs(TaskA)
48
+ (task_b_info,) = xp.get_jobs(TaskB)
49
+ assert task_b_info.tags == {"x": 1}
50
+ assert task_b_info.depends_on == [task_a_info]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: experimaestro
3
- Version: 1.8.0rc0
3
+ Version: 1.8.0rc2
4
4
  Summary: "Experimaestro is a computer science experiment manager"
5
5
  License: GPL-3
6
6
  Keywords: experiment manager
@@ -13,7 +13,7 @@ experimaestro/connectors/local.py,sha256=348akOw69t7LgiTBMPG5McCg821I8qfR5GvYNU1
13
13
  experimaestro/connectors/ssh.py,sha256=5giqvv1y0QQKF-GI0IFUzI_Z5H8Bj9EuL_Szpvk899Q,8600
14
14
  experimaestro/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  experimaestro/core/arguments.py,sha256=7hpkU1f8LJ7JL8kQaD514h9CFSfMotYLsVfMsMmdpWk,6487
16
- experimaestro/core/context.py,sha256=sw2Z8ijnVHirhmbzluFixJaSC2ovS2yQ-F-3Fywh0R4,2516
16
+ experimaestro/core/context.py,sha256=41jvgudz4sgMDWrqOhPbgFRJHa3klWKvS3l_L661er0,2600
17
17
  experimaestro/core/objects.py,sha256=G0_PjcUPmbrQi8lxaxwdTq0dIw2cTCJUHduQ4XEbfFw,67362
18
18
  experimaestro/core/objects.pyi,sha256=NElf7J-1rL2l9Td6fQofRj-UQTtt7d0tlO7NUyewqYI,7283
19
19
  experimaestro/core/serialization.py,sha256=vYFbeNSgc7Icl9wgmnjZvESCehpfvlweyI_QyldA_CQ,3969
@@ -22,8 +22,8 @@ experimaestro/core/types.py,sha256=gSLv9F1HszVxI8jla6e-aVVS7q3KBwSzG1MImUHdGMg,2
22
22
  experimaestro/core/utils.py,sha256=JfC3qGUS9b6FUHc2VxIYUI9ysNpXSQ1LjOBkjfZ8n7o,495
23
23
  experimaestro/exceptions.py,sha256=cUy83WHM3GeynxmMk6QRr5xsnpqUAdAoc-m3KQVrE2o,44
24
24
  experimaestro/experiments/__init__.py,sha256=GcpDUIbCvhnv6rxFdAp4wTffCVNTv-InY6fbQAlTy-o,159
25
- experimaestro/experiments/cli.py,sha256=iQrUjY6mmJpT-tj-Ek1QPbzNs27x4jsKjciCMgaTKZw,9722
26
- experimaestro/experiments/configuration.py,sha256=cFDiUHnUGblJsctAUxAqx0jlM7_Ja_527lzk-4G-44k,1368
25
+ experimaestro/experiments/cli.py,sha256=4jTDzQWtrdm_ZgwdkVmz5WQX9RFVCqxZV5w1e7Yymhs,10085
26
+ experimaestro/experiments/configuration.py,sha256=vVm40BJW5sZNgSDZ0oBzX15jTO9rmOewVYrm0k9iXXY,1466
27
27
  experimaestro/generators.py,sha256=DQsEgdMwRUud9suWr-QGxI3vCO5sywP6MVGZWRNQXkk,1372
28
28
  experimaestro/huggingface.py,sha256=gnVlr6SZnbutYz4PLH0Q77n1TRF-uk-dR-3UFzFqAY0,2956
29
29
  experimaestro/ipc.py,sha256=Xn3tYME83jLEB0nFak3DwEIhpL5IRZpCl3jirBF_jl4,1570
@@ -117,7 +117,7 @@ experimaestro/tests/tasks/all.py,sha256=OMkHsWZkErCmTajiNO7hNhvnk9eKzJC-VatWgabW
117
117
  experimaestro/tests/tasks/foreign.py,sha256=uhXDOcWozkcm26ybbeEU9RElJpbhjC-zdzmlSKfPcdY,122
118
118
  experimaestro/tests/test_checkers.py,sha256=Kg5frDNRE3pvWVmmYzyk0tJFNO885KOrK48lSu-NlYA,403
119
119
  experimaestro/tests/test_dependencies.py,sha256=xfWrSkvjT45G4FSCL535m1huLT2ghmyW7kvP_XvvCJQ,2005
120
- experimaestro/tests/test_experiment.py,sha256=MXpVsWZpxINBianuTQ8vJ5iwmpIUq-GcS7YwSjLJUxM,1260
120
+ experimaestro/tests/test_experiment.py,sha256=maCpZIkufbS2MdJVQ3uWNklDq4VlPmi5SUegqAx4zp8,1284
121
121
  experimaestro/tests/test_findlauncher.py,sha256=8tjpR8bLMi6Gjs7KpY2t64izZso6bmY7vIivMflm-Bc,2965
122
122
  experimaestro/tests/test_forward.py,sha256=9y1zYm7hT_Lx5citxnK7n20cMZ2WJbsaEeY5irCZ9U4,735
123
123
  experimaestro/tests/test_identifier.py,sha256=L-r0S0dI9ErOZSmqGOPbbUZBvWJ-uzc3sijoyTPyMYU,13680
@@ -149,8 +149,8 @@ experimaestro/utils/jupyter.py,sha256=JcEo2yQK7x3Cr1tNl5FqGMZOICxCv9DwMvL5xsWdQP
149
149
  experimaestro/utils/resources.py,sha256=j-nvsTFwmgENMoVGOD2Ap-UD3WU85WkI0IgeSszMCX4,1328
150
150
  experimaestro/utils/settings.py,sha256=jpFMqF0DLL4_P1xGal0zVR5cOrdD8O0Y2IOYvnRgN3k,793
151
151
  experimaestro/xpmutils.py,sha256=S21eMbDYsHfvmZ1HmKpq5Pz5O-1HnCLYxKbyTBbASyQ,638
152
- experimaestro-1.8.0rc0.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
153
- experimaestro-1.8.0rc0.dist-info/METADATA,sha256=lIhCOBnO2j7MDVoEc5wNHw-rzUKcCkcR-y-yBFgx6vA,6162
154
- experimaestro-1.8.0rc0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
155
- experimaestro-1.8.0rc0.dist-info/entry_points.txt,sha256=TppTNiz5qm5xm1fhAcdLKdCLMrlL-eQggtCrCI00D9c,446
156
- experimaestro-1.8.0rc0.dist-info/RECORD,,
152
+ experimaestro-1.8.0rc2.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
153
+ experimaestro-1.8.0rc2.dist-info/METADATA,sha256=QyrGnbt0od9cdPTTl5KPzrma-Qlenbq4ZTnz7sUZQOY,6162
154
+ experimaestro-1.8.0rc2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
155
+ experimaestro-1.8.0rc2.dist-info/entry_points.txt,sha256=TppTNiz5qm5xm1fhAcdLKdCLMrlL-eQggtCrCI00D9c,446
156
+ experimaestro-1.8.0rc2.dist-info/RECORD,,