fix: declare log file fields in RunState dataclass - #15557
Open
vominh1919 wants to merge 2 commits into
Open
vominh1919 wants to merge 2 commits into
vominh1919 wants to merge 2 commits into
Conversation
…m providers Fixes: - NousResearch#13766: CLI agents no longer emit MEDIA:/path tags (CLI has no attachment channel) - NousResearch#13765: Add 'from __future__ import annotations' to 64 files for Python 3.9 PEP-604 compatibility - NousResearch#13764: Model switch now searches custom_providers catalog before API probe Changes: - agent/prompt_builder.py: Extend CLI platform hint to prevent MEDIA: tag emission - cli.py: Load custom_providers unconditionally (not just for picker) - hermes_cli/model_switch.py: Add _find_model_in_custom_providers() helper, insert step c2 in PATH B - hermes_cli/models.py: normalize_provider() handles custom:* slugs - 64 files: Add 'from __future__ import annotations' for Python 3.9 compatibility
api_log_file, trainer_log_file, and env_log_file are set dynamically on RunState instances but were never declared as dataclass fields. They work via __dict__ but would break if slots=True is added (a common optimization). Declare them explicitly so type checkers, IDE autocomplete, and dataclasses.fields() see them.
teknium1
reviewed
Jul 12, 2026
teknium1
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the cleanup. The three declarations are internally consistent for the historical module, but they no longer have a target on current main.
Problems
tools/rl_training_tool.py:140is in a module explicitly removed by current-main commit5af672c75(tools/rl_training_tool.py, all RL tools/tests, and the Atropos integration). A tracked-HEAD search finds no remainingRunStateor log-file assignment to amend.- This PR also includes unrelated parent commit
7174fbf725e0, which changes 69 files includingcli.pyandagent/prompt_builder.py; the stated fix itself is only the three-line commitc71d84dbc764.
Suggested changes
- Any future RL restoration should be proposed against the current architecture with its required integration and tests, rather than salvaging this field-only change.
- The
7174fbf725e0changes should be evaluated independently of this dataclass cleanup.
Automated hermes-sweeper review.
| api_process: Optional[subprocess.Popen] = None | ||
| trainer_process: Optional[subprocess.Popen] = None | ||
| env_process: Optional[subprocess.Popen] = None | ||
| api_log_file: Optional[Any] = None |
Collaborator
There was a problem hiding this comment.
Current main deliberately deleted this entire Atropos/RL module in 5af672c75; there is no remaining RunState to amend. A field-only salvage cannot apply without a separate decision to restore the RL integration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
api_log_file,trainer_log_file, andenv_log_fileare set dynamically onRunStateinstances (lines 337, 360, 401) but are never declared as dataclass fields. They work via__dict__but:dataclasses.fields()slots=Trueis added to the dataclass (a common optimization)Fix
Declare the three fields explicitly in the
RunStatedataclass: