DocsOverview
Passing ParamsOverview

Get the examples

The runnable Polyaxonfiles for this section are in the passing-params directory of the Polyaxon quick-start repository.

If you do not already have the repository, clone it and enter its root:

git clone https://github.com/polyaxon/polyaxon-quick-start.git
cd polyaxon-quick-start

The commands in this section assume that you run them from this directory. Each page also shows the relevant Polyaxonfile so you can see how the values are mapped.

A component declares typed inputs and outputs. When you start a run, an operation maps values to those definitions. The -P/--params option lets you provide or override input values from the CLI. Polyaxon validates and records the resolved values before executing the workload.

The component must also define how its container program receives those values.

Use command-line arguments when your program exposes a CLI. This is the clearest starting point for most programs because the expected inputs remain explicit.

Use environment variables when the program already reads configuration from its environment or when you do not want to add command-line arguments.

Use input and output dictionaries when the program needs the complete set of values rather than individual fields.

Use the Python library when the program needs to read or update run inputs and outputs while it is running.

These methods change how values reach your program. They do not change the component's input and output definitions. See the params specification for the available mappings and transformations.