xfmr-zem 0.2.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 (47) hide show
  1. xfmr_zem-0.2.0/.github/workflows/deploy.yml +31 -0
  2. xfmr_zem-0.2.0/.gitignore +57 -0
  3. xfmr_zem-0.2.0/AGENTS.md +64 -0
  4. xfmr_zem-0.2.0/CHANGELOG.md +32 -0
  5. xfmr_zem-0.2.0/LICENSE +201 -0
  6. xfmr_zem-0.2.0/PKG-INFO +152 -0
  7. xfmr_zem-0.2.0/README.md +111 -0
  8. xfmr_zem-0.2.0/data/big_data_output.parquet +0 -0
  9. xfmr_zem-0.2.0/data/big_data_sim.parquet +0 -0
  10. xfmr_zem-0.2.0/data/dup_cleaned.parquet +0 -0
  11. xfmr_zem-0.2.0/data/dup_data.parquet +0 -0
  12. xfmr_zem-0.2.0/data/dup_data_large.parquet +0 -0
  13. xfmr_zem-0.2.0/data/nemo_full_stack_result.parquet +0 -0
  14. xfmr_zem-0.2.0/data/nemo_real_result.parquet +0 -0
  15. xfmr_zem-0.2.0/data/output_result.jsonl +0 -0
  16. xfmr_zem-0.2.0/data/sample.jsonl +2 -0
  17. xfmr_zem-0.2.0/pyproject.toml +70 -0
  18. xfmr_zem-0.2.0/src/xfmr_zem/__init__.py +35 -0
  19. xfmr_zem-0.2.0/src/xfmr_zem/cli.py +295 -0
  20. xfmr_zem-0.2.0/src/xfmr_zem/client.py +208 -0
  21. xfmr_zem-0.2.0/src/xfmr_zem/orchestrators/parallel_local.py +92 -0
  22. xfmr_zem-0.2.0/src/xfmr_zem/schemas.py +15 -0
  23. xfmr_zem-0.2.0/src/xfmr_zem/server.py +188 -0
  24. xfmr_zem-0.2.0/src/xfmr_zem/servers/data_juicer/parameter.yaml +17 -0
  25. xfmr_zem-0.2.0/src/xfmr_zem/servers/data_juicer/server.py +113 -0
  26. xfmr_zem-0.2.0/src/xfmr_zem/servers/instruction_gen/parameter.yaml +12 -0
  27. xfmr_zem-0.2.0/src/xfmr_zem/servers/instruction_gen/server.py +90 -0
  28. xfmr_zem-0.2.0/src/xfmr_zem/servers/io/parameter.yaml +10 -0
  29. xfmr_zem-0.2.0/src/xfmr_zem/servers/io/server.py +95 -0
  30. xfmr_zem-0.2.0/src/xfmr_zem/servers/llm/server.py +47 -0
  31. xfmr_zem-0.2.0/src/xfmr_zem/servers/nemo_curator/parameter.yaml +17 -0
  32. xfmr_zem-0.2.0/src/xfmr_zem/servers/nemo_curator/server.py +118 -0
  33. xfmr_zem-0.2.0/src/xfmr_zem/servers/profiler/server.py +76 -0
  34. xfmr_zem-0.2.0/src/xfmr_zem/servers/sinks/server.py +48 -0
  35. xfmr_zem-0.2.0/src/xfmr_zem/zenml_wrapper.py +203 -0
  36. xfmr_zem-0.2.0/tests/manual/caching_test.yaml +17 -0
  37. xfmr_zem-0.2.0/tests/manual/llm_test.yaml +17 -0
  38. xfmr_zem-0.2.0/tests/manual/parallel_test.yaml +28 -0
  39. xfmr_zem-0.2.0/tests/manual/parquet_test.yaml +15 -0
  40. xfmr_zem-0.2.0/tests/manual/phase4_test.yaml +32 -0
  41. xfmr_zem-0.2.0/tests/manual/profiler_test.yaml +19 -0
  42. xfmr_zem-0.2.0/tests/manual/standard_data_pipeline.yaml +27 -0
  43. xfmr_zem-0.2.0/uv.lock +3862 -0
  44. xfmr_zem-0.2.0/website/docs/docs.css +91 -0
  45. xfmr_zem-0.2.0/website/docs/index.html +105 -0
  46. xfmr_zem-0.2.0/website/index.html +124 -0
  47. xfmr_zem-0.2.0/website/style.css +466 -0
@@ -0,0 +1,31 @@
1
+ name: Deploy to GitHub Pages
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - master
8
+
9
+ permissions:
10
+ contents: read
11
+ pages: write
12
+ id-token: write
13
+
14
+ jobs:
15
+ deploy:
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - name: Checkout
19
+ uses: actions/checkout@v4
20
+
21
+ - name: Setup Pages
22
+ uses: actions/setup-pages@v4
23
+
24
+ - name: Upload artifact
25
+ uses: actions/upload-pages-artifact@v3
26
+ with:
27
+ path: './website' # Path to your website files
28
+
29
+ - name: Deploy to GitHub Pages
30
+ id: deployment
31
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,57 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+
27
+ # Virtual environments
28
+ .venv/
29
+ venv/
30
+ ENV/
31
+ env/
32
+
33
+ # IDE
34
+ .idea/
35
+ .vscode/
36
+ *.swp
37
+ *.swo
38
+
39
+ # Cache
40
+ .cache/
41
+ *.cache
42
+
43
+ # Logs
44
+ logs/
45
+ *.log
46
+
47
+ # Local config
48
+ .env
49
+ .env.local
50
+
51
+ # OS
52
+ .DS_Store
53
+ Thumbs.db
54
+
55
+ # Project specific
56
+ outputs/
57
+ cache/
@@ -0,0 +1,64 @@
1
+ # Zem Project Architecture
2
+
3
+ ## Overview
4
+ `Zem` is a unified data pipeline framework that leverages the **Model Context Protocol (MCP)** architecture to orchestrate data processing tasks across multiple domains. It integrates with **ZenML** for pipeline visualization and tracking.
5
+
6
+ ## Core Components
7
+
8
+ ### 1. MCP Servers (`src/xfmr_zem/server.py`)
9
+ - **Base Class**: `ZemServer` extends `FastMCP`.
10
+ - **Role**: Encapsulates specific domain logic (e.g., NeMo Curator, DataJuicer) as callable tools.
11
+ - **Constraints**:
12
+ - Must disable the startup banner (`show_banner=False`) to ensure clean JSON-RPC communication over stdio.
13
+ - Tools should return dictionary results or standard MCP content structures.
14
+
15
+ ### 2. Pipeline Client (`src/xfmr_zem/client.py`)
16
+ - **Role**: Acts as the orchestrator.
17
+ - **Functionality**:
18
+ - Reads YAML configurations (`pipeline.yaml`, `server.yaml`).
19
+ - Dynamically constructs a ZenML pipeline based on the configuration steps.
20
+ - Manages the lifecycle of MCP server subprocesses.
21
+
22
+ ### 3. ZenML Wrapper (`src/xfmr_zem/zenml_wrapper.py`)
23
+ - **Role**: Bridges ZenML steps with MCP tool execution.
24
+ - **Functionality**:
25
+ - `mcp_generic_step`: A generic ZenML step that executes a specific tool on a target MCP server.
26
+ - Implements robust manual subprocess communication for JSON-RPC over stdio (bypassing `mcp` library async issues).
27
+
28
+ ## Configuration (`*.yaml`)
29
+ - **Pipeline Config**: Defines the sequence of steps (`server.tool`).
30
+ - **Server Config**: Maps logical server names to their implementation paths (Python scripts).
31
+
32
+ ## Implemented Servers
33
+
34
+ - **NeMo Curator Server** (`src/xfmr_zem/servers/nemo_curator/server.py`):
35
+ - Tools: `pii_removal`, `normalize`, `quality_filter`.
36
+ - **DataJuicer Server** (`src/xfmr_zem/servers/data_juicer/server.py`):
37
+ - Tools: `clean_content`, `refining_filter`, `clean_html`, `clean_links`, `fix_unicode`, `whitespace_normalization`, `text_length_filter`, `language_filter`, `document_simhash_dedup`.
38
+ - **Profiler Server** (`src/xfmr_zem/servers/profiler/server.py`):
39
+ - Tools: `profile_data` (Generates stats: word counts, null ratios, uniqueness).
40
+ - **LLM-Curation Server** (`src/xfmr_zem/servers/llm/server.py`):
41
+ - Tools: `mask_pii`, `classify_domain`.
42
+ - Providers: **Ollama** (local default), **OpenAI**.
43
+ - **Sinks Server** (`src/xfmr_zem/servers/sinks/server.py`):
44
+ - Tools: `to_huggingface`, `to_vector_db`.
45
+
46
+ ## Orchestration & Concurrency
47
+
48
+ ### 1. Sequential (Default)
49
+ Uses the standard ZenML local orchestrator. Steps are executed one-by-one.
50
+
51
+ ### 2. Parallel Local (Optimized)
52
+ Uses the custom `ParallelLocalOrchestrator` (`src/xfmr_zem/orchestrators/parallel_local.py`).
53
+ - **Capability**: Executes independent DAG branches (trees) concurrently using multi-threading.
54
+ - **Setup**: `uv run zenml stack set parallel_stack`.
55
+
56
+ ## Environment & Constraints
57
+
58
+ ### 🔴 Port Usage (CRITICAL)
59
+ - **Allowed Port Range**: **8871 - 8879** (Environment restrictions)
60
+ - **ZenML Dashboard**: `uv run zenml up --port 8871`
61
+
62
+ ### 🟢 Python Environment
63
+ - Use `uv run` to execute scripts in the correct environment.
64
+ - **PYTHONPATH**: When using the custom parallel orchestrator, you MUST include `src` in your path: `export PYTHONPATH=$PYTHONPATH:$(pwd)/src`.
@@ -0,0 +1,32 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [0.2.0] - 2026-02-02
6
+
7
+ ### Added
8
+ - **Parallel Orchestration**: New `ParallelLocalOrchestrator` allowing true concurrent execution of independent DAG branches.
9
+ - **Dynamic Project Bootstrapping**: `zem init` command to create standalone project structures with sample agents.
10
+ - **Adaptive Caching**: Step-level cache control (`cache: true/false`) in pipeline YAML.
11
+ - **Cloud & Parquet Support**: Native loading from S3, GCS, and HTTP; high-performance Parquet IO.
12
+ - **Frontier LLM Integration**: `llm` server with Ollama and OpenAI support for smart curation (PII masking, classification).
13
+ - **Data Sinks**: Seamless export to Hugging Face Hub and Vector Databases (Pinecone, Milvus).
14
+ - **Enhanced Observability**:
15
+ - `zem preview --diff` to compare artifact versions.
16
+ - `zem preview --sample` for random data sampling.
17
+ - `zem dashboard` shortcut for ZenML visualization.
18
+ - **Improved Validation**: Pydantic v2 schemas for robust pipeline configuration.
19
+
20
+ ### Fixed
21
+ - Fixed broken flavor icons in ZenML Dashboard.
22
+ - Improved server path resolution to handle both internal and project-local servers.
23
+ - Fixed f-string escaping and path joining in project bootstrap logic.
24
+ - Standardized tool registration to avoid "multiple values for argument 'name'" errors.
25
+
26
+ ## [0.1.0] - 2026-01-26
27
+
28
+ ### Added
29
+ - Initial foundation with ZenML + MCP integration.
30
+ - Bridge servers for NeMo Curator and DataJuicer.
31
+ - Basic CLI with `run`, `list-tools`, and `preview`.
32
+ - Support for sequential pipelines.
xfmr_zem-0.2.0/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ https://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 Khai Hoang
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
+ https://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.
@@ -0,0 +1,152 @@
1
+ Metadata-Version: 2.4
2
+ Name: xfmr-zem
3
+ Version: 0.2.0
4
+ Summary: Zem: Unified Data Pipeline Framework (ZenML + NeMo Curator + DataJuicer) for multi-domain processing
5
+ Author-email: Khai Hoang <khaihq@vbiacademy.edu.vn>
6
+ License-Expression: Apache-2.0
7
+ License-File: LICENSE
8
+ Keywords: data-juicer,data-pipeline,mlops,nemo-curator,xfmr-zem,zenml
9
+ Requires-Python: <3.13,>=3.10
10
+ Requires-Dist: click>=8.0.0
11
+ Requires-Dist: dask-cuda>=24.0.0
12
+ Requires-Dist: fastmcp>=0.1.0
13
+ Requires-Dist: ftfy>=6.3.1
14
+ Requires-Dist: loguru>=0.7.0
15
+ Requires-Dist: mcp>=0.1.0
16
+ Requires-Dist: nemo-curator>=1.0.0
17
+ Requires-Dist: numpy>=1.24.0
18
+ Requires-Dist: pandas>=2.0.0
19
+ Requires-Dist: pyarrow>=15.0.0
20
+ Requires-Dist: pydantic>=2.0.0
21
+ Requires-Dist: pyyaml>=6.0
22
+ Requires-Dist: rich>=13.0.0
23
+ Requires-Dist: zenml[local,server]>=0.75.0
24
+ Provides-Extra: all
25
+ Requires-Dist: nemo-curator>=0.6.0; extra == 'all'
26
+ Requires-Dist: py-data-juicer>=1.0.0; extra == 'all'
27
+ Requires-Dist: zenml>=0.75.0; extra == 'all'
28
+ Provides-Extra: datajuicer
29
+ Requires-Dist: py-data-juicer>=1.0.0; extra == 'datajuicer'
30
+ Provides-Extra: dev
31
+ Requires-Dist: black>=23.0.0; extra == 'dev'
32
+ Requires-Dist: mypy>=1.0.0; extra == 'dev'
33
+ Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
34
+ Requires-Dist: pytest>=7.0.0; extra == 'dev'
35
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
36
+ Provides-Extra: nemo
37
+ Requires-Dist: nemo-curator>=0.6.0; extra == 'nemo'
38
+ Provides-Extra: zenml
39
+ Requires-Dist: zenml>=0.75.0; extra == 'zenml'
40
+ Description-Content-Type: text/markdown
41
+
42
+ # 🚀 Zem
43
+
44
+ [![Version](https://img.shields.io/badge/version-0.2.0-blue.svg)](https://github.com/OAI-Labs/xfmr-zem/releases)
45
+ [![License](https://img.shields.io/badge/license-Apache--2.0-green.svg)](LICENSE)
46
+ [![ZenML](https://img.shields.io/badge/Orchestration-ZenML-blueviolet)](https://zenml.io)
47
+ [![MCP](https://img.shields.io/badge/Interface-MCP-orange)](https://modelcontextprotocol.io)
48
+
49
+ **Zem** is a high-performance, unified data pipeline framework designed for the modern AI era. It seamlessly bridges **ZenML's** production-grade orchestration with specialized curation powerhouses like **NVIDIA NeMo Curator** and **Alibaba Data-Juicer** using the **Model Context Protocol (MCP)**.
50
+
51
+ ---
52
+
53
+ ## ✨ Key Features
54
+
55
+ - 🏗️ **Config-Driven Power**: Define complex, production-ready pipelines in single YAML files.
56
+ - ⚡ **True Parallel DAGs**: Execute independent processing branches concurrently using a custom `ParallelLocalOrchestrator`.
57
+ - 🧠 **Frontier LLM Integration**: Smart data masking, classification, and summarization via **Ollama** or **OpenAI**.
58
+ - 📊 **Deep Observability**: Real-time profiling, per-tool performance metrics, and a beautiful integrated dashboard.
59
+ - 🔄 **Adaptive Caching**: Fine-grained, step-level cache control to optimize your development cycles.
60
+ - 🔌 **Cloud Native**: Native support for S3, GCS, and Parquet with seamless export to **Hugging Face Hub** and **Vector DBs**.
61
+
62
+ ---
63
+
64
+ ## 🏗️ Architecture
65
+
66
+ ```mermaid
67
+ graph TD
68
+ YAML["📄 pipeline.yaml"] --> Client["🛠️ Zem CLI / Client"]
69
+ Client --> ZenML["🌀 ZenML Orchestrator"]
70
+ ZenML --> Parallel["⚡ Parallel Local Orchestrator"]
71
+ Parallel --> MCP_Bridge["🔗 MCP Bridge"]
72
+
73
+ subgraph "Specialized Servers (MCP)"
74
+ MCP_Bridge --> Nemo["🦁 NeMo Curator (GPU)"]
75
+ MCP_Bridge --> DJ["🧃 Data-Juicer"]
76
+ MCP_Bridge --> LLM["🤖 Frontier LLMs"]
77
+ MCP_Bridge --> Prof["📈 Profiler"]
78
+ end
79
+
80
+ subgraph "Storage & Sinks"
81
+ Nemo --> S3["☁️ Cloud / Parquet"]
82
+ DJ --> HF["🤗 Hugging Face"]
83
+ LLM --> VDB["🌐 Vector DB"]
84
+ end
85
+ ```
86
+
87
+ ---
88
+
89
+ ## 🚀 Quick Start
90
+
91
+ ### 1. Installation
92
+ ```bash
93
+ git clone https://github.com/OAI-Labs/xfmr-zem.git
94
+ cd xfmr-zem
95
+ uv sync
96
+ ```
97
+
98
+ ### 2. Initialize a New Project
99
+ ```bash
100
+ # Bootstrap a standalone project with a sample agent
101
+ uv run zem init my_project
102
+ cd my_project
103
+ ```
104
+
105
+ ### 3. Run Your First Pipeline
106
+ ```bash
107
+ uv run zem run pipeline.yaml
108
+ ```
109
+
110
+ ### 4. Visualize & Inspect
111
+ ```bash
112
+ # Open ZenML Dashboard
113
+ uv run zem dashboard
114
+
115
+ # Preview results with sampling
116
+ uv run zem preview <artifact_id> --sample --limit 5
117
+ ```
118
+
119
+ ---
120
+
121
+ ## 📖 Guided Documentation
122
+
123
+ | Topic | Description | Link |
124
+ |-------|-------------|------|
125
+ | **Core Concepts** | Understand the Zem architecture and MCP model. | [AGENTS.md](AGENTS.md) |
126
+ | **Pipeline YAML** | How to write and validate your pipeline configs. | [Standard Example](tests/manual/standard_data_pipeline.yaml) |
127
+ | **Advanced Parallelism** | Setup true local concurrency. | [Parallel Guide](tests/manual/parallel_test.yaml) |
128
+ | **LLM & Sinks** | Connecting to external AI stacks. | [Phase 4 Demo](tests/manual/phase4_test.yaml) |
129
+
130
+ ---
131
+
132
+ ## 🤝 Contributing
133
+
134
+ We welcome contributions! Whether it's a new MCP server, a performance fix, or a typo in the docs, feel free to open a Pull Request.
135
+
136
+ 1. Fork the Project
137
+ 2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
138
+ 3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
139
+ 4. Push to the Branch (`git push origin feature/AmazingFeature`)
140
+ 5. Open a Pull Request
141
+
142
+ ---
143
+
144
+ ## ⚖️ License
145
+
146
+ Distributed under the **Apache-2.0 License**. See `LICENSE` for more information.
147
+
148
+ ---
149
+
150
+ <p align="center">
151
+ Built with ❤️ by the <b>OAI-Labs</b> Team
152
+ </p>
@@ -0,0 +1,111 @@
1
+ # 🚀 Zem
2
+
3
+ [![Version](https://img.shields.io/badge/version-0.2.0-blue.svg)](https://github.com/OAI-Labs/xfmr-zem/releases)
4
+ [![License](https://img.shields.io/badge/license-Apache--2.0-green.svg)](LICENSE)
5
+ [![ZenML](https://img.shields.io/badge/Orchestration-ZenML-blueviolet)](https://zenml.io)
6
+ [![MCP](https://img.shields.io/badge/Interface-MCP-orange)](https://modelcontextprotocol.io)
7
+
8
+ **Zem** is a high-performance, unified data pipeline framework designed for the modern AI era. It seamlessly bridges **ZenML's** production-grade orchestration with specialized curation powerhouses like **NVIDIA NeMo Curator** and **Alibaba Data-Juicer** using the **Model Context Protocol (MCP)**.
9
+
10
+ ---
11
+
12
+ ## ✨ Key Features
13
+
14
+ - 🏗️ **Config-Driven Power**: Define complex, production-ready pipelines in single YAML files.
15
+ - ⚡ **True Parallel DAGs**: Execute independent processing branches concurrently using a custom `ParallelLocalOrchestrator`.
16
+ - 🧠 **Frontier LLM Integration**: Smart data masking, classification, and summarization via **Ollama** or **OpenAI**.
17
+ - 📊 **Deep Observability**: Real-time profiling, per-tool performance metrics, and a beautiful integrated dashboard.
18
+ - 🔄 **Adaptive Caching**: Fine-grained, step-level cache control to optimize your development cycles.
19
+ - 🔌 **Cloud Native**: Native support for S3, GCS, and Parquet with seamless export to **Hugging Face Hub** and **Vector DBs**.
20
+
21
+ ---
22
+
23
+ ## 🏗️ Architecture
24
+
25
+ ```mermaid
26
+ graph TD
27
+ YAML["📄 pipeline.yaml"] --> Client["🛠️ Zem CLI / Client"]
28
+ Client --> ZenML["🌀 ZenML Orchestrator"]
29
+ ZenML --> Parallel["⚡ Parallel Local Orchestrator"]
30
+ Parallel --> MCP_Bridge["🔗 MCP Bridge"]
31
+
32
+ subgraph "Specialized Servers (MCP)"
33
+ MCP_Bridge --> Nemo["🦁 NeMo Curator (GPU)"]
34
+ MCP_Bridge --> DJ["🧃 Data-Juicer"]
35
+ MCP_Bridge --> LLM["🤖 Frontier LLMs"]
36
+ MCP_Bridge --> Prof["📈 Profiler"]
37
+ end
38
+
39
+ subgraph "Storage & Sinks"
40
+ Nemo --> S3["☁️ Cloud / Parquet"]
41
+ DJ --> HF["🤗 Hugging Face"]
42
+ LLM --> VDB["🌐 Vector DB"]
43
+ end
44
+ ```
45
+
46
+ ---
47
+
48
+ ## 🚀 Quick Start
49
+
50
+ ### 1. Installation
51
+ ```bash
52
+ git clone https://github.com/OAI-Labs/xfmr-zem.git
53
+ cd xfmr-zem
54
+ uv sync
55
+ ```
56
+
57
+ ### 2. Initialize a New Project
58
+ ```bash
59
+ # Bootstrap a standalone project with a sample agent
60
+ uv run zem init my_project
61
+ cd my_project
62
+ ```
63
+
64
+ ### 3. Run Your First Pipeline
65
+ ```bash
66
+ uv run zem run pipeline.yaml
67
+ ```
68
+
69
+ ### 4. Visualize & Inspect
70
+ ```bash
71
+ # Open ZenML Dashboard
72
+ uv run zem dashboard
73
+
74
+ # Preview results with sampling
75
+ uv run zem preview <artifact_id> --sample --limit 5
76
+ ```
77
+
78
+ ---
79
+
80
+ ## 📖 Guided Documentation
81
+
82
+ | Topic | Description | Link |
83
+ |-------|-------------|------|
84
+ | **Core Concepts** | Understand the Zem architecture and MCP model. | [AGENTS.md](AGENTS.md) |
85
+ | **Pipeline YAML** | How to write and validate your pipeline configs. | [Standard Example](tests/manual/standard_data_pipeline.yaml) |
86
+ | **Advanced Parallelism** | Setup true local concurrency. | [Parallel Guide](tests/manual/parallel_test.yaml) |
87
+ | **LLM & Sinks** | Connecting to external AI stacks. | [Phase 4 Demo](tests/manual/phase4_test.yaml) |
88
+
89
+ ---
90
+
91
+ ## 🤝 Contributing
92
+
93
+ We welcome contributions! Whether it's a new MCP server, a performance fix, or a typo in the docs, feel free to open a Pull Request.
94
+
95
+ 1. Fork the Project
96
+ 2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
97
+ 3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
98
+ 4. Push to the Branch (`git push origin feature/AmazingFeature`)
99
+ 5. Open a Pull Request
100
+
101
+ ---
102
+
103
+ ## ⚖️ License
104
+
105
+ Distributed under the **Apache-2.0 License**. See `LICENSE` for more information.
106
+
107
+ ---
108
+
109
+ <p align="center">
110
+ Built with ❤️ by the <b>OAI-Labs</b> Team
111
+ </p>
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,2 @@
1
+ {"text": "Sample 1 from file ", "id": 101}
2
+ {"text": "Sample 2 from file", "id": 102}