experimaestro 2.0.0a5__tar.gz → 2.0.0a7__tar.gz

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.

Files changed (166) hide show
  1. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/PKG-INFO +1 -1
  2. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/pyproject.toml +2 -2
  3. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/core/identifier.py +10 -5
  4. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/core/objects/config.py +17 -169
  5. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/core/objects/config_walk.py +1 -5
  6. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/core/objects.pyi +2 -6
  7. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/core/serializers.py +1 -8
  8. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/test_dependencies.py +0 -6
  9. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/test_identifier.py +77 -66
  10. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/test_instance.py +0 -12
  11. experimaestro-2.0.0a7/src/experimaestro/tests/test_serializers.py +54 -0
  12. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/test_tasks.py +0 -20
  13. experimaestro-2.0.0a5/src/experimaestro/tests/test_serializers.py +0 -113
  14. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/LICENSE +0 -0
  15. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/README.md +0 -0
  16. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/__init__.py +0 -0
  17. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/__main__.py +0 -0
  18. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/annotations.py +0 -0
  19. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/checkers.py +0 -0
  20. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/cli/__init__.py +0 -0
  21. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/cli/filter.py +0 -0
  22. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/cli/jobs.py +0 -0
  23. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/cli/progress.py +0 -0
  24. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/click.py +0 -0
  25. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/commandline.py +0 -0
  26. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/compat.py +0 -0
  27. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/connectors/__init__.py +0 -0
  28. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/connectors/local.py +0 -0
  29. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/connectors/ssh.py +0 -0
  30. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/core/__init__.py +0 -0
  31. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/core/arguments.py +0 -0
  32. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/core/callbacks.py +0 -0
  33. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/core/context.py +0 -0
  34. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/core/objects/__init__.py +0 -0
  35. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/core/objects/config_utils.py +0 -0
  36. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/core/serialization.py +0 -0
  37. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/core/types.py +0 -0
  38. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/core/utils.py +0 -0
  39. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/exceptions.py +0 -0
  40. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/experiments/__init__.py +0 -0
  41. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/experiments/cli.py +0 -0
  42. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/experiments/configuration.py +0 -0
  43. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/generators.py +0 -0
  44. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/huggingface.py +0 -0
  45. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/ipc.py +0 -0
  46. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/launcherfinder/__init__.py +0 -0
  47. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/launcherfinder/base.py +0 -0
  48. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/launcherfinder/parser.py +0 -0
  49. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/launcherfinder/registry.py +0 -0
  50. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/launcherfinder/specs.py +0 -0
  51. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/launchers/__init__.py +0 -0
  52. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/launchers/direct.py +0 -0
  53. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/launchers/oar.py +0 -0
  54. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/launchers/slurm/__init__.py +0 -0
  55. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/launchers/slurm/base.py +0 -0
  56. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/locking.py +0 -0
  57. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/mkdocs/__init__.py +0 -0
  58. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/mkdocs/annotations.py +0 -0
  59. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/mkdocs/base.py +0 -0
  60. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/mkdocs/metaloader.py +0 -0
  61. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/mkdocs/style.css +0 -0
  62. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/mypy.py +0 -0
  63. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/notifications.py +0 -0
  64. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/progress.py +0 -0
  65. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/py.typed +0 -0
  66. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/rpyc.py +0 -0
  67. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/run.py +0 -0
  68. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/scheduler/__init__.py +0 -0
  69. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/scheduler/base.py +0 -0
  70. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/scheduler/dependencies.py +0 -0
  71. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/scheduler/dynamic_outputs.py +0 -0
  72. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/scheduler/experiment.py +0 -0
  73. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/scheduler/jobs.py +0 -0
  74. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/scheduler/services.py +0 -0
  75. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/scheduler/signal_handler.py +0 -0
  76. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/scheduler/state.py +0 -0
  77. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/scheduler/workspace.py +0 -0
  78. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/scriptbuilder.py +0 -0
  79. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/server/__init__.py +0 -0
  80. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/server/data/0c35d18bf06992036b69.woff2 +0 -0
  81. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/server/data/1815e00441357e01619e.ttf +0 -0
  82. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/server/data/219aa9140e099e6c72ed.woff2 +0 -0
  83. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/server/data/2463b90d9a316e4e5294.woff2 +0 -0
  84. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/server/data/2582b0e4bcf85eceead0.ttf +0 -0
  85. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/server/data/3a4004a46a653d4b2166.woff +0 -0
  86. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/server/data/3baa5b8f3469222b822d.woff +0 -0
  87. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/server/data/4d73cb90e394b34b7670.woff +0 -0
  88. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/server/data/4ef4218c522f1eb6b5b1.woff2 +0 -0
  89. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/server/data/5d681e2edae8c60630db.woff +0 -0
  90. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/server/data/6f420cf17cc0d7676fad.woff2 +0 -0
  91. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/server/data/89999bdf5d835c012025.woff2 +0 -0
  92. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/server/data/914997e1bdfc990d0897.ttf +0 -0
  93. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/server/data/c210719e60948b211a12.woff2 +0 -0
  94. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/server/data/c380809fd3677d7d6903.woff2 +0 -0
  95. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/server/data/f882956fd323fd322f31.woff +0 -0
  96. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/server/data/favicon.ico +0 -0
  97. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/server/data/index.css +0 -0
  98. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/server/data/index.css.map +0 -0
  99. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/server/data/index.html +0 -0
  100. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/server/data/index.js +0 -0
  101. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/server/data/index.js.map +0 -0
  102. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/server/data/login.html +0 -0
  103. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/server/data/manifest.json +0 -0
  104. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/settings.py +0 -0
  105. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/sphinx/__init__.py +0 -0
  106. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/sphinx/static/experimaestro.css +0 -0
  107. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/taskglobals.py +0 -0
  108. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/__init__.py +0 -0
  109. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/conftest.py +0 -0
  110. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/connectors/bin/executable.py +0 -0
  111. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/connectors/test_local.py +0 -0
  112. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/connectors/utils.py +0 -0
  113. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/core/__init__.py +0 -0
  114. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/core/test_generics.py +0 -0
  115. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/definitions_types.py +0 -0
  116. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/launchers/__init__.py +0 -0
  117. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/launchers/bin/sacct +0 -0
  118. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/launchers/bin/sbatch +0 -0
  119. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/launchers/bin/srun +0 -0
  120. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/launchers/bin/test.py +0 -0
  121. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/launchers/common.py +0 -0
  122. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/launchers/config_slurm/__init__.py +0 -0
  123. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/launchers/config_slurm/launchers.py +0 -0
  124. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/launchers/test_local.py +0 -0
  125. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/launchers/test_slurm.py +0 -0
  126. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/restart.py +0 -0
  127. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/restart_main.py +0 -0
  128. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/scripts/notifyandwait.py +0 -0
  129. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/scripts/waitforfile.py +0 -0
  130. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/task_tokens.py +0 -0
  131. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/tasks/__init__.py +0 -0
  132. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/tasks/all.py +0 -0
  133. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/tasks/foreign.py +0 -0
  134. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/test_checkers.py +0 -0
  135. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/test_experiment.py +0 -0
  136. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/test_file_progress.py +0 -0
  137. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/test_file_progress_integration.py +0 -0
  138. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/test_findlauncher.py +0 -0
  139. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/test_forward.py +0 -0
  140. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/test_generators.py +0 -0
  141. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/test_objects.py +0 -0
  142. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/test_outputs.py +0 -0
  143. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/test_param.py +0 -0
  144. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/test_progress.py +0 -0
  145. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/test_snippets.py +0 -0
  146. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/test_ssh.py +0 -0
  147. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/test_tags.py +0 -0
  148. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/test_tokens.py +0 -0
  149. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/test_types.py +0 -0
  150. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/test_validation.py +0 -0
  151. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/token_reschedule.py +0 -0
  152. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tests/utils.py +0 -0
  153. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tokens.py +0 -0
  154. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tools/__init__.py +0 -0
  155. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tools/diff.py +0 -0
  156. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tools/documentation.py +0 -0
  157. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/tools/jobs.py +0 -0
  158. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/typingutils.py +0 -0
  159. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/utils/__init__.py +0 -0
  160. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/utils/asyncio.py +0 -0
  161. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/utils/jobs.py +0 -0
  162. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/utils/jupyter.py +0 -0
  163. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/utils/multiprocessing.py +0 -0
  164. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/utils/resources.py +0 -0
  165. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/utils/settings.py +0 -0
  166. {experimaestro-2.0.0a5 → experimaestro-2.0.0a7}/src/experimaestro/xpmutils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: experimaestro
