jayrun 0.2.0__tar.gz → 0.3.0__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.
Files changed (290) hide show
  1. jayrun-0.3.0/CHANGELOG.md +109 -0
  2. jayrun-0.3.0/MANIFEST.in +24 -0
  3. jayrun-0.3.0/PKG-INFO +171 -0
  4. jayrun-0.3.0/README.md +138 -0
  5. jayrun-0.3.0/jayrun/__init__.py +59 -0
  6. jayrun-0.3.0/jayrun/authority.py +46 -0
  7. jayrun-0.3.0/jayrun/context.py +109 -0
  8. jayrun-0.3.0/jayrun/core/artifact/context.py +197 -0
  9. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/artifact/field.py +3 -2
  10. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/artifact/properties.py +9 -1
  11. jayrun-0.3.0/jayrun/core/config/context.py +358 -0
  12. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/config/field.py +8 -20
  13. jayrun-0.3.0/jayrun/core/config/values.py +63 -0
  14. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/context/base.py +13 -0
  15. jayrun-0.3.0/jayrun/core/graph/_identity.py +159 -0
  16. jayrun-0.3.0/jayrun/core/graph/_specifier_compat.py +120 -0
  17. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/graph/artifact_flow.py +59 -21
  18. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/graph/compiled_graph.py +3 -0
  19. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/graph/definition/__init__.py +2 -0
  20. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/graph/definition/artifact.py +5 -1
  21. jayrun-0.3.0/jayrun/core/graph/definition/serializer.py +16 -0
  22. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/graph/graph_definition.py +347 -63
  23. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/graph/graph_layout.py +29 -2
  24. jayrun-0.3.0/jayrun/core/graph/graph_registry.py +201 -0
  25. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/graph/graph_specification.py +120 -21
  26. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/graph/inspection/artifact.py +20 -0
  27. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/graph/inspection/graph.py +35 -17
  28. jayrun-0.3.0/jayrun/core/graph/inspection/registry.py +188 -0
  29. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/graph/inspection/requirement.py +23 -3
  30. jayrun-0.3.0/jayrun/core/graph/inspection/resource.py +114 -0
  31. jayrun-0.3.0/jayrun/core/graph/inspection/serializer.py +76 -0
  32. jayrun-0.3.0/jayrun/core/graph/registry/config.py +16 -0
  33. jayrun-0.3.0/jayrun/core/graph/reporting.py +291 -0
  34. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/graph/requirements.py +4 -12
  35. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/operator/base.py +19 -4
  36. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/resource/base.py +11 -2
  37. jayrun-0.3.0/jayrun/core/serializer/__init__.py +3 -0
  38. jayrun-0.3.0/jayrun/core/serializer/base.py +62 -0
  39. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/validation/__init__.py +2 -4
  40. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/validation/graph.py +30 -2
  41. jayrun-0.3.0/jayrun/core/validation/plotting.py +7 -0
  42. jayrun-0.2.0/jayrun/core/validation/validator.py → jayrun-0.3.0/jayrun/core/validation/validation.py +21 -28
  43. jayrun-0.3.0/jayrun/dashboard/__init__.py +4 -0
  44. jayrun-0.3.0/jayrun/dashboard/_client.py +682 -0
  45. jayrun-0.3.0/jayrun/dashboard/_evidence.py +281 -0
  46. jayrun-0.3.0/jayrun/dashboard/_graph.py +122 -0
  47. jayrun-0.3.0/jayrun/dashboard/_history.py +383 -0
  48. jayrun-0.3.0/jayrun/dashboard/_location.py +23 -0
  49. jayrun-0.3.0/jayrun/dashboard/_observation.py +206 -0
  50. jayrun-0.3.0/jayrun/dashboard/_page.py +9 -0
  51. jayrun-0.3.0/jayrun/dashboard/_service.py +602 -0
  52. jayrun-0.3.0/jayrun/dashboard/_style.py +4 -0
  53. jayrun-0.3.0/jayrun/dashboard/_workspace.py +792 -0
  54. jayrun-0.3.0/jayrun/engine/_capture_values.py +201 -0
  55. jayrun-0.3.0/jayrun/engine/_history.py +711 -0
  56. jayrun-0.3.0/jayrun/engine/_timing.py +225 -0
  57. jayrun-0.3.0/jayrun/engine/api.py +460 -0
  58. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/artifact/result.py +3 -3
  59. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/artifact/store.py +22 -5
  60. jayrun-0.3.0/jayrun/engine/base/runtime_module.py +35 -0
  61. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/context/context_manager.py +50 -6
  62. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/context/context_outcome.py +2 -2
  63. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/context/execution_context.py +134 -15
  64. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/context/execution_proxy.py +3 -0
  65. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/context/execution_session.py +33 -1
  66. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/context_run.py +138 -59
  67. jayrun-0.3.0/jayrun/engine/coordinator/coordinator.py +343 -0
  68. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/coordinator/message_queue.py +17 -5
  69. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/coordinator/runtime_loop.py +11 -4
  70. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/execution/async_executor.py +30 -8
  71. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/execution/executor_manager.py +27 -12
  72. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/execution/thread_executor.py +1 -0
  73. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/gateway/engine_gateway.py +7 -0
  74. jayrun-0.3.0/jayrun/engine/history_budget.py +76 -0
  75. jayrun-0.3.0/jayrun/engine/interfaces/base.py +42 -0
  76. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/interfaces/context.py +11 -19
  77. jayrun-0.3.0/jayrun/engine/interfaces/context_record.py +142 -0
  78. jayrun-0.3.0/jayrun/engine/interfaces/runtime.py +251 -0
  79. jayrun-0.3.0/jayrun/engine/interfaces/services/accesses.py +44 -0
  80. jayrun-0.3.0/jayrun/engine/interfaces/services/context.py +35 -0
  81. jayrun-0.3.0/jayrun/engine/interfaces/services/control.py +83 -0
  82. jayrun-0.3.0/jayrun/engine/interfaces/services/storage.py +188 -0
  83. jayrun-0.3.0/jayrun/engine/limits.py +16 -0
  84. jayrun-0.3.0/jayrun/engine/messages/capability.py +5 -0
  85. jayrun-0.3.0/jayrun/engine/messages/commands/abort_context.py +8 -0
  86. jayrun-0.3.0/jayrun/engine/messages/commands/apply_snapshot.py +14 -0
  87. jayrun-0.3.0/jayrun/engine/messages/commands/pause_context.py +11 -0
  88. jayrun-0.3.0/jayrun/engine/messages/commands/reconcile_contexts.py +8 -0
  89. jayrun-0.3.0/jayrun/engine/messages/commands/record_context.py +9 -0
  90. jayrun-0.3.0/jayrun/engine/messages/commands/resume_context.py +8 -0
  91. jayrun-0.3.0/jayrun/engine/messages/commands/retrieve_session.py +8 -0
  92. jayrun-0.3.0/jayrun/engine/messages/commands/shutdown_runtime.py +8 -0
  93. jayrun-0.3.0/jayrun/engine/messages/commands/start_context.py +8 -0
  94. jayrun-0.3.0/jayrun/engine/messages/commands/stop_context.py +8 -0
  95. jayrun-0.3.0/jayrun/engine/messages/commands/transfer_context.py +9 -0
  96. jayrun-0.3.0/jayrun/engine/messages/events/context_admitted.py +8 -0
  97. jayrun-0.3.0/jayrun/engine/messages/events/context_registered.py +9 -0
  98. jayrun-0.3.0/jayrun/engine/messages/events/context_terminated.py +10 -0
  99. jayrun-0.3.0/jayrun/engine/messages/events/runtime_idle.py +8 -0
  100. jayrun-0.2.0/jayrun/engine/registry/identities.py → jayrun-0.3.0/jayrun/engine/messages/origin.py +7 -17
  101. jayrun-0.3.0/jayrun/engine/messages/runtime_message.py +37 -0
  102. jayrun-0.3.0/jayrun/engine/messages/runtime_messenger.py +566 -0
  103. jayrun-0.3.0/jayrun/engine/observation.py +422 -0
  104. jayrun-0.3.0/jayrun/engine/pressure.py +37 -0
  105. jayrun-0.3.0/jayrun/engine/progress.py +560 -0
  106. jayrun-0.3.0/jayrun/engine/progress_history.py +546 -0
  107. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/recorders/artifact/recorder.py +14 -2
  108. jayrun-0.3.0/jayrun/engine/recorders/context/recorder.py +129 -0
  109. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/recorders/context/report.py +5 -2
  110. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/recorders/execution/recorder.py +25 -1
  111. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/recorders/execution/records.py +8 -1
  112. jayrun-0.3.0/jayrun/engine/registry/context_id_generator.py +10 -0
  113. jayrun-0.3.0/jayrun/engine/registry/context_instance.py +1288 -0
  114. jayrun-0.3.0/jayrun/engine/registry/context_state.py +71 -0
  115. jayrun-0.3.0/jayrun/engine/registry/context_status.py +198 -0
  116. jayrun-0.3.0/jayrun/engine/registry/runtime_registry.py +2500 -0
  117. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/resource/placement_controller.py +41 -15
  118. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/resource/resource_manager.py +2 -1
  119. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/runtime.py +39 -5
  120. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/scheduler/context.py +27 -29
  121. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/scheduler/memory.py +6 -0
  122. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/settings/__init__.py +4 -2
  123. jayrun-0.3.0/jayrun/engine/settings/_instrumentation.py +42 -0
  124. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/settings/combined_context.py +18 -6
  125. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/settings/context.py +31 -20
  126. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/settings/engine.py +61 -13
  127. jayrun-0.3.0/jayrun/engine/snapshot.py +168 -0
  128. jayrun-0.3.0/jayrun/engine/submission.py +247 -0
  129. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/supervisor.py +214 -88
  130. jayrun-0.3.0/jayrun/engine/terminal_history.py +180 -0
  131. jayrun-0.3.0/jayrun/inspection.py +42 -0
  132. jayrun-0.3.0/jayrun/persistence/__init__.py +25 -0
  133. jayrun-0.3.0/jayrun/persistence/_database.py +1114 -0
  134. jayrun-0.3.0/jayrun/persistence/_sqlite.py +832 -0
  135. jayrun-0.3.0/jayrun/persistence/backend.py +283 -0
  136. jayrun-0.3.0/jayrun/persistence/errors.py +31 -0
  137. jayrun-0.3.0/jayrun/persistence/legacy.py +381 -0
  138. jayrun-0.3.0/jayrun/persistence/policy.py +96 -0
  139. jayrun-0.3.0/jayrun/persistence/records.py +449 -0
  140. jayrun-0.3.0/jayrun/persistence/values.py +465 -0
  141. jayrun-0.3.0/jayrun/registry.py +17 -0
  142. jayrun-0.3.0/jayrun/reporting/__init__.py +1 -0
  143. jayrun-0.3.0/jayrun/reporting/_completed.py +360 -0
  144. jayrun-0.3.0/jayrun/reporting/_history.py +159 -0
  145. jayrun-0.3.0/jayrun/serialization.py +157 -0
  146. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/settings.py +4 -2
  147. jayrun-0.3.0/jayrun/validation.py +33 -0
  148. jayrun-0.3.0/jayrun/visualization/__init__.py +5 -0
  149. jayrun-0.3.0/jayrun/visualization/_copy.js +31 -0
  150. jayrun-0.3.0/jayrun/visualization/_facade.py +23 -0
  151. jayrun-0.3.0/jayrun/visualization/_help/__init__.py +10 -0
  152. jayrun-0.3.0/jayrun/visualization/_help/content.js +111 -0
  153. jayrun-0.3.0/jayrun/visualization/_help/controller.js +208 -0
  154. jayrun-0.3.0/jayrun/visualization/_help/style.css +11 -0
  155. jayrun-0.3.0/jayrun/visualization/_legacy.py +103 -0
  156. jayrun-0.3.0/jayrun/visualization/_run.js +137 -0
  157. jayrun-0.3.0/jayrun/visualization/_segments.py +44 -0
  158. jayrun-0.3.0/jayrun/visualization/_theme.css +36 -0
  159. jayrun-0.3.0/jayrun/visualization/_workspace.css +298 -0
  160. jayrun-0.3.0/jayrun/visualization/_workspace.js +233 -0
  161. jayrun-0.3.0/jayrun/visualization/_workspace.py +22 -0
  162. jayrun-0.3.0/jayrun/visualization/adapters/__init__.py +1 -0
  163. jayrun-0.3.0/jayrun/visualization/adapters/_legacy_history.py +102 -0
  164. jayrun-0.3.0/jayrun/visualization/adapters/_requirements.py +54 -0
  165. jayrun-0.3.0/jayrun/visualization/adapters/completed.py +64 -0
  166. jayrun-0.3.0/jayrun/visualization/adapters/definition.py +622 -0
  167. jayrun-0.3.0/jayrun/visualization/adapters/history.py +105 -0
  168. jayrun-0.3.0/jayrun/visualization/adapters/live.py +13 -0
  169. jayrun-0.3.0/jayrun/visualization/adapters/registry.py +49 -0
  170. jayrun-0.3.0/jayrun/visualization/colors.py +11 -0
  171. jayrun-0.3.0/jayrun/visualization/contract.py +412 -0
  172. jayrun-0.3.0/jayrun/visualization/layout.py +300 -0
  173. jayrun-0.3.0/jayrun/visualization/renderer.py +120 -0
  174. jayrun-0.3.0/jayrun/visualization/viewer.css +642 -0
  175. jayrun-0.3.0/jayrun/visualization/viewer.js +1364 -0
  176. jayrun-0.3.0/jayrun.egg-info/PKG-INFO +171 -0
  177. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun.egg-info/SOURCES.txt +88 -6
  178. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun.egg-info/requires.txt +1 -2
  179. {jayrun-0.2.0 → jayrun-0.3.0}/pyproject.toml +6 -3
  180. jayrun-0.2.0/MANIFEST.in +0 -7
  181. jayrun-0.2.0/PKG-INFO +0 -157
  182. jayrun-0.2.0/README.md +0 -123
  183. jayrun-0.2.0/jayrun/__init__.py +0 -32
  184. jayrun-0.2.0/jayrun/context.py +0 -16
  185. jayrun-0.2.0/jayrun/core/artifact/context.py +0 -161
  186. jayrun-0.2.0/jayrun/core/config/context.py +0 -248
  187. jayrun-0.2.0/jayrun/core/graph/registry/config.py +0 -7
  188. jayrun-0.2.0/jayrun/core/validation/plotting.py +0 -222
  189. jayrun-0.2.0/jayrun/core/validation/reporting.py +0 -57
  190. jayrun-0.2.0/jayrun/engine/api.py +0 -258
  191. jayrun-0.2.0/jayrun/engine/base/runtime_module.py +0 -21
  192. jayrun-0.2.0/jayrun/engine/coordinator/coordinator.py +0 -191
  193. jayrun-0.2.0/jayrun/engine/interfaces/base.py +0 -59
  194. jayrun-0.2.0/jayrun/engine/interfaces/runtime.py +0 -64
  195. jayrun-0.2.0/jayrun/engine/interfaces/services/accesses.py +0 -22
  196. jayrun-0.2.0/jayrun/engine/interfaces/services/context.py +0 -32
  197. jayrun-0.2.0/jayrun/engine/interfaces/services/control.py +0 -48
  198. jayrun-0.2.0/jayrun/engine/interfaces/services/storage.py +0 -29
  199. jayrun-0.2.0/jayrun/engine/interfaces/value_record.py +0 -26
  200. jayrun-0.2.0/jayrun/engine/messages/commands/abort_context.py +0 -14
  201. jayrun-0.2.0/jayrun/engine/messages/commands/pause_context.py +0 -27
  202. jayrun-0.2.0/jayrun/engine/messages/commands/reconcile_contexts.py +0 -10
  203. jayrun-0.2.0/jayrun/engine/messages/commands/resume_context.py +0 -14
  204. jayrun-0.2.0/jayrun/engine/messages/commands/retrieve_session.py +0 -20
  205. jayrun-0.2.0/jayrun/engine/messages/commands/shutdown_runtime.py +0 -15
  206. jayrun-0.2.0/jayrun/engine/messages/commands/start_context.py +0 -18
  207. jayrun-0.2.0/jayrun/engine/messages/commands/stop_context.py +0 -14
  208. jayrun-0.2.0/jayrun/engine/messages/commands/store_value.py +0 -19
  209. jayrun-0.2.0/jayrun/engine/messages/events/context_admitted.py +0 -20
  210. jayrun-0.2.0/jayrun/engine/messages/events/context_registered.py +0 -30
  211. jayrun-0.2.0/jayrun/engine/messages/events/context_terminated.py +0 -25
  212. jayrun-0.2.0/jayrun/engine/messages/events/runtime_idle.py +0 -14
  213. jayrun-0.2.0/jayrun/engine/messages/runtime_message.py +0 -43
  214. jayrun-0.2.0/jayrun/engine/messages/runtime_messenger.py +0 -83
  215. jayrun-0.2.0/jayrun/engine/recorders/context/recorder.py +0 -77
  216. jayrun-0.2.0/jayrun/engine/registry/context_id_generator.py +0 -9
  217. jayrun-0.2.0/jayrun/engine/registry/context_instance.py +0 -637
  218. jayrun-0.2.0/jayrun/engine/registry/context_state.py +0 -52
  219. jayrun-0.2.0/jayrun/engine/registry/context_status.py +0 -116
  220. jayrun-0.2.0/jayrun/engine/registry/runtime_registry.py +0 -692
  221. jayrun-0.2.0/jayrun/validation.py +0 -5
  222. jayrun-0.2.0/jayrun.egg-info/PKG-INFO +0 -157
  223. {jayrun-0.2.0 → jayrun-0.3.0}/LICENSE +0 -0
  224. {jayrun-0.2.0 → jayrun-0.3.0}/NOTICE +0 -0
  225. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/artifact/base.py +0 -0
  226. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/base/error.py +0 -0
  227. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/context/runtime_data.py +0 -0
  228. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/declaration/field.py +0 -0
  229. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/graph/definition/data.py +0 -0
  230. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/graph/definition/field.py +0 -0
  231. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/graph/definition/requirement.py +0 -0
  232. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/graph/graph_component.py +0 -0
  233. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/graph/graph_state.py +0 -0
  234. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/graph/inspection/field.py +0 -0
  235. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/graph/operator_reference.py +0 -0
  236. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/graph/registry/__init__.py +0 -0
  237. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/graph/registry/artifact.py +0 -0
  238. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/graph/registry/data.py +0 -0
  239. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/graph/registry/field.py +0 -0
  240. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/graph/registry/resource.py +0 -0
  241. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/resource/context.py +0 -0
  242. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/resource/field.py +0 -0
  243. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/core/validation/artifact.py +0 -0
  244. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/artifact/__init__.py +0 -0
  245. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/artifact/actor.py +0 -0
  246. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/artifact/state.py +0 -0
  247. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/context/execution_state.py +0 -0
  248. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/context/execution_step.py +0 -0
  249. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/context/execution_tracker.py +0 -0
  250. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/context/resource_key.py +0 -0
  251. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/context/step_reference.py +0 -0
  252. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/coordinator/__init__.py +0 -0
  253. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/coordinator/batch_size_estimator.py +0 -0
  254. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/coordinator/state.py +0 -0
  255. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/coordinator/timeout_estimator.py +0 -0
  256. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/engine_state.py +0 -0
  257. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/execution/execution_mode.py +0 -0
  258. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/interfaces/execution.py +0 -0
  259. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/interfaces/placement.py +0 -0
  260. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/messages/__init__.py +0 -0
  261. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/messages/commands/__init__.py +0 -0
  262. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/messages/events/__init__.py +0 -0
  263. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/recorders/__init__.py +0 -0
  264. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/recorders/artifact/__init__.py +0 -0
  265. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/recorders/artifact/artifact_state.py +0 -0
  266. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/recorders/artifact/debug_recorder.py +0 -0
  267. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/recorders/artifact/production_recorder.py +0 -0
  268. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/recorders/artifact/record.py +0 -0
  269. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/recorders/artifact/state.py +0 -0
  270. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/recorders/context/__init__.py +0 -0
  271. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/recorders/context/debug_recorder.py +0 -0
  272. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/recorders/context/production_recorder.py +0 -0
  273. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/recorders/context/state.py +0 -0
  274. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/recorders/execution/__init__.py +0 -0
  275. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/recorders/execution/debug_recorder.py +0 -0
  276. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/recorders/execution/production_recorder.py +0 -0
  277. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/recorders/execution/state.py +0 -0
  278. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/registry/__init__.py +0 -0
  279. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/resource/__init__.py +0 -0
  280. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/resource/cached_resource.py +0 -0
  281. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/resource/device_allocator.py +0 -0
  282. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/resource/placement.py +0 -0
  283. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/resource/placement_request.py +0 -0
  284. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/engine/resource/resource_state.py +0 -0
  285. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/placement.py +0 -0
  286. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/properties.py +0 -0
  287. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun/py.typed +0 -0
  288. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun.egg-info/dependency_links.txt +0 -0
  289. {jayrun-0.2.0 → jayrun-0.3.0}/jayrun.egg-info/top_level.txt +0 -0
  290. {jayrun-0.2.0 → jayrun-0.3.0}/setup.cfg +0 -0
@@ -0,0 +1,109 @@
1
+ # Changelog
2
+
3
+ All notable changes to Jayrun are documented in this file.
4
+
5
+ Release notes describe new capabilities, compatibility changes and fixes.
6
+
7
+ ## [0.3.0] - 2026-09-28
8
+
9
+ ### Added
10
+
11
+ - SQLite-backed execution/session history, bounded retention, explicit flush and
12
+ scoped historical readers through `jayrun.persistence`.
13
+ - Portable configuration and ContextRecord codecs through `jayrun.serialization`.
14
+ - Public inspection, report and lifecycle types organized into documented facades.
15
+ - Interactive definition, registry and completed-run viewers, plus a dashboard
16
+ with consistent themes and an offline documentation preview.
17
+ - A rebuilt manual, runnable examples and seven application tutorials with
18
+ matching Python sources and notebooks.
19
+
20
+ ### Changed
21
+
22
+ - Graphs require explicit `graph.confirm()` after binding resources and serializers.
23
+ Confirmation validates and freezes preparation; invalid graphs remain inspectable.
24
+ - Submit with `engine.submit(graph, artifacts, configs, settings=...)`. ArtifactContext
25
+ and ConfigContext are value builders rather than graph-bound submission wrappers.
26
+ - One `EngineSettings.failure_mode` governs execution and owned persistence.
27
+ Standalone Database operations remain strict; use explicit flush to check settlement.
28
+ - Configuration accepts bounded immutable built-in values; use a string such as
29
+ `"float32"` instead of a Python/library object such as `torch.float32`.
30
+ - Settings are keyword-only. RecordingMode, engine_id, unfinished_contexts and
31
+ database methods with an `_async` suffix use consistent terminology.
32
+ - `ArtifactPolicy(retained_artifacts=None)` retains eligible exits, `()` retains
33
+ none, and a tuple selects declared exits. Retention does not cap total process RSS.
34
+ - Strengthened operator-output handling, failure-reference cleanup and lifecycle
35
+ qualification. Simplified public imports and updated all published examples.
36
+
37
+ ### Compatibility
38
+
39
+ 0.3.0 includes breaking changes from 0.2.0. For example:
40
+
41
+ ```python
42
+ # 0.2: graph-bound builders, inferred graph at submission
43
+ artifacts = ArtifactContext(graph=graph)
44
+ configs = ConfigContext(graph=graph)
45
+ run = engine.submit(artifacts, configs)
46
+
47
+ # 0.3: prepare explicitly, then submit the graph and value builders
48
+ # Bind required resources/serializers before confirming.
49
+ graph.confirm()
50
+ artifacts = ArtifactContext({source: value})
51
+ configs = ConfigContext({operator.factor: 3})
52
+ run = engine.submit(graph, artifacts, configs)
53
+ ```
54
+
55
+ Replace `ArtifactContext.clear_entries()` with `clear()`. Builder validation occurs
56
+ at submission; retired no-argument builder `validate()` methods and public compiled
57
+ plan/layout access are removed. BaseOperator construction is unchanged. Component
58
+ identity versions remain independent of the package version.
59
+
60
+ History is bounded diagnostic evidence, not automatic application checkpointing or
61
+ an exactly-once event archive. Concurrency, placement and cooperative shutdown retain
62
+ their documented limits. See the [current manual](https://jayrun.readthedocs.io/en/latest/)
63
+ for supported imports, complete examples and operational limits.
64
+
65
+ ## [0.2.0] - 2026-09-01
66
+
67
+ ### Added
68
+
69
+ - Added `ContextRun`, a stable object for observing and controlling one submitted context throughout its lifecycle.
70
+ - Added synchronous and asynchronous waiting through `ContextRun.wait()`, `ContextRun.wait_async()`, `Engine.wait()`, and `Engine.wait_async()`; a run can also be awaited directly.
71
+ - Added terminal artifact access through `ContextRun.artifact()` and terminal reporting through `ContextRun.report`.
72
+ - Added context-scoped stored-value access through `ContextRun.get_value()`, `get_values()`, `get_value_record()`, and `get_value_records()`.
73
+ - Added graph-scoped supervision with `Engine.submit(..., supervises=...)`. Supervisors see only runs belonging to the exact graph objects they are authorized to supervise.
74
+ - Added authorized runtime identities and a serialized messaging path for lifecycle control and context storage across thread boundaries.
75
+ - Added continuous-integration checks and stricter automated documentation builds.
76
+
77
+ ### Changed
78
+
79
+ - `Engine.submit()` now returns a `ContextRun` and accepts graph-bound `ArtifactContext` and `ConfigContext` objects as the submission boundary.
80
+ - Unified external and in-graph supervision around the same `ContextRun` observation, waiting, and control API.
81
+ - Unified pause, resume, stop-iteration, abort, and store requests through the runtime messaging system.
82
+ - Completed runs are released from the engine registry while existing `ContextRun` objects remain usable for reports, retained artifacts, and stored values.
83
+ - Clarified lifecycle terminology: `stop()` prevents another graph iteration, while `abort()` prevents further dispatch and drains accepted work.
84
+ - Strengthened context finalization, executor cleanup, placement reconciliation, and graceful and forced shutdown behavior.
85
+ - Expanded public docstrings and generated the API Reference from the documented public API.
86
+ - Revised the explanatory documentation and tutorials to use the stabilized context lifecycle and supervision APIs.
87
+
88
+ ### Removed
89
+
90
+ - Removed the public `ContextSnapshot` workflow in favor of the single live-to-terminal `ContextRun` abstraction.
91
+ - Removed legacy split context result and status pathways superseded by `ContextRun`.
92
+
93
+ ## [0.1.0] - 2026-08-28
94
+
95
+ ### Added
96
+
97
+ - Initial public release.
98
+ - Artifact-centric computational graphs with explicit configuration and artifact contexts.
99
+ - Iterative graph execution and repeated operator execution.
100
+ - Synchronous and asynchronous operators.
101
+ - Shared resource lifecycle management.
102
+ - CPU, GPU, and multi-device placement reservations.
103
+ - Graph validation, inspection, and interactive plotting.
104
+ - Context supervision, failure handling, and coordinated shutdown.
105
+
106
+ [0.2.0]: https://github.com/jayrun-project/jayrun/compare/v0.1.0...v0.2.0
107
+ [0.1.0]: https://github.com/jayrun-project/jayrun/releases/tag/v0.1.0
108
+
109
+ [0.3.0]: https://github.com/jayrun-project/jayrun/compare/v0.2.0...v0.3.0
@@ -0,0 +1,24 @@
1
+ include LICENSE
2
+ include NOTICE
3
+ include CHANGELOG.md
4
+ include README.md
5
+ prune docs
6
+ prune examples
7
+ prune tests
8
+ global-exclude __pycache__ *.py[cod] .DS_Store
9
+
10
+ prune _tests
11
+ prune _examples
12
+ prune _previews
13
+ prune _audits
14
+ prune _evidence
15
+ prune _benchmarks
16
+ prune _project_history
17
+ prune legacy_remote_automation
18
+
19
+ prune tutorials
20
+ prune _legacy_remote_automation
21
+ prune _screenshot
22
+ prune graphify-out
23
+ prune .github
24
+ exclude AGENTS.md reply.txt
jayrun-0.3.0/PKG-INFO ADDED
@@ -0,0 +1,171 @@
1
+ Metadata-Version: 2.4
2
+ Name: jayrun
3
+ Version: 0.3.0
4
+ Summary: Artifact-centric execution for iterative graphs, shared resources, and placement-aware workloads
5
+ Author: Masoud Yavari
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/jayrun-project/jayrun
8
+ Project-URL: Documentation, https://jayrun.readthedocs.io/
9
+ Project-URL: Repository, https://github.com/jayrun-project/jayrun
10
+ Project-URL: Issues, https://github.com/jayrun-project/jayrun/issues
11
+ Keywords: artifacts,dag,execution,orchestration,resources,scheduling,workflow
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
23
+ Classifier: Typing :: Typed
24
+ Requires-Python: >=3.11
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ License-File: NOTICE
28
+ Requires-Dist: packaging>=25
29
+ Provides-Extra: yaml
30
+ Requires-Dist: PyYAML>=6.0; extra == "yaml"
31
+ Provides-Extra: plotting
32
+ Dynamic: license-file
33
+
34
+ # Jayrun
35
+
36
+ [![PyPI version](https://img.shields.io/pypi/v/jayrun.svg)](https://pypi.org/project/jayrun/)
37
+ [![Python](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/)
38
+ [![Documentation](https://github.com/jayrun-project/jayrun/actions/workflows/docs.yml/badge.svg)](https://github.com/jayrun-project/jayrun/actions/workflows/docs.yml)
39
+ [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://github.com/jayrun-project/jayrun/blob/main/LICENSE)
40
+
41
+ Jayrun is an artifact-centric Python execution framework for pipelines, iterative computation and application services. Operators consume and produce artifact values; an Engine manages execution, resource lifetimes and control of running work. Components use ordinary synchronous or asynchronous Python methods.
42
+
43
+ [Documentation](https://jayrun.readthedocs.io/en/latest/) · [First program](https://jayrun.readthedocs.io/en/latest/start/first-graph.html) · [Tutorials](https://jayrun.readthedocs.io/en/latest/tutorials/index.html) · [API reference](https://jayrun.readthedocs.io/en/latest/reference/imports.html)
44
+
45
+ [![Jayrun dashboard listing running and paused contexts with graph versions, progress and iteration counts](https://raw.githubusercontent.com/jayrun-project/jayrun/main/docs/_static/screenshots/dashboard.png)](https://jayrun.readthedocs.io/en/latest/guides/visualization/dashboard.html)
46
+
47
+ *Running and paused work in the dashboard. The dashboard is itself a graph, built from an observing operator and a managed service resource. Click the screenshot for an interactive offline preview and setup guide.*
48
+
49
+ ## What Jayrun does
50
+
51
+ - **Release intermediate data automatically.** Artifact flow lets Jayrun release consumed values when execution no longer needs them. Entry/exit retention policies and application references still determine what stays alive.
52
+ - **Reuse expensive resources.** Models, calibration data and clients can remain available across compatible runs. The Engine manages acquisition, reuse and eventual teardown.
53
+ - **Build your own observers and controllers.** Use graphs for monitoring, experiment scheduling or distributed-work coordination. They use the existing execution and lifecycle machinery, with separate supervision capacity. Your application supplies transport and authentication.
54
+ - **Separate declaration from execution.** Validate and visualize a graph before running it, then submit it repeatedly with different inputs and configuration. Each submission returns its own `ContextRun`.
55
+ - **Manage iteration and capacity explicitly.** Combine graph iteration, operator repetition, conditional routes, sync/async execution and placement requests with lifecycle controls and scoped authority.
56
+ - **Keep dependencies small.** The required third-party runtime dependency is `packaging`; PyYAML is optional. HTML visualization needs no additional plotting package.
57
+
58
+ See [what Jayrun does](https://jayrun.readthedocs.io/en/latest/start/overview.html) for practical benefits and boundaries, and [data and lifetimes](https://jayrun.readthedocs.io/en/latest/start/data-and-lifetimes.html) for how artifacts, configuration and resources work together.
59
+
60
+ ## Install
61
+
62
+ Requires Python 3.11 or later:
63
+
64
+ ```bash
65
+ python -m pip install jayrun
66
+ ```
67
+
68
+ For YAML configuration support, install `jayrun[yaml]`. Workload libraries such as PyTorch are application dependencies, not core requirements.
69
+
70
+ ## A complete first graph
71
+
72
+ This program declares a multiplication, confirms the graph, supplies input and configuration, and prints `21`:
73
+
74
+ ```python
75
+ from jayrun import (
76
+ Artifact, ArtifactContext, ArtifactField, ArtifactFlow, BaseOperator,
77
+ ConfigContext, ConfigField, Engine, GraphDefinition,
78
+ )
79
+ from jayrun.context import ContextState
80
+
81
+
82
+ class Scale(BaseOperator):
83
+ def __init__(self, *, source, outputs):
84
+ super().__init__()
85
+ self.source = ArtifactField()
86
+ self.factor = ConfigField(value_type=int)
87
+ self.outputs = (ArtifactField(),)
88
+
89
+ def execute(self):
90
+ result = self.source.value * self.factor.value
91
+ self.context.record("scaled", result)
92
+ return result
93
+
94
+
95
+ source = Artifact(name="source")
96
+ result = Artifact(name="result")
97
+ scale = Scale(source=source, outputs=(result,))
98
+ flow = ArtifactFlow(scale, artifact=source)
99
+ graph = GraphDefinition(flow, entry_flows=flow)
100
+ graph.confirm()
101
+
102
+ with Engine() as engine:
103
+ run = engine.submit(
104
+ graph,
105
+ ArtifactContext({source: 7}),
106
+ ConfigContext({scale.factor: 3}),
107
+ )
108
+ run.wait(timeout=10)
109
+ if run.state is not ContextState.FINISHED:
110
+ raise RuntimeError(str(run.report.data.failure))
111
+ print(run.artifact(result).value) # 21
112
+ ```
113
+
114
+ `ArtifactContext` supplies data; `ConfigContext` supplies the operator's parameters. Execution settings separately control policies such as retries and iteration limits. `run.wait()` waits for finalization, which can include failure; the example checks the outcome before reading the result.
115
+
116
+ The same confirmed graph can serve another submission. The [complete walkthrough](https://jayrun.readthedocs.io/en/latest/start/first-graph.html) explains each declaration, inspects recorded values and visualizes the finished run.
117
+
118
+ ## Inspect declarations and execution
119
+
120
+ Save a declaration with `graph.plot.save("graph.html")`, a registry with `registry.plot.save("registry.html")`, or a completed run with `run.plot.save("run.html")`. These HTML viewers are interactive and open in a browser. Declaration views show structure; run views add captured outcomes, timings, records and reports.
121
+
122
+ [![Split-and-join graph with an explicit Splitter, two processing branches and a Join operator](https://raw.githubusercontent.com/jayrun-project/jayrun/main/docs/_static/screenshots/split-and-join.png)](https://jayrun.readthedocs.io/en/latest/guides/visualization/graphs.html)
123
+
124
+ *An explicit split-and-join declaration. Click to explore the interactive graph and its explanation.*
125
+
126
+ The [visualization and reporting chapter](https://jayrun.readthedocs.io/en/latest/guides/evidence/plots.html) covers graph definitions, registries, completed runs and the dashboard. A controller graph can use `self.runtime` to observe or coordinate work; see [the Controller example](https://jayrun.readthedocs.io/en/latest/guides/runtime/controller.html) and [Engine/runtime correspondence](https://jayrun.readthedocs.io/en/latest/guides/runtime/correspondence.html).
127
+
128
+ ## Persist execution history
129
+
130
+ Pass `Database("execution.sqlite")` from `jayrun.persistence` to `Engine(database=...)` to retain bounded execution/session history and timing profiles. The Engine owns the database lifecycle. After a run finishes, explicit `engine.database.flush()` checks storage settlement; computation completion alone does not establish successful persistence.
131
+
132
+ The [Persistence and Database guide](https://jayrun.readthedocs.io/en/latest/guides/evidence/persistence.html) includes a complete write–close–read example. Stored diagnostic history is separate from application checkpoints and arbitrary artifact storage.
133
+
134
+ ## Tutorials
135
+
136
+ Explore complete applications with a walkthrough, runnable Python source and notebook:
137
+
138
+ | Tutorial | Python source | Notebook | What it demonstrates |
139
+ | --- | --- | --- | --- |
140
+ | [Build and validate](https://jayrun.readthedocs.io/en/latest/tutorials/build-and-validate-graph.html) | [build_graph.py](https://github.com/jayrun-project/jayrun/blob/main/tutorials/build_graph.py) | [01_build_graph](https://github.com/jayrun-project/jayrun/blob/main/tutorials/01_build_graph.ipynb) | Properties, diagnostics and corrected execution |
141
+ | [Image service](https://jayrun.readthedocs.io/en/latest/tutorials/denoise-images-with-fastapi.html) | [denoise_images.py](https://github.com/jayrun-project/jayrun/blob/main/tutorials/denoise_images.py) | [02_denoise_images](https://github.com/jayrun-project/jayrun/blob/main/tutorials/02_denoise_images.ipynb) | Async service, shared client and routing |
142
+ | [Shared model inference](https://jayrun.readthedocs.io/en/latest/tutorials/mnist-inference-and-training.html#share-a-read-only-model-for-inference) | [mnist_inference.py](https://github.com/jayrun-project/jayrun/blob/main/tutorials/mnist_inference.py) | [03_mnist_inference](https://github.com/jayrun-project/jayrun/blob/main/tutorials/03_mnist_inference.ipynb) | Read-only model reuse and placement |
143
+ | [Supervised training](https://jayrun.readthedocs.io/en/latest/tutorials/mnist-inference-and-training.html#supervise-replace-and-promote) | [mnist_training.py](https://github.com/jayrun-project/jayrun/blob/main/tutorials/mnist_training.py) | [04_mnist_training](https://github.com/jayrun-project/jayrun/blob/main/tutorials/04_mnist_training.ipynb) | Iteration, mutable state and scoped supervision |
144
+ | [Document service](https://jayrun.readthedocs.io/en/latest/tutorials/document-ingestion.html) | [document_ingestion.py](https://github.com/jayrun-project/jayrun/blob/main/tutorials/document_ingestion.py) | [05_document_ingestion](https://github.com/jayrun-project/jayrun/blob/main/tutorials/05_document_ingestion.ipynb) | Long-running jobs and transactional publication |
145
+ | [Adapter checkpointing](https://jayrun.readthedocs.io/en/latest/tutorials/checkpointed-adapter-finetuning.html) | [adapter_finetuning.py](https://github.com/jayrun-project/jayrun/blob/main/tutorials/adapter_finetuning.py) | [06_adapter_finetuning](https://github.com/jayrun-project/jayrun/blob/main/tutorials/06_adapter_finetuning.ipynb) | Model/optimizer/RNG checkpoints |
146
+ | [Scientific campaign](https://jayrun.readthedocs.io/en/latest/tutorials/adaptive-scientific-calibration.html) | [heat_calibration.py](https://github.com/jayrun-project/jayrun/blob/main/tutorials/heat_calibration.py) | [07_heat_calibration](https://github.com/jayrun-project/jayrun/blob/main/tutorials/07_heat_calibration.ipynb) | Adaptive control and reproducibility |
147
+
148
+ Each tutorial includes a small offline CPU path. See the [tutorial setup guide](https://jayrun.readthedocs.io/en/latest/tutorials/index.html) for dependencies and optional GPU/model workloads.
149
+
150
+ ## Find your next step
151
+
152
+ | Task | Guide |
153
+ | --- | --- |
154
+ | Build, validate, submit and inspect a graph | [From declaration to execution](https://jayrun.readthedocs.io/en/latest/guides/workflow/index.html) |
155
+ | Resolve fan-out, fan-in and conditional routes | [Graph-definition resolutions](https://jayrun.readthedocs.io/en/latest/guides/graphs/resolutions.html) |
156
+ | Use context, execution, placement and runtime handles | [Component interfaces](https://jayrun.readthedocs.io/en/latest/guides/components/index.html) |
157
+ | Add reusable models or clients | [Resources](https://jayrun.readthedocs.io/en/latest/guides/graphs/resources.html) |
158
+ | Integrate services, remote work and checkpoints | [Application integration](https://jayrun.readthedocs.io/en/latest/guides/integration/index.html) |
159
+ | Check exact imports and contracts | [Public API](https://jayrun.readthedocs.io/en/latest/reference/imports.html) |
160
+
161
+ The [documentation sources](https://github.com/jayrun-project/jayrun/blob/main/docs/index.md) are included in this repository. Supported public imports come from `jayrun` and its documented public modules; `jayrun.core` and `jayrun.engine` are implementation details.
162
+
163
+ ## Scope and project status
164
+
165
+ Jayrun manages graph execution and ownership; applications own network transport, authentication, external side effects and checkpoint contents. Placement accounts for declared capacity rather than performing device allocation. Cleanup releases framework references rather than guaranteeing an immediate drop in process memory. See [supported behavior and limitations](https://jayrun.readthedocs.io/en/latest/reference/limits.html).
166
+
167
+ Jayrun provides a tested foundation for graph execution, with ongoing improvements to reliability, usability and documentation. Report bugs and request features through [GitHub Issues](https://github.com/jayrun-project/jayrun/issues).
168
+
169
+ ## License
170
+
171
+ [Apache License 2.0](https://github.com/jayrun-project/jayrun/blob/main/LICENSE). Copyright 2026 Masoud Yavari.
jayrun-0.3.0/README.md ADDED
@@ -0,0 +1,138 @@
1
+ # Jayrun
2
+
3
+ [![PyPI version](https://img.shields.io/pypi/v/jayrun.svg)](https://pypi.org/project/jayrun/)
4
+ [![Python](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/)
5
+ [![Documentation](https://github.com/jayrun-project/jayrun/actions/workflows/docs.yml/badge.svg)](https://github.com/jayrun-project/jayrun/actions/workflows/docs.yml)
6
+ [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://github.com/jayrun-project/jayrun/blob/main/LICENSE)
7
+
8
+ Jayrun is an artifact-centric Python execution framework for pipelines, iterative computation and application services. Operators consume and produce artifact values; an Engine manages execution, resource lifetimes and control of running work. Components use ordinary synchronous or asynchronous Python methods.
9
+
10
+ [Documentation](https://jayrun.readthedocs.io/en/latest/) · [First program](https://jayrun.readthedocs.io/en/latest/start/first-graph.html) · [Tutorials](https://jayrun.readthedocs.io/en/latest/tutorials/index.html) · [API reference](https://jayrun.readthedocs.io/en/latest/reference/imports.html)
11
+
12
+ [![Jayrun dashboard listing running and paused contexts with graph versions, progress and iteration counts](https://raw.githubusercontent.com/jayrun-project/jayrun/main/docs/_static/screenshots/dashboard.png)](https://jayrun.readthedocs.io/en/latest/guides/visualization/dashboard.html)
13
+
14
+ *Running and paused work in the dashboard. The dashboard is itself a graph, built from an observing operator and a managed service resource. Click the screenshot for an interactive offline preview and setup guide.*
15
+
16
+ ## What Jayrun does
17
+
18
+ - **Release intermediate data automatically.** Artifact flow lets Jayrun release consumed values when execution no longer needs them. Entry/exit retention policies and application references still determine what stays alive.
19
+ - **Reuse expensive resources.** Models, calibration data and clients can remain available across compatible runs. The Engine manages acquisition, reuse and eventual teardown.
20
+ - **Build your own observers and controllers.** Use graphs for monitoring, experiment scheduling or distributed-work coordination. They use the existing execution and lifecycle machinery, with separate supervision capacity. Your application supplies transport and authentication.
21
+ - **Separate declaration from execution.** Validate and visualize a graph before running it, then submit it repeatedly with different inputs and configuration. Each submission returns its own `ContextRun`.
22
+ - **Manage iteration and capacity explicitly.** Combine graph iteration, operator repetition, conditional routes, sync/async execution and placement requests with lifecycle controls and scoped authority.
23
+ - **Keep dependencies small.** The required third-party runtime dependency is `packaging`; PyYAML is optional. HTML visualization needs no additional plotting package.
24
+
25
+ See [what Jayrun does](https://jayrun.readthedocs.io/en/latest/start/overview.html) for practical benefits and boundaries, and [data and lifetimes](https://jayrun.readthedocs.io/en/latest/start/data-and-lifetimes.html) for how artifacts, configuration and resources work together.
26
+
27
+ ## Install
28
+
29
+ Requires Python 3.11 or later:
30
+
31
+ ```bash
32
+ python -m pip install jayrun
33
+ ```
34
+
35
+ For YAML configuration support, install `jayrun[yaml]`. Workload libraries such as PyTorch are application dependencies, not core requirements.
36
+
37
+ ## A complete first graph
38
+
39
+ This program declares a multiplication, confirms the graph, supplies input and configuration, and prints `21`:
40
+
41
+ ```python
42
+ from jayrun import (
43
+ Artifact, ArtifactContext, ArtifactField, ArtifactFlow, BaseOperator,
44
+ ConfigContext, ConfigField, Engine, GraphDefinition,
45
+ )
46
+ from jayrun.context import ContextState
47
+
48
+
49
+ class Scale(BaseOperator):
50
+ def __init__(self, *, source, outputs):
51
+ super().__init__()
52
+ self.source = ArtifactField()
53
+ self.factor = ConfigField(value_type=int)
54
+ self.outputs = (ArtifactField(),)
55
+
56
+ def execute(self):
57
+ result = self.source.value * self.factor.value
58
+ self.context.record("scaled", result)
59
+ return result
60
+
61
+
62
+ source = Artifact(name="source")
63
+ result = Artifact(name="result")
64
+ scale = Scale(source=source, outputs=(result,))
65
+ flow = ArtifactFlow(scale, artifact=source)
66
+ graph = GraphDefinition(flow, entry_flows=flow)
67
+ graph.confirm()
68
+
69
+ with Engine() as engine:
70
+ run = engine.submit(
71
+ graph,
72
+ ArtifactContext({source: 7}),
73
+ ConfigContext({scale.factor: 3}),
74
+ )
75
+ run.wait(timeout=10)
76
+ if run.state is not ContextState.FINISHED:
77
+ raise RuntimeError(str(run.report.data.failure))
78
+ print(run.artifact(result).value) # 21
79
+ ```
80
+
81
+ `ArtifactContext` supplies data; `ConfigContext` supplies the operator's parameters. Execution settings separately control policies such as retries and iteration limits. `run.wait()` waits for finalization, which can include failure; the example checks the outcome before reading the result.
82
+
83
+ The same confirmed graph can serve another submission. The [complete walkthrough](https://jayrun.readthedocs.io/en/latest/start/first-graph.html) explains each declaration, inspects recorded values and visualizes the finished run.
84
+
85
+ ## Inspect declarations and execution
86
+
87
+ Save a declaration with `graph.plot.save("graph.html")`, a registry with `registry.plot.save("registry.html")`, or a completed run with `run.plot.save("run.html")`. These HTML viewers are interactive and open in a browser. Declaration views show structure; run views add captured outcomes, timings, records and reports.
88
+
89
+ [![Split-and-join graph with an explicit Splitter, two processing branches and a Join operator](https://raw.githubusercontent.com/jayrun-project/jayrun/main/docs/_static/screenshots/split-and-join.png)](https://jayrun.readthedocs.io/en/latest/guides/visualization/graphs.html)
90
+
91
+ *An explicit split-and-join declaration. Click to explore the interactive graph and its explanation.*
92
+
93
+ The [visualization and reporting chapter](https://jayrun.readthedocs.io/en/latest/guides/evidence/plots.html) covers graph definitions, registries, completed runs and the dashboard. A controller graph can use `self.runtime` to observe or coordinate work; see [the Controller example](https://jayrun.readthedocs.io/en/latest/guides/runtime/controller.html) and [Engine/runtime correspondence](https://jayrun.readthedocs.io/en/latest/guides/runtime/correspondence.html).
94
+
95
+ ## Persist execution history
96
+
97
+ Pass `Database("execution.sqlite")` from `jayrun.persistence` to `Engine(database=...)` to retain bounded execution/session history and timing profiles. The Engine owns the database lifecycle. After a run finishes, explicit `engine.database.flush()` checks storage settlement; computation completion alone does not establish successful persistence.
98
+
99
+ The [Persistence and Database guide](https://jayrun.readthedocs.io/en/latest/guides/evidence/persistence.html) includes a complete write–close–read example. Stored diagnostic history is separate from application checkpoints and arbitrary artifact storage.
100
+
101
+ ## Tutorials
102
+
103
+ Explore complete applications with a walkthrough, runnable Python source and notebook:
104
+
105
+ | Tutorial | Python source | Notebook | What it demonstrates |
106
+ | --- | --- | --- | --- |
107
+ | [Build and validate](https://jayrun.readthedocs.io/en/latest/tutorials/build-and-validate-graph.html) | [build_graph.py](https://github.com/jayrun-project/jayrun/blob/main/tutorials/build_graph.py) | [01_build_graph](https://github.com/jayrun-project/jayrun/blob/main/tutorials/01_build_graph.ipynb) | Properties, diagnostics and corrected execution |
108
+ | [Image service](https://jayrun.readthedocs.io/en/latest/tutorials/denoise-images-with-fastapi.html) | [denoise_images.py](https://github.com/jayrun-project/jayrun/blob/main/tutorials/denoise_images.py) | [02_denoise_images](https://github.com/jayrun-project/jayrun/blob/main/tutorials/02_denoise_images.ipynb) | Async service, shared client and routing |
109
+ | [Shared model inference](https://jayrun.readthedocs.io/en/latest/tutorials/mnist-inference-and-training.html#share-a-read-only-model-for-inference) | [mnist_inference.py](https://github.com/jayrun-project/jayrun/blob/main/tutorials/mnist_inference.py) | [03_mnist_inference](https://github.com/jayrun-project/jayrun/blob/main/tutorials/03_mnist_inference.ipynb) | Read-only model reuse and placement |
110
+ | [Supervised training](https://jayrun.readthedocs.io/en/latest/tutorials/mnist-inference-and-training.html#supervise-replace-and-promote) | [mnist_training.py](https://github.com/jayrun-project/jayrun/blob/main/tutorials/mnist_training.py) | [04_mnist_training](https://github.com/jayrun-project/jayrun/blob/main/tutorials/04_mnist_training.ipynb) | Iteration, mutable state and scoped supervision |
111
+ | [Document service](https://jayrun.readthedocs.io/en/latest/tutorials/document-ingestion.html) | [document_ingestion.py](https://github.com/jayrun-project/jayrun/blob/main/tutorials/document_ingestion.py) | [05_document_ingestion](https://github.com/jayrun-project/jayrun/blob/main/tutorials/05_document_ingestion.ipynb) | Long-running jobs and transactional publication |
112
+ | [Adapter checkpointing](https://jayrun.readthedocs.io/en/latest/tutorials/checkpointed-adapter-finetuning.html) | [adapter_finetuning.py](https://github.com/jayrun-project/jayrun/blob/main/tutorials/adapter_finetuning.py) | [06_adapter_finetuning](https://github.com/jayrun-project/jayrun/blob/main/tutorials/06_adapter_finetuning.ipynb) | Model/optimizer/RNG checkpoints |
113
+ | [Scientific campaign](https://jayrun.readthedocs.io/en/latest/tutorials/adaptive-scientific-calibration.html) | [heat_calibration.py](https://github.com/jayrun-project/jayrun/blob/main/tutorials/heat_calibration.py) | [07_heat_calibration](https://github.com/jayrun-project/jayrun/blob/main/tutorials/07_heat_calibration.ipynb) | Adaptive control and reproducibility |
114
+
115
+ Each tutorial includes a small offline CPU path. See the [tutorial setup guide](https://jayrun.readthedocs.io/en/latest/tutorials/index.html) for dependencies and optional GPU/model workloads.
116
+
117
+ ## Find your next step
118
+
119
+ | Task | Guide |
120
+ | --- | --- |
121
+ | Build, validate, submit and inspect a graph | [From declaration to execution](https://jayrun.readthedocs.io/en/latest/guides/workflow/index.html) |
122
+ | Resolve fan-out, fan-in and conditional routes | [Graph-definition resolutions](https://jayrun.readthedocs.io/en/latest/guides/graphs/resolutions.html) |
123
+ | Use context, execution, placement and runtime handles | [Component interfaces](https://jayrun.readthedocs.io/en/latest/guides/components/index.html) |
124
+ | Add reusable models or clients | [Resources](https://jayrun.readthedocs.io/en/latest/guides/graphs/resources.html) |
125
+ | Integrate services, remote work and checkpoints | [Application integration](https://jayrun.readthedocs.io/en/latest/guides/integration/index.html) |
126
+ | Check exact imports and contracts | [Public API](https://jayrun.readthedocs.io/en/latest/reference/imports.html) |
127
+
128
+ The [documentation sources](https://github.com/jayrun-project/jayrun/blob/main/docs/index.md) are included in this repository. Supported public imports come from `jayrun` and its documented public modules; `jayrun.core` and `jayrun.engine` are implementation details.
129
+
130
+ ## Scope and project status
131
+
132
+ Jayrun manages graph execution and ownership; applications own network transport, authentication, external side effects and checkpoint contents. Placement accounts for declared capacity rather than performing device allocation. Cleanup releases framework references rather than guaranteeing an immediate drop in process memory. See [supported behavior and limitations](https://jayrun.readthedocs.io/en/latest/reference/limits.html).
133
+
134
+ Jayrun provides a tested foundation for graph execution, with ongoing improvements to reliability, usability and documentation. Report bugs and request features through [GitHub Issues](https://github.com/jayrun-project/jayrun/issues).
135
+
136
+ ## License
137
+
138
+ [Apache License 2.0](https://github.com/jayrun-project/jayrun/blob/main/LICENSE). Copyright 2026 Masoud Yavari.
@@ -0,0 +1,59 @@
1
+ """Public graph construction, execution, and data-context API.
2
+
3
+ Exports are resolved on demand so the portable visualization package can be
4
+ imported without loading execution, declaration, or validation modules.
5
+ """
6
+ from importlib import import_module
7
+ from typing import TYPE_CHECKING
8
+
9
+ if TYPE_CHECKING:
10
+ from .authority import Controller, Supervisor
11
+ from .core.artifact.base import Artifact
12
+ from .core.artifact.context import ArtifactContext
13
+ from .core.artifact.field import ArtifactField
14
+ from .core.config.context import ConfigContext
15
+ from .core.config.field import ConfigField
16
+ from .core.context.runtime_data import Data
17
+ from .core.graph.artifact_flow import ArtifactFlow
18
+ from .core.graph.graph_definition import GraphDefinition
19
+ from .core.operator.base import BaseOperator
20
+ from .core.resource.base import BaseResource
21
+ from .core.resource.field import ResourceField
22
+ from .core.serializer.base import BaseSerializer
23
+ from .engine.api import Engine
24
+ from .engine.engine_state import EngineState, RuntimeActivity
25
+ from .registry import GraphRegistry
26
+
27
+ __version__ = "0.3.0"
28
+
29
+ __all__ = (
30
+ "__version__", "Artifact", "ArtifactContext", "ArtifactField", "ArtifactFlow",
31
+ "BaseOperator", "BaseResource", "BaseSerializer", "ConfigContext", "ConfigField",
32
+ "Controller", "Data", "Engine", "EngineState", "RuntimeActivity", "GraphDefinition", "GraphRegistry",
33
+ "ResourceField", "Supervisor",
34
+ )
35
+
36
+ _EXPORTS = {
37
+ "Artifact": ".core.artifact.base", "ArtifactContext": ".core.artifact.context",
38
+ "ArtifactField": ".core.artifact.field", "ArtifactFlow": ".core.graph.artifact_flow",
39
+ "BaseOperator": ".core.operator.base", "BaseResource": ".core.resource.base",
40
+ "BaseSerializer": ".core.serializer.base", "ConfigContext": ".core.config.context",
41
+ "ConfigField": ".core.config.field", "Controller": ".authority",
42
+ "Data": ".core.context.runtime_data", "Engine": ".engine.api",
43
+ "EngineState": ".engine.engine_state", "RuntimeActivity": ".engine.engine_state",
44
+ "GraphDefinition": ".core.graph.graph_definition", "GraphRegistry": ".registry",
45
+ "ResourceField": ".core.resource.field", "Supervisor": ".authority",
46
+ }
47
+
48
+
49
+ def __getattr__(name: str) -> object:
50
+ module = _EXPORTS.get(name)
51
+ if module is None:
52
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
53
+ value = getattr(import_module(module, __name__), name)
54
+ globals()[name] = value
55
+ return value
56
+
57
+
58
+ def __dir__() -> list[str]:
59
+ return sorted(set(globals()) | set(__all__))
@@ -0,0 +1,46 @@
1
+ from __future__ import annotations
2
+
3
+ from dataclasses import dataclass
4
+ from typing import TYPE_CHECKING
5
+
6
+ if TYPE_CHECKING:
7
+ from .core.graph.graph_definition import GraphDefinition
8
+ from .persistence import DatabaseReader
9
+
10
+
11
+ @dataclass(frozen=True, slots=True, init=False)
12
+ class Supervisor:
13
+ """Grant a submitted context authority over other context runs.
14
+
15
+ Args:
16
+ *graphs: Exact graph objects whose contexts may be observed and controlled.
17
+ When omitted, the authority covers every graph in the engine.
18
+ """
19
+
20
+ graphs: tuple[GraphDefinition, ...]
21
+
22
+ def __init__(self, *graphs: GraphDefinition) -> None:
23
+ object.__setattr__(self, "graphs", graphs)
24
+
25
+
26
+ @dataclass(frozen=True, slots=True)
27
+ class Controller:
28
+ """Grant engine-wide observation and control to a submitted context.
29
+
30
+ A controller may also submit registered graph identities through
31
+ ``self.runtime.submit(...)`` and asynchronously request engine shutdown.
32
+ Controller contexts execute locally through supervision capacity and cannot
33
+ be transferred. An optional ``history`` reader explicitly grants its existing
34
+ session scope. The runtime lends an attenuated view for this controller
35
+ lifetime; it cannot close/flush the store or acquire additional live rights.
36
+ """
37
+
38
+ history: DatabaseReader | None = None
39
+
40
+ def __post_init__(self) -> None:
41
+ # A history grant is local, explicit and independent of live authority.
42
+ # Default Controller() does not import persistence or reveal its store.
43
+ if self.history is not None:
44
+ from .persistence import DatabaseReader
45
+ if type(self.history) is not DatabaseReader:
46
+ raise TypeError("history must be a DatabaseReader or None")