Local execution compiles a Local Protocol Profile–compatible YAML file into
a DataPipeline, runs ApiTask stages on your machine,
and returns a wide results table. Install the pipeline extra first:
pip install "biolm-sdk[pipeline]"
Supported features and limitations are documented in Local Protocol Profile v1.
CLI: biolm protocol run-local
biolm protocol run-local my_protocol.yaml --input sequence=MKLLIV
biolm protocol run-local my_protocol.yaml --input sequences='["MKLLIV","MKTAY"]' --json
--input accepts key=value pairs. Values are parsed as JSON when
possible (lists, numbers, booleans); otherwise they are treated as plain
strings. Use --json to print the full records list. Use
--output-dir to set the pipeline DuckDB cache directory.
For hosted platform runs of a registered protocol slug, use
biolm protocol run SLUG instead — see Running Protocols on the Platform.
Python: Protocol.execute()
from biolm.protocols import Protocol
protocol = Protocol("my_protocol.yaml")
result = protocol.execute(inputs={"sequence": "MKLLIV"})
print(result.run_id)
print(result.records) # list[dict] — all rows
print(result.selected_records) # rows matching outputs[] rules (if any)
print(result.dataframe) # pandas DataFrame
The convenience function run_local_protocol() accepts a
parsed protocol dict instead of a file path.
Results and outputs[] selection
After a local run, LocalRunResult exposes:
records— every row from the final pipeline DataFrame (JSON-safe dicts).selected_records— union of rows selected by the protocol’soutputs[]rules (where,order_by,limit), using the same logic as MLflow protocol logging.output_selections— per-rule breakdown (rule_index,rule,records).
Example protocol snippet:
outputs:
- where: "${{ mean_plddt > 70 }}"
order_by:
- field: mean_plddt
order: desc
limit: 10
result = protocol.execute(inputs={"sequences": ["MKLLIV", "MKTAY"]})
top = result.selected_records
for rule_sel in result.output_selections:
print(rule_sel.rule_index, len(rule_sel.records))
SeqFrame bridge (optional)
If you have the seqframe extra installed, materialize results as a
SeqFrame:
sf = result.to_seqframe() # requires pip install "biolm[seqframe]"
Unsupported features
Protocols using gather, foreach, subtasks, non-ApiTask runners, or
tasks. expressions in templates fail fast at compile time with
UnsupportedProtocolFeature. See Local Protocol Profile v1 for the full
matrix.
See also
Local Protocol Profile v1 — Local Protocol Profile v1 reference
Authoring and Validating Protocols — validate before running
biolm.protocols — API reference
biolm protocol — CLI options for
run-local