Streamlit form schema
ui.streamlit describes a generic launch form. DrtmlStepLauncher renders it, reads defaults from merged params, and returns a params overlay. The step never imports Streamlit.
Declared title / submit_label may exist in DRTML for future shell use; the current Streamlit shell still owns its own page chrome and submit buttons. Rely on fields and generic control blocks for live behavior.
Complete example
Section titled “Complete example”ui: streamlit: enabled: true
fields: corpus_uri: type: text label: Corpus URI param: domain.corpus_uri required: true help: Local path or configured object URI
upstream_runs: type: runs_picker label: Upstream run IDs param: mapping.upstream_runs
max_docs: type: int label: Maximum documents param: runtime.max_docs min: 0
threshold: type: float label: Score threshold param: domain.score_threshold min: 0.0 step: 0.05
normalize: type: checkbox label: Normalize text param: domain.normalize
language: type: select label: Language param: domain.language options: [en, de, fr]
io_controls: enabled: true
runtime_controls: enabled: true
parallelism_controls: enabled: true title: Partition workers backend_options: [inprocess, processes, ray] default_backend: inprocess backend_label: Dispatch backend workers_label: Worker count ray_address_label: Ray Client address
flush_controls: from_dataset_output: true mode_param_template: flush.{dataset}.mode value_param_template: flush.{dataset}.value
compute_controls: enabled: false
embed_train_controls: enabled: falseField types
Section titled “Field types”Rendered with st.text_input; returns stripped text.
runs_picker
Section titled “runs_picker”Rendered with st.text_area. List defaults are serialized as comma-separated text. Use it for upstream run selection fields interpreted by the corresponding runtime parser.
int / integer
Section titled “int / integer”Rendered with integer number_input. Supports min, default, label, help, and param.
float / number
Section titled “float / number”Rendered with floating number_input. Supports min and step.
bool / boolean / checkbox
Section titled “bool / boolean / checkbox”Rendered with st.checkbox.
select
Section titled “select”Rendered with st.selectbox; requires non-empty options. An invalid default falls back to the first option.
Unknown types deliberately fall back to a text input.
Common field properties
Section titled “Common field properties”param: merged params key; defaults to the field id.label: visible label; defaults to field id.help: Streamlit help text.default: fallback only;params_defaultstakes precedence.required: keep empty values in the overlay and let validation/runtime reject them. Optional empty values are omitted.
Use only namespaces allowed by DRTML validation. A control is valid only if a runtime/domain reader consumes its param.
Generated control groups
Section titled “Generated control groups”io_controls
Section titled “io_controls”Shown when the manifest has outputs. Currently exposes global parquet compression (storage.parquet_compression) from the framework codec catalog.
runtime_controls
Section titled “runtime_controls”Produces:
runtime.resume_enabledruntime.progress_log_every_n_docsruntime.finalize_flush_every_n_docsruntime.document_batch_sizeruntime.corpus_batch_max_chars
Use it for partition-loop/corpus steps only. Disable it for modes that do not consume these params.
parallelism_controls
Section titled “parallelism_controls”Produces:
runtime.parallelism.backendruntime.parallelism.workers- optional
runtime.parallelism.ray_address
Configuration may customize labels/help/backend options and expose embed-specific inflight/feed-cap controls.
flush_controls
Section titled “flush_controls”When from_dataset_output: true, the renderer enumerates output datasets and creates flush.<dataset>.mode / .value controls seeded from each DRTML flush block. Runtime applies them as StoragePlan overrides.
compute_controls
Section titled “compute_controls”Current builtin renders SGNS settings: embedding method, dimension, epochs, learning rate, negative samples, seed, threads, minimum token count, pair radius/window, pair batch size, and pair-weight damping.
embed_train_controls
Section titled “embed_train_controls”Renders one descriptor/material kind per run from configured kinds and writes the list-valued compute.embed_kinds (or configured kind_param).
Launch flow
Section titled “Launch flow”manifest + params_defaults → streamlit_ui_spec → DrtmlStepLauncher.render_form → params overlay → Airflow/local launch request → merged_params_from_manifest → framework dispatchThe renderer does not execute the step and does not write datasets. It only constructs the same namespaced params overlay that any other integration can submit.
Extending form capabilities
Section titled “Extending form capabilities”For a generic field type:
- define the YAML shape and namespace behavior;
- add rendering to
_render_fieldinintegration/ui/drtml_form.py; - add manifest/UI validation;
- ensure a runtime/domain consumer exists;
- add form tests for defaults, empty/required behavior, and overlay type;
- document the field here.
For a reusable group, create a focused renderer module, call it from DrtmlStepLauncher, and keep all step-specific names in DRTML configuration. Do not add custom forms to step packages.