Skip to content

air: Note in config help that some parameter floats load as strings - #7827

Merged
caroline-db merged 3 commits into
mainfrom
air-parameters-float-help
Nov 23, 2026
Merged

caroline-db merged 3 commits into
mainfrom
air-parameters-float-help

Conversation

@caroline-db

@caroline-db caroline-db commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Changes

air run -h config.parameters now explains that parameters are written as YAML to $HYPERPARAMETERS_PATH. It warns that Python's yaml.safe_load may return very small or large floats as strings and tells Python users to convert them with float() after loading. The air run -h config field summary now identifies the destination file.

Why

air run re-encodes parameters before uploading them, and go-yaml writes floats below 1e-4 or at least 1e6 in exponent form, usually without a decimal point (1e-05, 1e+06). PyYAML's yaml.safe_load, the usual way Python scripts read this file, follows YAML 1.1 and returns that form as a string, so training scripts that don't convert the value can fail at optimizer setup. This PR documents that behavior without changing how the file is written.

Tests

  • Checked the rendered air run -h config.parameters output locally.
  • Updated the acceptance/air/config-help snapshot and ran go test ./acceptance -run TestAccept/air/config-help.

This pull request and its description were written by Isaac.

air run re-encodes parameters, writing floats such as 2e-5 and 1e6 in exponent
form without a decimal point, which PyYAML's yaml.safe_load reads as strings.

Co-authored-by: Isaac <no-reply@databricks.com>
@caroline-db
caroline-db requested review from a team as code owners November 19, 2026 20:22
@github-actions github-actions Bot added the AIR Databricks AI Runtime CLI label Nov 19, 2026
Co-authored-by: Isaac <no-reply@databricks.com>
@caroline-db
caroline-db force-pushed the air-parameters-float-help branch from ad0db94 to 5ca5521 Compare November 19, 2026 20:35
@caroline-db caroline-db changed the title [CNXT-2700] air: Note in config help that some parameter floats load as strings air: Note in config help that some parameter floats load as strings Nov 19, 2026
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 3f1bac4

Run: 45210734896

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 272 20 10:31
💚​ aws-windows-latest-4core-16gb 1 274 18 6:06
💚​ azure linux-2core-8gb 1 271 20 8:40
💚​ azure-windows-latest-4core-16gb 1 273 18 7:21
💚​ gcp linux-2core-8gb 1 272 20 9:12
💚​ gcp-windows-latest-4core-16gb 1 274 18 6:17
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 6 slowest tests (at least 2 minutes):
duration env testname
3:59 aws linux-2core-8gb TestAccept
3:21 gcp linux-2core-8gb TestAccept
3:20 azure linux-2core-8gb TestAccept
2:29 azure-windows-latest-4core-16gb TestSyncIncrementalSyncPythonNotebookToFile
2:03 gcp-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsDelete
2:00 azure linux-2core-8gb TestFilerRecursiveDelete/workspace_files_extensions

Comment thread cmd/air/runconfig.go Resolved
@github-actions

Copy link
Copy Markdown
Contributor

Commit: 3f1bac458 | Workflow run

Regression test report

Selected 1 changed tests (limit=20, 0 not selected)

1 tests: regression=1 unreleased=0 coverage=0 failing=0
test branch main (396e51a) latest (v1.27.0)
TestAccept/air/config-help ✅ ❌ ❌
TestAccept/air/config-help: branch ✅ | main (396e51a) ❌ | latest (v1.27.0) ❌

main (396e51a):

acceptance_test.go:1402: Diff:
        --- air/config-help/output.txt
        +++ /tmp/TestAcceptairconfig-help2008302284/002/output.txt
        @@ -69,7 +69,7 @@
             env_variables                Plain environment variables, as NAME: value.
             secrets                      Environment variables sourced from secrets, as NAME: scope/key.
             code_source                  Local code to upload and make available to the run.
        -    parameters                   Free-form values written as YAML to $HYPERPARAMETERS_PATH.
        +    parameters                   Free-form values passed through to the workload.
         
           Execution:
             max_retries                  How many times to retry a failed run.
        
FAIL

latest (v1.27.0):

acceptance_test.go:1402: Diff:
        --- air/config-help/output.txt
        +++ /tmp/TestAcceptairconfig-help3963717717/002/output.txt
        @@ -34,7 +34,7 @@
               --watch[=true|false]       Stream logs until the run completes
               --override stringArray     Override a YAML field, e.g. compute.num_accelerators=8 (repeatable)
               --dry-run[=true|false]     Validate the config against the workspace without submitting a run
        -      --idempotency-key string   Return the existing run if this key was already used (max 64 characters)
        +      --idempotency-key string   Return the existing run if this key was already used
           -h, --help[=true|false]        help for run
         
         Global Flags:
        @@ -69,7 +69,7 @@
             env_variables                Plain environment variables, as NAME: value.
             secrets                      Environment variables sourced from secrets, as NAME: scope/key.
             code_source                  Local code to upload and make available to the run.
        -    parameters                   Free-form values written as YAML to $HYPERPARAMETERS_PATH.
        +    parameters                   Free-form values passed through to the workload.
         
           Execution:
             max_retries                  How many times to retry a failed run.
        @@ -113,12 +113,12 @@
             GPU_1xRTX6000 - 1 accelerator per node
         
           Fields:
        -    num_accelerators     (required) Total number of GPUs to allocate.
        -    accelerator_type     (required) Which accelerator to run on, e.g. GPU_1xA10.
        +    num_accelerators  (required) Total number of GPUs to allocate.
        +    accelerator_type  (required) Which accelerator to run on, e.g. GPU_1xA10.
         
        -  GPU Pools (optional):
        -    accelerator_pool_id  GPU Pool to run on, by ID.
        -    priority_class       Scheduling priority within the GPU Pool: NORMAL.
        +  Provisioned capacity (optional):
        +    pool_id           GPU pool to run on, by id.
        +    priority_class    Scheduling priority within the pool: BEST_EFFORT (lowest, preemptable) or NORMAL.
         
         For details on a field, run "databricks air run -h config.compute.<field>".
         
        @@ -132,15 +131,13 @@
           Required: no
         
         >>> [CLI] air run -h config.compute.accelerator_pool_id
        -config.compute.accelerator_pool_id
        -  GPU Pool to run on, by ID. Must be 1-255 characters. List available pools with 'databricks air pools list'.
        +Error: unknown config field "config.compute.accelerator_pool_id"
         
        -  Type:     string
        -  Required: no
        +fields under "config.compute" are: accelerator_type, num_accelerators, pool_id, priority_class
         
         >>> [CLI] air run -h config.compute.priority_class
         config.compute.priority_class
        -  Scheduling priority within the GPU Pool: NORMAL. Requires accelerator_pool_id.
        +  Scheduling priority within the pool: BEST_EFFORT (lowest, preemptable) or NORMAL. Requires pool_id.
         
           Type:     string
           Required: no
        @@ -231,7 +224,7 @@
         >>> [CLI] air run -h config.compute.acclerator_type
         Error: unknown config field "config.compute.acclerator_type"; did you mean "accelerator_type"?
         
        -fields under "config.compute" are: accelerator_pool_id, accelerator_type, num_accelerators, priority_class
        +fields under "config.compute" are: accelerator_type, num_accelerators, pool_id, priority_class
         
         === free-form map keys are not schema fields
         
        @@ -241,6 +234,8 @@
         === removed pool field is not in the schema
         
         >>> [CLI] air run -h config.compute.pool_id
        -Error: unknown config field "config.compute.pool_id"; did you mean "accelerator_pool_id"?
        +config.compute.pool_id
        +  GPU pool to run on, by id. A GPU pool is a pre-provisioned accelerator reservation; contact your Databricks account team to provision one. Must be 1-255 characters. List available pools with 'databricks air pools list'.
         
        -fields under "config.compute" are: accelerator_pool_id, accelerator_type, num_accelerators, priority_class
        +  Type:     string
        +  Required: no
        
FAIL

@caroline-db
caroline-db added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit ac655e2 Nov 23, 2026
28 checks passed
@caroline-db
caroline-db deleted the air-parameters-float-help branch November 23, 2026 16:31
camielstee-db pushed a commit to camielstee-db/cli that referenced this pull request Nov 24, 2026
## Why
The 1.28.0 changelog had 48 entries, many of them long paragraphs
describing internals, and several features and their follow-up fixes
were split across separate lines.

## Changes
- Merge entries for one feature or its follow-up fixes into one line
that links every PR: AI tools auto-install (6 PRs), `fs` retries,
`aitools --skills-only`, `sandbox ssh`, `air convert-to-dabs`, app
start/deploy, Go SDK bumps.
- Shorten entries over ~30 words to what changed for the user.
- Remove help-text-only entries (databricks#7572, databricks#7827, databricks#7863).
- Add a missing entry for databricks#7804, and fold databricks#7588, databricks#7780 and databricks#7870 into
related lines.
- Mark the `sandbox ssh --port` removal as breaking (the AIR
`compute.pool_id` entry already is).

Merged entries are kept in the file of one of their original PRs, so
each still links the PR that introduced it.

This pull request and its description were written by Isaac.

---------

Co-authored-by: Isaac <no-reply@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AIR Databricks AI Runtime CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants