Skip to content

fix(model): wire minimax_timeout_seconds across config, trainer, and CLI pipelines - #347

Open
Hrushikesh Ramilla (Hrushikesh-ramilla) wants to merge 1 commit into
microsoft:mainfrom
Hrushikesh-ramilla:fix/minimax-timeout-config-pipeline
Open

Hrushikesh Ramilla (Hrushikesh-ramilla) wants to merge 1 commit into
microsoft:mainfrom
Hrushikesh-ramilla:fix/minimax-timeout-config-pipeline

Conversation

@Hrushikesh-ramilla

Copy link
Copy Markdown

Description

configure_minimax_chat already supports timeout_seconds, but minimax_timeout_seconds was missing from the configuration pipeline and execution entry points:

  • In skillopt/config.py: model.minimax_timeout_seconds was missing from _FLATTEN_MAP, which caused flatten_config() to silently drop it.
  • In scripts/train.py: --minimax_timeout_seconds was missing from the CLI arguments and _LEGACY_TO_STRUCTURED mapping.
  • In scripts/eval_only.py: --minimax_timeout_seconds was missing from CLI arguments and _CLI_TO_STRUCTURED, and timeout_seconds was not forwarded to configure_minimax_chat(...).
  • In skillopt/engine/trainer.py: configure_minimax_chat(...) did not forward timeout_seconds=cfg.get("minimax_timeout_seconds").
  • In configs/_base_/default.yaml and docs/reference/config.md: minimax_timeout_seconds was undocumented.

This PR wires minimax_timeout_seconds across all layers so that users can configure MiniMax request timeouts via YAML configs, --cfg-options, or CLI flags in both training and evaluation workflows.

Key Changes

  1. Config pipeline (skillopt/config.py): Added "model.minimax_timeout_seconds": "minimax_timeout_seconds" to _FLATTEN_MAP.
  2. Training CLI (scripts/train.py): Added --minimax_timeout_seconds CLI argument and mapped it in _LEGACY_TO_STRUCTURED.
  3. Evaluation CLI (scripts/eval_only.py): Added --minimax_timeout_seconds CLI argument, mapped it in _CLI_TO_STRUCTURED, and forwarded timeout_seconds=cfg.get("minimax_timeout_seconds") to configure_minimax_chat(...).
  4. Trainer (skillopt/engine/trainer.py): Forwarded timeout_seconds=cfg.get("minimax_timeout_seconds") to configure_minimax_chat(...) during trainer initialization.
  5. Base config & Docs (configs/_base_/default.yaml, docs/reference/config.md): Added minimax_timeout_seconds: "300.0" under MiniMax backend settings and documented it in the configuration reference table.
  6. Unit Tests (tests/test_minimax_config.py): Added test coverage verifying config flattening, --cfg-options overrides, CLI argument parsing, and timeout propagation in train.py, eval_only.py, and trainer.py.

Verification

  • pytest tests/test_minimax_config.py tests/test_minimax_backend.py tests/test_openai_compatible_config.py tests/test_codex_config_aliases.py -v: all 98 tests passed.
  • mkdocs build --strict: passed with 0 warnings/errors.
  • ruff check skillopt/config.py skillopt/engine/trainer.py tests/test_minimax_config.py: all checks passed.

…CLI pipelines

configure_minimax_chat supports timeout_seconds, but model.minimax_timeout_seconds
was dropped during config flattening, lacked CLI flags in train.py and eval_only.py,
and was not forwarded during trainer and eval initialization.

This change:
- Maps model.minimax_timeout_seconds in _FLATTEN_MAP (skillopt/config.py).
- Adds --minimax_timeout_seconds flag and structured mapping in scripts/train.py and scripts/eval_only.py.
- Forwards timeout_seconds to configure_minimax_chat in scripts/eval_only.py and skillopt/engine/trainer.py.
- Documents the setting in configs/_base_/default.yaml and docs/reference/config.md.
- Adds comprehensive unit tests in tests/test_minimax_config.py.
lucatreiber2007 added a commit to lucatreiber2007/SkillOpt that referenced this pull request Nov 1, 2026
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant