Skip to content

Refactor/rl cli#109

Merged
ryanmccann1024 merged 1 commit intorefactor/sim-corefrom
refactor/rl-cli
Aug 12, 2025
Merged

Refactor/rl cli#109
ryanmccann1024 merged 1 commit intorefactor/sim-corefrom
refactor/rl-cli

Conversation

@ryanmccann1024
Copy link
Copy Markdown
Collaborator

@ryanmccann1024 ryanmccann1024 commented Aug 7, 2025

📝 Description

This PR refactors the RL training pipeline to restore compatibility with the updated project structure and configuration system. Specifically:

  • Updated train_pipeline.py to correctly extract, format, and pass simulation configuration data to the RL environment.
  • Patched create_environment() to accept flat config dictionaries and wrap them as needed (e.g. in an s1 key) for SimEnv.
  • Preserved backwards compatibility with SimEnv expectations while maintaining minimal surface area for potential breakage.
  • Added TODOs in strategic places to revisit hardcoded assumptions in future refactors.

These changes unblock usage of the run_train.py CLI entrypoint and allow proper training execution using --agent_type rl with .ini-based configs.


Fixes

Fixes: # (restore compatibility of RL pipeline post-refactor)


🧐 Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (modifies pipeline behavior and SimEnv input expectations)
  • 💅 UI/UX change (improves the user interface or experience)
  • 📚 Documentation update
  • ⚙️ Chore (refactoring, compatibility patching)

💥 Impact of Breaking Change

  • SimEnv still expects sim_dict to include an s1 key. This PR introduces a shim inside create_environment() to enforce that format.
  • Future agents or environments expecting different formats may require additional preprocessing or abstraction.
  • Config management and training execution now rely on ConfigManager.from_args() and support .ini configs end-to-end.

🧪 How Has This Been Tested?

All changes were tested by:

  • Running the full RL training CLI using:
    python -m fusion.cli.run_train --config ini/run_ini/config.ini --agent_type rl --run_id test123

The RL pipeline is not working properly with the new refactor including:

- Input/Output results
- Config files
@ryanmccann1024 ryanmccann1024 changed the base branch from main to refactor/sim-core August 7, 2025 16:56
@ryanmccann1024 ryanmccann1024 self-assigned this Aug 7, 2025
@ryanmccann1024
Copy link
Copy Markdown
Collaborator Author

ryanmccann1024 commented Aug 7, 2025

Again, until we finalize all CLI entries should we worry about the Cross-platform pipeline?

I think it should be the last step and then we check. But, I could be completely wrong.

@ryanmccann1024 ryanmccann1024 merged commit bd4dedc into refactor/sim-core Aug 12, 2025
17 of 22 checks passed
ryanmccann1024 added a commit that referenced this pull request Aug 14, 2025
@ryanmccann1024 ryanmccann1024 deleted the refactor/rl-cli branch January 19, 2026 19:13
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.

2 participants