Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 5 additions & 20 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,18 @@
### Summary
Describe the purpose and key changes of this PR.

### Change Type
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation
- [ ] Refactor
- [ ] Performance
- [ ] Other: <!-- specify -->

### Related Issues
- Fixes: #
- Related: #

### What Was Changed
-

### Testing
### Quality Control
- [ ] Added/updated tests
- [ ] All tests pass locally
- [ ] Linter and type checks pass

### Checklist
- [ ] Follows style guidelines
- [ ] Self-reviewed
- [ ] Code is commented where needed
- [ ] Documentation updated
- [ ] No new warnings
### Related Issues
- Fixes: #
- Related: #


### Screenshots / Notes
<!-- Add screenshots or extra context if needed -->
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
- name: Install dependencies
run: uv sync

- name: Run linting
run: uv run ruff check .

- name: Run type checking
run: uv run mypy src/

Expand Down
7 changes: 4 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
"version": "0.2.0",
"configurations": [
{
"name": "Curr File",
"name": "cartpole",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/src/cumind/__main__.py",
"console": "integratedTerminal"
"program": "${workspaceFolder}/src/cartpole.py",
"console": "integratedTerminal",
"stopOnEntry": true
},
{
"name": "CuMind",
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def test_select_action_training_mode(self):
agent = Agent(config)
action = agent.select_action(observation, training=True)
assert isinstance(action, int)
assert 0 <= action < config.action_space_size
assert 0 <= action < config.env_action_space_size
```

## Project Structure
Expand Down
9 changes: 9 additions & 0 deletions Release_Notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ CuMind Release Notes
-------------------------------------------------------------------
Document all technical changes introduced in this release as concise bullet points below.

v0.1.8 (2025-07-18)
----------------------
Tarek Ibrahim (68)
- Major configuration refactor: unified and simplified config, key, logger management
- Refactored agent, core, and data modules for consistency with new config structure
- Replaced explicit relative imports for absolute imports
- Added standard output coloring for logs
- Enhanced code quality: 126 passing tests, 86% code coverage
- Decoupled neural network code in core/

v0.1.7 (2025-07-15)
----------------------
Expand Down
Binary file not shown.
120 changes: 69 additions & 51 deletions configuration.json
Original file line number Diff line number Diff line change
@@ -1,54 +1,72 @@
{
"Network architecture": {
"hidden_dim": 128,
"num_blocks": 2,
"conv_channels": 32
},
"Training": {
"batch_size": 64,
"learning_rate": 0.01,
"weight_decay": 0.0001,
"target_update_frequency": 250,
"checkpoint_interval": 50,
"num_episodes": 1220,
"train_frequency": 2,
"checkpoint_root_dir": "checkpoints"
},
"MCTS": {
"num_simulations": 25,
"c_puct": 1.25,
"dirichlet_alpha": 0.25,
"exploration_fraction": 0.25
},
"Environment": {
"env_name": "CartPole-v1",
"action_space_size": 2,
"observation_shape": [
4
]
},
"Self-Play": {
"num_unroll_steps": 5,
"td_steps": 10,
"discount": 0.997
},
"Memory": {
"memory_capacity": 2000,
"min_memory_size": 100,
"min_memory_pct": 0.1,
"per_alpha": 0.6,
"per_epsilon": 1e-06,
"per_beta": 0.4
},
"Data Types": {
"model_dtype": "float32",
"action_dtype": "int32",
"target_dtype": "float32"
},
"Device": {
"device_type": "cpu"
},
"Other": {
"CuMind": {
"networks": {
"hidden_dim": 128
},
"representation": {
"type": "cumind.core.resnet.ResNet",
"num_blocks": 2,
"conv_channels": 32,
"seed": 42
},
"dynamics": {
"type": "cumind.core.mlp.MLPWithEmbedding",
"num_blocks": 2,
"seed": 42
},
"prediction": {
"type": "cumind.core.mlp.MLPDual",
"seed": 42
},
"memory": {
"type": "cumind.data.memory.MemoryBuffer",
"capacity": 2000,
"min_size": 100,
"min_pct": 0.1,
"per_alpha": 0.6,
"per_epsilon": 1e-06,
"per_beta": 0.4
},
"training": {
"optimizer": "optax.adamw",
"batch_size": 64,
"learning_rate": 0.01,
"weight_decay": 0.0001,
"target_update_frequency": 250,
"checkpoint_interval": 50,
"num_episodes": 1220,
"train_frequency": 2,
"checkpoint_root_dir": "checkpoints"
},
"mcts": {
"num_simulations": 25,
"c_puct": 1.25,
"dirichlet_alpha": 0.25,
"exploration_fraction": 0.25
},
"env": {
"name": "CartPole-v1",
"action_space_size": 2,
"observation_shape": [4]
},
"selfplay": {
"num_unroll_steps": 5,
"td_steps": 10,
"discount": 0.997
},
"dtypes": {
"model": "float32",
"action": "int32",
"target": "float32"
},
"logging": {
"dir": "logs",
"level": "INFO",
"console": true,
"timestamps": false,
"tqdm": false
},
"device": "cpu",
"seed": 42
}
}
}
Loading