cairn-operator-dataflow-metaflow 0.1.3__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 (24) hide show
  1. cairn_operator_dataflow_metaflow-0.1.3/.gitignore +100 -0
  2. cairn_operator_dataflow_metaflow-0.1.3/DESIGN.md +113 -0
  3. cairn_operator_dataflow_metaflow-0.1.3/LICENSE +202 -0
  4. cairn_operator_dataflow_metaflow-0.1.3/PKG-INFO +22 -0
  5. cairn_operator_dataflow_metaflow-0.1.3/README.md +6 -0
  6. cairn_operator_dataflow_metaflow-0.1.3/pack.toml +15 -0
  7. cairn_operator_dataflow_metaflow-0.1.3/pyproject.toml +38 -0
  8. cairn_operator_dataflow_metaflow-0.1.3/src/operator_dataflow_metaflow/__init__.py +3 -0
  9. cairn_operator_dataflow_metaflow-0.1.3/src/operator_dataflow_metaflow/engines_metaflow.py +830 -0
  10. cairn_operator_dataflow_metaflow-0.1.3/src/operator_dataflow_metaflow/factory.py +83 -0
  11. cairn_operator_dataflow_metaflow-0.1.3/src/operator_dataflow_metaflow/metaflow_bridge.py +124 -0
  12. cairn_operator_dataflow_metaflow-0.1.3/src/operator_dataflow_metaflow/metaflow_train_bridge.py +151 -0
  13. cairn_operator_dataflow_metaflow-0.1.3/tests/conftest.py +38 -0
  14. cairn_operator_dataflow_metaflow-0.1.3/tests/test_metaflow_cancel_detached.py +167 -0
  15. cairn_operator_dataflow_metaflow-0.1.3/tests/test_metaflow_client_poll.py +176 -0
  16. cairn_operator_dataflow_metaflow-0.1.3/tests/test_metaflow_conformance.py +121 -0
  17. cairn_operator_dataflow_metaflow-0.1.3/tests/test_metaflow_cross_box.py +124 -0
  18. cairn_operator_dataflow_metaflow-0.1.3/tests/test_metaflow_env_allowlist.py +29 -0
  19. cairn_operator_dataflow_metaflow-0.1.3/tests/test_metaflow_reattach_liveness.py +104 -0
  20. cairn_operator_dataflow_metaflow-0.1.3/tests/test_metaflow_remote_result.py +108 -0
  21. cairn_operator_dataflow_metaflow-0.1.3/tests/test_metaflow_secrets.py +197 -0
  22. cairn_operator_dataflow_metaflow-0.1.3/tests/test_metaflow_signal_postmortem.py +54 -0
  23. cairn_operator_dataflow_metaflow-0.1.3/tests/test_metaflow_substrate.py +170 -0
  24. cairn_operator_dataflow_metaflow-0.1.3/tests/test_metaflow_train_bridge.py +165 -0
@@ -0,0 +1,100 @@
1
+ # Secrets
2
+ .env
3
+ prod/.env.prod
4
+ .env.local
5
+ .env.*.local
6
+
7
+ # Python
8
+ __pycache__/
9
+ *.py[cod]
10
+ *$py.class
11
+ *.so
12
+ .Python
13
+ *.egg-info/
14
+ .installed.cfg
15
+ *.egg
16
+ .pytest_cache/
17
+ .mypy_cache/
18
+ .ruff_cache/
19
+ .coverage
20
+ .coverage.*
21
+ htmlcov/
22
+
23
+ # Virtualenvs
24
+ .venv/
25
+ venv/
26
+ env/
27
+
28
+ # IDE
29
+ .vscode/
30
+ .idea/
31
+ *.swp
32
+ *.swo
33
+
34
+ # OS
35
+ .DS_Store
36
+ Thumbs.db
37
+
38
+ # Data caches
39
+ data/chroma/
40
+ *.log
41
+
42
+ # Eval reports
43
+ evals/last_report.json
44
+ evals/*.report.json
45
+
46
+ # Build
47
+ build/
48
+ dist/
49
+ # The platform image's build context (#2514): the public wheels the ship step copies beside
50
+
51
+ # Observability sinks (src/obs)
52
+ events.jsonl
53
+ replays/
54
+
55
+ # CLI run artifacts: trace dirs (cairn run) + the hash-chained audit log.
56
+ .cairn/
57
+ audit.jsonl
58
+
59
+ # DuckDB local analytics (scripts/dashboard.py)
60
+ obs.duckdb
61
+ *.duckdb.wal
62
+ *.duckdb.tmp/
63
+
64
+ # Optional external MCP backend — operators drop this in to enable CAIRN_BACKEND=otel.
65
+ # Without it, the selector falls back to the mock backend with a warning.
66
+ src/mcp/tools/_backends/otel.py
67
+ tests/test_otel_backend.py
68
+
69
+ # Refactor scratch — incident agent package split kept on disk for reference
70
+ # but not part of the shipped tree. __init__.py files were removed so Python
71
+ # imports src/agents/incident.py (the working single-file module) instead.
72
+ src/agents/incident/
73
+
74
+
75
+ .cache/
76
+ .chainlit/
77
+ .files/
78
+ chainlit_app.py
79
+ chainlit.md
80
+ .deepeval/
81
+ .langgraph_api/
82
+ prod/
83
+
84
+ # stale pre-rename data dir (runtime traces); data now lives in .cairn/
85
+ .obs-agent/
86
+
87
+ # Never commit a secrets file under any name (an untracked .env backup once held
88
+ # the prod Postgres password, JWT secret and admin hash), nor local work areas.
89
+ .env.*
90
+ !.env.example
91
+ !deploy/light/.env.infisical.example
92
+ # the feature-proof profile's generated keys (scripts/oss/proof_seed.py), never committed
93
+ deploy/light/.proof/
94
+ .proof-out/
95
+ *.bak
96
+ /private/
97
+ /site/
98
+ /data/
99
+ # the generated hello-cairn proof report (scripts/oss/feature_proof.sh)
100
+ /FEATURE_PROOF.md
@@ -0,0 +1,113 @@
1
+ # cairn-operator-dataflow-metaflow — design
2
+
3
+ - **Distribution:** `cairn-operator-dataflow-metaflow` (`cairn/operators/optional/dataflow_metaflow/`),
4
+ offered by `cairndev[metaflow]`
5
+ - **Capabilities provided:** none as operators — it registers the `metaflow` dataflow engine
6
+ (`cairn.dataflow_engines`), which `dataflow.run` and `ml.run` submit to when selected
7
+ - **Status:** proven at unit level (the conformance suite, cross-box, secrets, gang scheduling);
8
+ not in the hello-cairn feature proof
9
+ - **Decisions:** ADR-0083 / ADR-0089 (Metaflow as substrate), ADR-0088 (checkpoints + resume),
10
+ ADR-0134 D2 (an optional wheel, #2678)
11
+
12
+ ## 1. Purpose
13
+
14
+ Run a cairn flow — a stage list, either kind — on Metaflow's substrate: Kubernetes or AWS Batch
15
+ compute, a shared S3 datastore, a metadata service that makes a run readable and resumable
16
+ from another box, `@retry` and `resume`. It is the scale rung above the builtin engine
17
+ (in-process or one SSH box). It does NOT add operators, govern anything itself or register
18
+ artifacts: the `dataflow/run` / `ml/run` operators (cairn-operator-dataflow) gate, budget and
19
+ register, and core decides which engine an environment selects. Until ADR-0134 it lived inside
20
+ cairn-operator-dataflow; it moved out so a default `cairndev` install carries only what the
21
+ feature proof covers.
22
+
23
+ ## 2. Architecture
24
+
25
+ ```
26
+ dataflow/run | ml/run (cairn-operator-dataflow; governance, budget, artifacts)
27
+ │ resolve_engine(kind) — core: cairn.core.dataflow.engine_registry
28
+ ▼
29
+ metaflow_engine(kind, target) factory.py reads the metaflow_* backend keys
30
+ ▼
31
+ MetaflowEngine.submit/poll/result engines_metaflow.py
32
+ │ spawns python -m operator_dataflow_metaflow.metaflow_bridge run …
33
+ │ (metaflow_train_bridge for a gang, resources.workers > 1)
34
+ ▼
35
+ CairnFlow (Metaflow FlowSpec) metaflow_bridge.py — ONE static flow interpreting any
36
+ │ spec; the step calls cairn.core.dataflow.runner.run_dataflow
37
+ ▼
38
+ Metaflow local | k8s | Batch compute, S3 datastore, metadata service
39
+ ```
40
+
41
+ - **One adapter, both kinds.** The engine is kind-blind; the environment maps `ml_engine` and
42
+ `dataflow_engine` to it independently (ADR-0082 D7).
43
+ - **One static flow.** The bridge is never code-generated (ADR-0082 D1): it reads the spec from
44
+ `CAIRN_DATAFLOW_SPEC` and runs the core kernel runner, so stage contracts, budgets and
45
+ checkpoints are core's. `cairn flow export --to metaflow` is the separate, one-way projection.
46
+ - **Shared helpers are core's** (`cairn.core.dataflow.resources`, ADR-0134 D3b): the resource
47
+ envelope (`aggregate_resources`), the gang size (`gang_workers`), and the environment
48
+ allowlist this engine extends with its own `METAFLOW_` / `CAIRN_METAFLOW_` / `OBS_METAFLOW_`
49
+ prefixes.
50
+ - **Re-attach and cancel** recognise the bridge process by its cmdline module path. Jobs
51
+ launched before ADR-0134 run `operator_dataflow.metaflow_bridge`; both paths are recognised
52
+ for one release (`_BRIDGE_MODULES`).
53
+ - **Imports:** `cairn.core.*` only (the operator contract, `cairn.core.dataflow`); never another
54
+ operator pack. `metaflow` is imported lazily, so the wheel registers without it.
55
+
56
+ ## 3. Operators
57
+
58
+ None. The pack registers one `cairn.dataflow_engines` entry, `metaflow` →
59
+ `operator_dataflow_metaflow.factory:metaflow_engine`. The operators that reach it are
60
+ `dataflow/run` and `ml/run` in cairn-operator-dataflow.
61
+
62
+ ## 4. Configuration
63
+
64
+ | Key | Kind | Scope | Default | Meaning |
65
+ |---|---|---|---|---|
66
+ | `ml_engine` / `dataflow_engine` = `metaflow` | backend field | deployment | `builtin` | select this engine for a flow kind |
67
+ | `metaflow_metadata_root` (`CAIRN_METAFLOW_ROOT`) | backend field | deployment | the kind's target | where Metaflow's local metadata lives |
68
+ | `metaflow_datastore`, `metaflow_datastore_root` | backend fields | deployment | local | the datastore and its root (S3 for cross-box) |
69
+ | `metaflow_compute`, `metaflow_compute_image`, `metaflow_compute_queue` | backend fields | deployment | `local` | the compute substrate (local / kubernetes / batch), its image and queue |
70
+ | `metaflow_retry_times` | backend field | deployment | 0 | `@retry` count; a non-integer is refused at `validate()` |
71
+ | `metaflow_secrets` | backend field | deployment | none | the connections a run may receive (`CAIRN_CONN_*`), and nothing else |
72
+ | `metaflow_env_isolation` | backend field | deployment | `auto` | how much of the control plane's environment a task inherits |
73
+ | `metaflow_metadata_service` | backend field | deployment | none | the metadata service URL that removes box affinity (`cairn doctor` checks it is reachable) |
74
+
75
+ The backend fields are read through `cairn.core.operator.selected_backend` (profile → env →
76
+ default); a worker box receives them as the env vars named in `factory._SELECTION_ENV`.
77
+
78
+ ## 5. Governance
79
+
80
+ The engine is reached only through `dataflow/run` / `ml/run`, so every flow leg passes
81
+ `enforce_flow_gate` on the flow's aggregate stage risk and the flow-engine door
82
+ (`cairn.core.dataflow.engine_door`, ADR-0134 D3c) before any record exists: an environment
83
+ that selects `metaflow` without this wheel installed is refused there, naming
84
+ `cairndev[metaflow]`. Budgets are the kernel runner's (`BudgetExceeded`). The environment
85
+ allowlist withholds every credential a run did not declare.
86
+
87
+ ## 6. Failure modes
88
+
89
+ | Failure | Cause | Effect | Recovered? |
90
+ |---|---|---|---|
91
+ | Engine not installed | `ml_engine = metaflow` without `cairndev[metaflow]` | refused at the launch door | n/a — install the extra |
92
+ | `metaflow` library absent | the wheel installed without its `[metaflow]` extra | `validate()`/submit names the extra | n/a |
93
+ | Run invisible to a later process (#1364) | metadata under a per-job temp dir | fixed: pathspec on the handle, metadata root | yes |
94
+ | Bridge died, no terminal marker | process killed | re-attach reports failed, retriable | yes — `resume` |
95
+ | Pre-upgrade job after ADR-0134 | the old module path in its cmdline | still recognised for one release | yes |
96
+
97
+ ## 7. Testing
98
+
99
+ `tests/` in this pack: the conformance suite (`test_metaflow_conformance.py`, needs `metaflow`;
100
+ skipped without it), substrate/config (`test_metaflow_substrate.py`), secrets
101
+ (`test_metaflow_secrets.py`), cross-box (`test_metaflow_cross_box.py`), client polling,
102
+ remote results, gang scheduling (`test_metaflow_train_bridge.py`), and the process-identity
103
+ gates — cancel of a detached bridge and re-attach liveness — each run for the current AND the
104
+ pre-upgrade bridge module path. Run with the worktree on `PYTHONPATH` or the pack installed.
105
+ Remote compute (Kubernetes/Batch) is not exercised in CI.
106
+
107
+ ## 8. History
108
+
109
+ | Date | Change | Issue |
110
+ |---|---|---|
111
+ | 2026-07-27 | Metaflow adapter — one adapter, both flow kinds (ADR-0083), in cairn-operator-dataflow | #1078 → #1114 |
112
+ | 2026-08-08 | Metaflow as substrate: secrets, cross-box, gang scheduling (ADR-0089) | #1345, #1346, #1366 |
113
+ | 2026-10-16 | Its own optional wheel behind `cairndev[metaflow]` (ADR-0134 D2) | #2678 |
@@ -0,0 +1,202 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "{}"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 The cairn Authors
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
202
+
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.5
2
+ Name: cairn-operator-dataflow-metaflow
3
+ Version: 0.1.3
4
+ Summary: The Metaflow dataflow engine (ADR-0089) for cairn's ml and data flows — offered by cairndev[metaflow] (ADR-0134 D2).
5
+ Project-URL: Homepage, https://cairndev.sh
6
+ Project-URL: Documentation, https://docs.cairndev.sh
7
+ Project-URL: Source, https://github.com/cairndev-sh/cairn
8
+ Project-URL: Issues, https://github.com/cairndev-sh/cairn/issues
9
+ Author: cairn maintainers
10
+ License-Expression: Apache-2.0
11
+ License-File: LICENSE
12
+ Requires-Python: >=3.12
13
+ Provides-Extra: metaflow
14
+ Requires-Dist: metaflow>=2.12; extra == 'metaflow'
15
+ Description-Content-Type: text/markdown
16
+
17
+ # cairn-operator-dataflow-metaflow — see DESIGN.md + ADR-0089, ADR-0134 D2.
18
+
19
+ The Metaflow dataflow engine for cairn: `pip install 'cairndev[metaflow]'`, then set
20
+ `[profile.backends] ml_engine = "metaflow"` (or `dataflow_engine`). The `dataflow/run` and
21
+ `ml/run` operators of `cairn-operator-dataflow` submit to it; this wheel registers the engine
22
+ only.
@@ -0,0 +1,6 @@
1
+ # cairn-operator-dataflow-metaflow — see DESIGN.md + ADR-0089, ADR-0134 D2.
2
+
3
+ The Metaflow dataflow engine for cairn: `pip install 'cairndev[metaflow]'`, then set
4
+ `[profile.backends] ml_engine = "metaflow"` (or `dataflow_engine`). The `dataflow/run` and
5
+ `ml/run` operators of `cairn-operator-dataflow` submit to it; this wheel registers the engine
6
+ only.
@@ -0,0 +1,15 @@
1
+ # cairn-operator-dataflow-metaflow — the Metaflow dataflow engine (ADR-0089), moved out of
2
+ # cairn-operator-dataflow into its own optional wheel (ADR-0134 D2, #2678). It registers no
3
+ # operator: the `dataflow/run` and `ml/run` operators (cairn-operator-dataflow) submit to it
4
+ # when an environment selects `metaflow` as its dataflow_engine / ml_engine.
5
+ [pack]
6
+ name = "obs-operator-dataflow-metaflow"
7
+ version = "0.1.0"
8
+ type = "operator"
9
+ description = "The Metaflow dataflow engine behind dataflow/run and ml/run (cairndev[metaflow])."
10
+ kind = "service_provider"
11
+ publisher = "cairn"
12
+ trust_level = "official"
13
+
14
+ [compat]
15
+ cairn_engine = ">=0.1.0"
@@ -0,0 +1,38 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "cairn-operator-dataflow-metaflow"
7
+ version = "0.1.3"
8
+ description = "The Metaflow dataflow engine (ADR-0089) for cairn's ml and data flows — offered by cairndev[metaflow] (ADR-0134 D2)."
9
+ readme = "README.md"
10
+ license = "Apache-2.0"
11
+ authors = [{name = "cairn maintainers"}]
12
+ requires-python = ">=3.12"
13
+ # No hard dependency on `metaflow`: the engine and the bridges import it lazily, so this wheel
14
+ # imports and registers without it (its tests run that way). `cairndev[metaflow]` installs
15
+ # both; installing this wheel alone, add the extra below.
16
+ dependencies = []
17
+
18
+ [project.optional-dependencies]
19
+ # The ADR-0083 scale rung, serving BOTH flow kinds through one adapter. Needs NO Argo/Step
20
+ # Functions: local run, `resume` and `@retry` verified standalone on 2026-07-27. Production adds
21
+ # a shared S3 datastore + metadata service.
22
+ metaflow = ["metaflow>=2.12"]
23
+
24
+ [project.urls]
25
+ Homepage = "https://cairndev.sh"
26
+ Documentation = "https://docs.cairndev.sh"
27
+ Source = "https://github.com/cairndev-sh/cairn"
28
+ Issues = "https://github.com/cairndev-sh/cairn/issues"
29
+
30
+ # #1512 — core selects an engine by NAME through this group and never imports this pack.
31
+ [project.entry-points."cairn.dataflow_engines"]
32
+ "metaflow" = "operator_dataflow_metaflow.factory:metaflow_engine"
33
+
34
+ [tool.hatch.build.targets.wheel]
35
+ packages = ["src/operator_dataflow_metaflow"]
36
+
37
+ [tool.hatch.build.targets.wheel.force-include]
38
+ "pack.toml" = "operator_dataflow_metaflow/pack.toml"
@@ -0,0 +1,3 @@
1
+ """cairn-operator-dataflow-metaflow — the Metaflow dataflow engine (ADR-0089), an optional
2
+ wheel offered by ``cairndev[metaflow]`` (ADR-0134 D2). Registered as ``metaflow`` in the
3
+ ``cairn.dataflow_engines`` group; core selects it by name and never imports this package."""