3
- Version: 2.0.0a5
3
+ Version: 2.0.0a7
4
4
  Summary: "Experimaestro is a computer science experiment manager"
5
5
  License: GPL-3
6
6
  License-File: LICENSE
@@ -48,7 +48,7 @@ dependencies = [
48
48
  "typing-extensions >=4.2; python_version < \"3.12\"",
49
49
  "watchdog >=2"
50
50
  ]
51
- version = "2.0.0-a5"
51
+ version = "2.0.0-a7"
52
52
 
53
53
  [tool.poetry-dynamic-versioning]
54
54
  enable = false
@@ -149,7 +149,7 @@ warn_unused_ignores = true
149
149
 
150
150
  [tool.commitizen]
151
151
  name = "cz_conventional_commits"
152
- version = "2.0.0a5"
152
+ version = "2.0.0a7"
153
153
  changelog_start_rev = "v1.0.0"
154
154
  tag_format = "v$major.$minor.$patch$prerelease"
155
155
  # update_changelog_on_bump = true
@@ -6,7 +6,7 @@ import logging
6
6
  import os
7
7
  import struct
8
8
  from typing import Optional
9
- from experimaestro.core.objects import Config
9
+ from experimaestro.core.objects import Config, ConfigMixin
10
10
 
11
11
 
12
12
  class ConfigPath:
@@ -116,7 +116,7 @@ class IdentifierComputer:
116
116
  CYCLE_REFERENCE = b"\x0b"
117
117
  INIT_TASKS = b"\x0c"
118
118
 
119
- def __init__(self, config: "Config", config_path: ConfigPath, *, version=None):
119
+ def __init__(self, config: "ConfigMixin", config_path: ConfigPath, *, version=None):
120
120
  # Hasher for parameters
121
121
  self._hasher = hashlib.sha256()
122
122
  self.config = config
@@ -183,7 +183,7 @@ class IdentifierComputer:
183
183
  self.update(value)
184
184
 
185
185
  # Handles configurations
186
- elif isinstance(value, Config):
186
+ elif isinstance(value, ConfigMixin):
187
187
  # Encodes the identifier
188
188
  self._hashupdate(IdentifierComputer.OBJECT_ID)
189
189
 
@@ -273,12 +273,17 @@ class IdentifierComputer:
273
273
  self._hashupdate(IdentifierComputer.NAME_ID)
274
274
  self.update(argvalue)
275
275
 
276
+ # Add init tasks
277
+ if value.__xpm__.init_tasks:
278
+ self._hashupdate(IdentifierComputer.INIT_TASKS)
279
+ for init_task in value.__xpm__.init_tasks:
280
+ self.update(init_task)
276
281
  else:
277
282
  raise NotImplementedError("Cannot compute hash of type %s" % type(value))
278
283
 
279
284
  @staticmethod
280
285
  def compute(
281
- config: "Config", config_path: ConfigPath | None = None, version=None
286
+ config: "ConfigMixin", config_path: ConfigPath | None = None, version=None
282
287
  ) -> Identifier:
