ingestion-pipelines
Operate M-flow ingestion, loader selection, memorization stages, procedural learning, and custom pipeline workflows.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- ingestion-pipelines
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Operate M-flow ingestion, loader selection, memorization stages, procedural learning, and custom pipeline workflows.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/data-formats.md7.1 KB
- 参考文档references/pipeline-reference.md11.6 KB
- 参考文档references/troubleshooting.md8.2 KB
- 脚本scripts/pipeline_stage_inspector.py7.1 KB
03 SKILL.md 正文
M-flow ingestion pipelines
Use this sub-skill when the task is about getting data into M-flow memory or assembling ingestion/memorization pipelines:
- choose input shapes, loaders,
preferred_loaders, chunking, andcontent_type; - run one-step
ingest(), stagedadd()thenmemorize(), or advancedrun_custom_pipeline()workflows; - configure memorization layers: episodic, procedural, content routing, episode routing, precise mode, and conflict handling;
- extract procedural memory later with
learn()from already-built episodic memory.
Route elsewhere:
- basic CLI/API quickstarts, dataset CRUD, and first-time examples →
core-memory-api; RecallMode,search(),query(), graph/vector adapter tuning, and retrieval ranking →retrieval-graph-search;- running API servers, UI, MCP, Docker, and service integration topology →
service-integrations.
First decisions
- Separate ingestion from memorization when you need control. Use
ingest()for the common add+memorize path. Useadd()thenmemorize()when you need to validate stored data first, use different loader/chunking settings, skip/query later, or recover from a failed memorize stage. - Declare content shape before LLM routing. With content routing enabled, pass
content_type=ContentType.TEXTfor articles/notes/code-like prose andcontent_type=ContentType.DIALOGfor chats, interviews, meeting logs, or transcripts. For mixed article + transcript data, prefer separate calls/datasets per content type instead of one mixed call. - Choose memory layers intentionally. Episodic memory is enabled by default. Procedural extraction is opt-in during
memorize(enable_procedural=True)or can be run later withlearn(). - Use
conflict_mode="error"for production jobs. It prevents accidental concurrentmemorize()runs over the same dataset. Use"warn"for interactive work and"ignore"only when you accept duplicate/inconsistent graph risk. - Inspect the runtime before advising. Run scripts/pipeline_stage_inspector.py to list the installed loader registry and public signatures without executing a pipeline.
Common recipes
One-step ingestion with explicit routing
import m_flow
from m_flow import ContentType
result = await m_flow.ingest(
data=["meeting-notes.txt", "transcript.txt"],
dataset_name="team-memory",
content_type=ContentType.DIALOG,
enable_content_routing=True,
enable_procedural=True,
conflict_mode="error",
)
if result.needs_retry():
# add() succeeded but memorize() failed; retry only the dataset's memorize stage.
await m_flow.memorize(datasets=[result.dataset_name], content_type=ContentType.DIALOG)
Staged add then memorize
import m_flow
from m_flow import ContentType
await m_flow.add(
data=["docs/overview.md", "docs/reference.pdf"],
dataset_name="docs",
preferred_loaders=[
{"advanced_pdf_loader": {"strategy": "hi_res"}},
"pypdf_loader",
"text_loader",
],
)
await m_flow.memorize(
datasets=["docs"],
chunk_size=1200,
chunks_per_batch=20,
content_type=ContentType.TEXT,
enable_content_routing=True,
precise_mode=True,
conflict_mode="error",
)
Learn procedures from existing episodic memory
import m_flow
# Prefer dataset-wide learning for duplicate prevention: learn() skips Episodes
# that already have derived_procedure edges when it discovers Episodes itself.
summary = await m_flow.learn(datasets=["team-memory"])
print(summary)
learn(run_in_background=True) is accepted by the public signature but currently logs a warning and runs synchronously so it can create derived_procedure edges after procedure persistence.
Reference map
- references/data-formats.md: accepted data shapes, loader registry, optional loader extras,
preferred_loaders, and content-type decisions. - references/pipeline-reference.md: memorize stage order, toggles,
learn(),Stage,run_custom_pipeline(), and validation commands. - references/troubleshooting.md: loader, path, routing, concurrency, procedural, and custom-pipeline failure signals.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).