Skip to content

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.

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: false

Rendered with st.text_input; returns stripped text.

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.

Rendered with integer number_input. Supports min, default, label, help, and param.

Rendered with floating number_input. Supports min and step.

Rendered with st.checkbox.

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.

  • param: merged params key; defaults to the field id.
  • label: visible label; defaults to field id.
  • help: Streamlit help text.
  • default: fallback only; params_defaults takes 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.

Shown when the manifest has outputs. Currently exposes global parquet compression (storage.parquet_compression) from the framework codec catalog.

Produces:

  • runtime.resume_enabled
  • runtime.progress_log_every_n_docs
  • runtime.finalize_flush_every_n_docs
  • runtime.document_batch_size
  • runtime.corpus_batch_max_chars

Use it for partition-loop/corpus steps only. Disable it for modes that do not consume these params.

Produces:

  • runtime.parallelism.backend
  • runtime.parallelism.workers
  • optional runtime.parallelism.ray_address

Configuration may customize labels/help/backend options and expose embed-specific inflight/feed-cap 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.

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.

Renders one descriptor/material kind per run from configured kinds and writes the list-valued compute.embed_kinds (or configured kind_param).

manifest + params_defaults
→ streamlit_ui_spec
→ DrtmlStepLauncher.render_form
→ params overlay
→ Airflow/local launch request
→ merged_params_from_manifest
→ framework dispatch

The 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.

For a generic field type:

  1. define the YAML shape and namespace behavior;
  2. add rendering to _render_field in integration/ui/drtml_form.py;
  3. add manifest/UI validation;
  4. ensure a runtime/domain consumer exists;
  5. add form tests for defaults, empty/required behavior, and overlay type;
  6. 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.