283
288
  """Compute the identifier for a configuration
284
289
 
@@ -290,7 +295,7 @@ class IdentifierComputer:
290
295
  # Try to use the cached value first
291
296
  # (if there are no loops)
292
297
  if config.__xpm__._sealed:
293
- identifier = config.__xpm__._raw_identifier
298
+ identifier = config.__xpm__._identifier
294
299
  if identifier is not None and not identifier.has_loops:
295
300
  return identifier
296
301
 
@@ -9,7 +9,6 @@ from experimaestro import taskglobals
9
9
 
10
10
  from termcolor import cprint
11
11
  from pathlib import Path
12
- import hashlib
13
12
  import logging
14
13
  import io
15
14
  from enum import Enum
@@ -20,7 +19,6 @@ from typing import (
20
19
  Callable,
21
20
  ClassVar,
22
21
  Dict,
23
- Iterator,
24
22
  List,
25
23
  Optional,
26
24
  Set,
@@ -48,7 +46,6 @@ from .config_walk import ConfigWalk, ConfigWalkContext
48
46
  from .config_utils import (
49
47
  getqualattr,
50
48
  add_to_path,
51
- SealedError,
52
49
  TaggedValue,
53
50
  ObjectStore,
54
51
  classproperty,
@@ -148,9 +145,6 @@ class ConfigInformation:
148
145
  # This is used to check typevars coherence
149
146
  self.concrete_typevars: Dict[TypeVar, type] = {}
150
147
 
151
- # Lightweight tasks
152
- self.pre_tasks: List["LightweightTask"] = []
153
-
154
148
  # Initialization tasks
155
149
  self.init_tasks: List["LightweightTask"] = []
156
150
 
@@ -159,11 +153,8 @@ class ConfigInformation:
159
153
 
160
154
  # Cached information
161
155
 
162
- self._full_identifier = None
163
- """The full identifier (with pre-tasks)"""
164
-
165
- self._raw_identifier = None
166
- """The identifier without taking into account pre-tasks"""
156
+ self._identifier = None
157
+ """The configuration identifier (cached when sealed)"""
167
158
 
168
159
  self._validated = False
169
160
  self._sealed = False
@@ -366,10 +357,6 @@ class ConfigInformation:
366
357
  % (k, self.xpmtype, self._initinfo)
367
358
  )
368
359
 
369
- # Validate pre-tasks
370
- for pre_task in self.pre_tasks:
371
- pre_task.__xpm__.validate()
372
-
373
360
  # Validate init tasks
374
361
  for init_task in self.init_tasks:
375
362
  init_task.__xpm__.validate()
@@ -465,90 +452,29 @@ class ConfigInformation:
465
452
  context = ConfigWalkContext()
466
453
 
467
454
  class Unsealer(ConfigWalk):
468
- def preprocess(self, config: Config):
455
+ def preprocess(self, config: ConfigMixin):
469
456
  return config.__xpm__._sealed, config
470
457
 
471
- def postprocess(self, stub, config: Config, values):
458
+ def postprocess(self, stub, config: ConfigMixin, values):
472
459
  config.__xpm__._sealed = False
473
460
  config.__xpm__._identifier = None
474
461
 
475
462
  Unsealer(context, recurse_task=True)(self.pyobject)
476
463
 
477
- def collect_pre_tasks(self) -> Iterator["Config"]:
478
- context = ConfigWalkContext()
479
- pre_tasks: Dict[int, "Config"] = {}
480
-
481
- class PreTaskCollect(ConfigWalk):
482
- def preprocess(self, config: Config):
483
- # Do not cross tasks
484
- return not isinstance(config.__xpm__, Task), config
485
-
486
- def postprocess(self, stub, config: Config, values):
487
- pre_tasks.update(
488
- {id(pre_task): pre_task for pre_task in config.__xpm__.pre_tasks}
489
- )
490
-
491
- PreTaskCollect(context, recurse_task=True)(self.pyobject)
492
- return pre_tasks.values()
493
-
494
- def identifiers(self, only_raw: bool):
464
+ @property
465
+ def identifier(self):
495
466
  """Computes the unique identifier"""
496
- from ..identifier import IdentifierComputer, Identifier
497
-
498
- raw_identifier = self._raw_identifier
499
- full_identifier = self._full_identifier
467
+ from ..identifier import IdentifierComputer
500
468
 
501
469
  # Computes raw identifier if needed
502
- if raw_identifier is None or not self._sealed:
503
- # Get the main identifier
504
- raw_identifier = IdentifierComputer.compute(self.pyobject)
505
- if self._sealed:
506
- self._raw_identifier = raw_identifier
507
-
508
- if only_raw:
509
- return raw_identifier, full_identifier
510
-
511
- # OK, let's compute the full identifier
512
- if full_identifier is None or not self._sealed:
513
- # Compute the full identifier by including the pre-tasks
514
- hasher = hashlib.sha256()
515
- hasher.update(raw_identifier.all)
516
- pre_tasks_ids = [
517
- pre_task.__xpm__.raw_identifier.all
518
- for pre_task in self.collect_pre_tasks()
519
- ]
520
- for task_id in sorted(pre_tasks_ids):
521
- hasher.update(task_id)
522
-
523
- # Adds init tasks
524
- if self.init_tasks:
525
- hasher.update(IdentifierComputer.INIT_TASKS)
526
- for init_task in self.init_tasks:
527
- hasher.update(init_task.__xpm__.raw_identifier.all)
528
-
529
- full_identifier = Identifier(hasher.digest())
530
- full_identifier.has_loops = raw_identifier.has_loops
531
-
532
- # Only cache the identifier if sealed
533
- if self._sealed:
534
- self._full_identifier = full_identifier
535
-
536
- return raw_identifier, full_identifier
537
-
538
- @property
539
- def raw_identifier(self) -> "Identifier":
540
- """Computes the unique identifier (without task modifiers)"""
541
- raw_identifier, _ = self.identifiers(True)
542
- return raw_identifier
543
-
544
- @property
545
- def full_identifier(self) -> "Identifier":
546
- """Computes the unique identifier (with task modifiers)"""
547
- _, full_identifier = self.identifiers(False)
548
- return full_identifier
470
+ if self._identifier is not None:
471
+ return self._identifier
549
472
 
550
- identifier = full_identifier
551
- """Deprecated: use full_identifier"""
473
+ # Get the main identifier
474
+ identifier = IdentifierComputer.compute(self.pyobject)
475
+ if self._sealed:
476
+ self._identifier = identifier
477
+ return identifier
552
478
 
553
479
  def dependency(self):
554
480
  """Returns a dependency"""
@@ -563,12 +489,6 @@ class ConfigInformation:
563
489
  path: List[str],
564
490
  taskids: Set[int],
565
491
  ):
566
- # Add pre-tasks
567
- for pre_task in self.pre_tasks:
568
- pre_task.__xpm__.updatedependencies(
569
- dependencies, path + ["__pre_tasks__"], taskids
570
- )
571
-
572
492
  # Add initialization tasks
573
493
  for init_task in self.init_tasks:
574
494
  init_task.__xpm__.updatedependencies(
@@ -841,9 +761,6 @@ class ConfigInformation:
841
761
  if self.task is not None and self.task is not self:
842
762
  ConfigInformation.__collect_objects__(self.task, objects, context)
843
763
 
844
- # Serialize pre-tasks
845
- ConfigInformation.__collect_objects__(self.pre_tasks, objects, context)
846
-
847
764
  # Serialize initialization tasks
848
765
  ConfigInformation.__collect_objects__(self.init_tasks, objects, context)
849
766
 
@@ -857,8 +774,6 @@ class ConfigInformation:
857
774
  }
858
775
 
859
776
  # Add pre/init tasks
860
- if self.pre_tasks:
861
- state_dict["pre-tasks"] = [id(pre_task) for pre_task in self.pre_tasks]
862
777
  if self.init_tasks:
863
778
  state_dict["init-tasks"] = [id(init_task) for init_task in self.init_tasks]
864
779
 
@@ -1191,12 +1106,6 @@ class ConfigInformation:
1191
1106
  o.__post_init__()
1192
1107
 
1193
1108
  else:
1194
- # Sets pre-tasks
1195
- o.__xpm__.pre_tasks = [
1196
- objects[pre_task_id]
1197
- for pre_task_id in definition.get("pre-tasks", [])
1198
- ]
1199
-
1200
1109
  if task_id := definition.get("task", None):
1201
1110
  o.__xpm__.task = objects[task_id]
1202
1111
 
@@ -1230,15 +1139,6 @@ class ConfigInformation:
1230
1139
 
1231
1140
  # Run pre-task (or returns them)
1232
1141
  if as_instance or return_tasks:
1233
- # Collect pre-tasks (just once)
1234
- completed_pretasks = set()
1235
- pre_tasks = []
1236
- for definition in definitions:
1237
- for pre_task_id in definition.get("pre-tasks", []):
1238
- if pre_task_id not in completed_pretasks:
1239
- completed_pretasks.add(pre_task_id)
1240
- pre_tasks.append(objects[pre_task_id])
1241
-
1242
1142
  # Collect init tasks
1243
1143
  init_tasks = []
1244
1144
  for init_task_id in definitions[-1].get("init-tasks", []):
@@ -1246,14 +1146,11 @@ class ConfigInformation:
1246
1146
  init_tasks.append(init_task)
1247
1147
 
1248
1148
  if as_instance:
1249
- for pre_task in pre_tasks:
1250
- logger.info("Executing pre-task %s", type(pre_task))
1251
- pre_task.execute()
1252
1149
  for init_task in init_tasks:
1253
1150
  logger.info("Executing init task %s", type(init_task))
1254
1151
  init_task.execute()
1255
1152
  else:
1256
- return o, pre_tasks, pre_task + init_tasks
1153
+ return o, init_tasks
1257
1154
 
1258
1155
  return o
1259
1156
 
@@ -1261,7 +1158,6 @@ class ConfigInformation:
1261
1158
  def __init__(self, context: ConfigWalkContext, *, objects: ObjectStore = None):
1262
1159
  super().__init__(context)
1263
1160
  self.objects = ObjectStore() if objects is None else objects
1264
- self.pre_tasks = {}
1265
1161
 
1266
1162
  def preprocess(self, config: "Config"):
1267
1163
  if self.objects.is_constructed(id(config)):
@@ -1288,10 +1184,6 @@ class ConfigInformation:
1288
1184
  # Call __post_init__
1289
1185
  stub.__post_init__()
1290
1186
 
1291
- # Gather pre-tasks
1292
- for pre_task in config.__xpm__.pre_tasks:
1293
- self.pre_tasks[id(pre_task)] = self.stub(pre_task)
1294
-
1295
1187
  self.objects.set_constructed(id(config))
1296
1188
  return stub
1297
1189
 
@@ -1305,10 +1197,6 @@ class ConfigInformation:
1305
1197
  processor = ConfigInformation.FromPython(context, objects=objects)
1306
1198
  last_object = processor(self.pyobject)
1307
1199
 
1308
- # Execute pre-tasks
1309
- for pre_task in processor.pre_tasks.values():
1310
- pre_task.execute()
1311
-
1312
1200
  return last_object
1313
1201
 
1314
1202
  def add_dependencies(self, *dependencies):
@@ -1509,32 +1397,7 @@ class ConfigMixin:
1509
1397
  attributes)"""
1510
1398
  return clone(self)
1511
1399
 
1512
- def add_pretasks(self, *tasks: "LightweightTask"):
1513
- assert all(
1514
- [isinstance(task, ConfigMixin) for task in tasks]
1515
- ), "One of the parameters is not a configuration object"
1516
- assert all(
1517
- [isinstance(task, LightweightTask) for task in tasks]
1518
- ), "One of the pre-tasks are not lightweight tasks"
1519
- if self.__xpm__._sealed:
1520
- raise SealedError("Cannot add pre-tasks to a sealed configuration")
1521
- self.__xpm__.pre_tasks.extend(tasks)
1522
- return self
1523
-
1524
- def add_pretasks_from(self, *configs: "Config"):
1525
- assert all(
1526
- [isinstance(config, ConfigMixin) for config in configs]
1527
- ), "One of the parameters is not a configuration object"
1528
- for config in configs:
1529
- self.add_pretasks(*config.__xpm__.pre_tasks)
1530
- return self
1531
-
1532
- @property
1533
- def pre_tasks(self) -> List["LightweightTask"]:
1534
- """Access pre-tasks"""
1535
- return self.__xpm__.pre_tasks
1536
-
1537
- def copy_dependencies(self, other: "Config"):
1400
+ def copy_dependencies(self, other: "ConfigMixin"):
1538
1401
  """Add all the dependencies from other configuration"""
1539
1402
 
1540
1403
  # Add task dependency
@@ -1598,17 +1461,7 @@ class Config:
1598
1461
  return self.__xpm__.__json__()
1599
1462
 
1600
1463
  def __identifier__(self) -> "Identifier":
1601
- return self.__xpm__.full_identifier
1602
-
1603
- def add_pretasks(self, *tasks: "LightweightTask"):
1604
- """Add pre-tasks"""
1605
- raise AssertionError("This method can only be used during configuration")
1606
-
1607
- def add_pretasks_from(self, *configs: "Config"):
1608
- """Add pre-tasks from the listed configurations"""
1609
- raise AssertionError(
1610
- "The 'add_pretasks_from' can only be used during configuration"
1611
- )
1464
+ return self.__xpm__.identifier
1612
1465
 
1613
1466
  def copy_dependencies(self, other: "Config"):
1614
1467
  """Add pre-tasks from the listed configurations"""
@@ -1616,11 +1469,6 @@ class Config:
1616
1469
  "The 'copy_dependencies' method can only be used during configuration"
1617
1470
  )
1618
1471
 
1619
- @property
1620
- def pre_tasks(self) -> List["LightweightTask"]:
1621
- """Access pre-tasks"""
1622
- raise AssertionError("Pre-tasks can be accessed only during configuration")
1623
-
1624
1472
  def register_task_output(self, method, *args, **kwargs):
1625
1473
  # Determine the path for this...
1626
1474
  path = taskglobals.Env.instance().xpm_path / "task-outputs.jsonl"
@@ -109,11 +109,7 @@ class ConfigWalk:
109
109
  else:
110
110
  result[arg.name] = None
111
111
 
112
- # Deals with pre-tasks
113
- if info.pre_tasks:
114
- with self.map("__pre_tasks__"):
115
- self(info.pre_tasks)
116
-
112
+ # Deals with init tasks
117
113
  if info.init_tasks:
118
114
  with self.map("__init_tasks__"):
119
115
  self(info.init_tasks)
@@ -168,7 +168,7 @@ class ConfigMixin:
168
168
  *,
169
169
  workspace: Incomplete | None = ...,
170
170
  launcher: Incomplete | None = ...,
171
- run_mode: RunMode = ...
171
+ run_mode: RunMode = ...,
172
172
  ): ...
173
173
  def stdout(self): ...
174
174
  def stderr(self): ...
@@ -195,11 +195,7 @@ class Config:
195
195
  def __post_init__(self) -> None: ...
196
196
  def __json__(self): ...
197
197
  def __identifier__(self) -> Identifier: ...
198
- def add_pretasks(self, *tasks: "LightweightTask"): ...
199
- def add_pretasks_from(self, configs: "Config"): ...
200
198
  def copy_dependencies(self, other: "Config"): ...
201
- @property
202
- def pre_tasks(self) -> List["LightweightTask"]: ...
203
199
 
204
200
  class LightweightTask(Config):
205
201
  def execute(self) -> None: ...
@@ -213,7 +209,7 @@ class Task(LightweightTask):
213
209
  workspace: Incomplete | None = ...,
214
210
  launcher: Incomplete | None = ...,
215
211
  run_mode: RunMode = ...,
216
- init_tasks: List["LightweightTask"] = []
212
+ init_tasks: List["LightweightTask"] = [],
217
213
  ): ...
218
214
  def task_outputs(self, dep: Callable[[Config], None]) -> Any: ...
219
215
 
@@ -1,10 +1,8 @@
1
- from typing import List, TypeVar, Callable, Any
2
- from pathlib import Path
1
+ from typing import List, TypeVar
3
2
  from experimaestro import Param
4
3
 
5
4
  from .objects import Config, LightweightTask
6
5
  from .arguments import DataPath
7
- from experimaestro import copyconfig
8
6
 
9
7
 
10
8
  class SerializationLWTask(LightweightTask):
@@ -39,8 +37,3 @@ class PathSerializationLWTask(SerializationLWTask):
39
37
 
40
38
  path: DataPath
41
39
  """Path containing the data"""
42
-
43
- @classmethod
44
- def construct(cls, value: T, path: Path, dep: Callable[[Config], Any]) -> T:
45
- value = copyconfig(value)
46
- return value.add_pretasks(dep(cls(value=value, path=path)))
@@ -85,9 +85,3 @@ def test_dependencies_inner_task_output(xp):
85
85
  a = task_a.submit()
86
86
  b = Inner_TaskB.C(param_a=a).submit()
87
87
  check_dependencies(b, task_a)
88
-
89
-
90
- def test_dependencies_pre_task(xp):
91
- a = TaskA.C().submit()
92
- a2 = TaskA.C().add_pretasks(a).submit()
93
- check_dependencies(a2, a)