Skip to content

Refactor RMS DQN pipeline with modular Double DQN implementation#1

Open
BEZOUI wants to merge 2 commits into
mainfrom
codex/optimize-python-code-for-deep-q-learning-rms
Open

Refactor RMS DQN pipeline with modular Double DQN implementation#1
BEZOUI wants to merge 2 commits into
mainfrom
codex/optimize-python-code-for-deep-q-learning-rms

Conversation

@BEZOUI

@BEZOUI BEZOUI commented Nov 5, 2025

Copy link
Copy Markdown
Owner

Summary

  • add a centralized configuration module for paths, hyperparameters, and visualization settings
  • implement data ingestion that loads the provided CSV, engineers features, and fabricates realistic synthetic RMS scenarios
  • build a PyTorch Double DQN agent with a rich RMS environment, prioritized replay, and advanced exploration controls
  • provide an orchestration script plus a visualization suite that renders 30 performance diagnostics

Testing

  • python -m compileall main.py data_preprocessing.py dqn_agent.py visualization.py config.py
  • python main.py (fails: ModuleNotFoundError: No module named 'torch')

https://chatgpt.com/codex/tasks/task_e_690b300653088324910698997e76e9e2

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread data_preprocessing.py
Comment on lines +208 to +217
priority = int(
np.clip(
self.random_state.choice(
[1, 2, 3, 4, 5],
p=[
1 - config.high_priority_share - config.rush_job_share,
0.25,
0.22,
config.high_priority_share,
config.rush_job_share,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0 Badge Normalise priority sampling probabilities

In _generate_synthetic_scenarios the probability vector passed to self.random_state.choice is p=[1 - config.high_priority_share - config.rush_job_share, 0.25, 0.22, config.high_priority_share, config.rush_job_share]. Because the first term already accounts for the high and rush shares, adding the fixed 0.25 and 0.22 causes the probabilities to always sum to 1.47. numpy.random.Generator.choice will raise ValueError: probabilities do not sum to 1 as soon as synthetic data generation runs, so prepare_data_bundle() and the entire training pipeline fail before starting. The distribution should be normalised so the probabilities sum to 1.

Useful? React with 👍 / 👎.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant