Skip to main content

Module env_validation

Module env_validation 

Source
Expand description

Environment validation — .mlstack_env checking with sensible defaults.

Ports functionality from scripts/env_validation_utils.sh:

  • Validates .mlstack_env file exists and contains required variables
  • Provides sensible defaults for missing values
  • Validates ROCM_CHANNEL value
  • Auto-detects GPU_ARCH and ROCM_VERSION when possible

§Validation Assertions

  • VAL-INFRA-017: .mlstack_env validation with sensible defaults
  • VAL-INFRA-022: Graceful handling of missing dependencies (no panics)

Structs§

EnvValidationResult
Result of validating the .mlstack_env file.
EnvVars
Resolved environment variables from .mlstack_env.

Functions§

default_env_path
Get the default path for .mlstack_env.
default_venv_base
Get the default venv base directory.
load_mlstack_env
Load the .mlstack_env file into the current process environment.
require_mlstack_env
Require .mlstack_env validation — always succeeds with defaults.
validate_mlstack_env
Validate the .mlstack_env file and return resolved variables.