Pixyzrl

Latest version: v0.3.0

Safety actively analyzes 723217 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.3.0

New Features
- **Improved PPO Implementation**
- Added feature extraction (`Extractor`) using convolutional layers for improved state representation.
- Modified `Actor` to output a Gaussian distribution instead of categorical.
- Adjusted `Critic` network architecture for better value estimation.
- Integrated GAE (Generalized Advantage Estimation) and MC (Monte Carlo) value estimation as options.

- **Enhanced Trainer and Buffer**
- `OnPolicyTrainer` now supports multiple value estimation methods (`gae` and `mc`).
- `RolloutBuffer` now supports reward normalization and advantage normalization.
- Improved buffer memory management and device handling for efficient training.

- **CI/CD Improvements**
- Updated GitHub Actions workflow to use `coverage.xml` for reporting instead of `pytest-coverage.txt`.
- Added Codecov integration with GitHub Actions, utilizing the `CODECOV` secret for token authentication.

Bug Fixes
- Fixed incorrect reshaping of stored tensors in `BaseBuffer`.
- Fixed `MSELoss` implementation to ensure consistency in tensor shapes.
- Corrected improper usage of `torch.argmax` in discrete action selection.
- Resolved missing `.to(device)` calls for tensor operations in `RolloutBuffer`.

Performance Improvements
- Optimized batch processing by avoiding redundant `.detach()` calls.
- Refactored advantage computation in GAE for efficiency.
- Modified learning rates for `PPO` (`lr_actor = 1e-4`, `lr_critic = 3e-4`) for more stable training.
- Updated `compute_returns_and_advantages_mc` to apply reward normalization.

0.2.0

What's Changed
* Update README.md for clarity and improved structure by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/35
* Feature/test by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/36
* Update training iterations in test_trainer to zero for testing purposes by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/38
* Update README.md by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/39
* Update README.md by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/40
* Update README.md by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/43
* Update CI workflow to run doctest for PixyzRL modules and enhance exa… by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/42
* Update README.md by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/44
* Feature/pages by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/45
* Refactor pdoc workflow to simplify event triggers and remove unnecess… by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/46
* Update CNAME by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/47
* Enhance Logger class with TensorBoard support and additional logging … by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/48
* Add jekyll-sitemap plugin to configuration by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/49
* Remove jekyll-sitemap plugin from configuration by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/50
* Update README.md by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/51
* Update README.md by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/52
* Update README.md by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/53
* Remove unused CartPole PPO example and clean up utils.py by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/54
* Feature/logger by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/55
* Feature/utils by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/56
* Enhance docstrings in RLModel, PPO, and BaseTrainer classes with deta… by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/57
* Fix coverage reporting in CI workflow to specify the correct package … by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/58
* Feature/utils by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/59
* Update README.md by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/60
* Update README.md by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/61
* Refactor OnPolicyTrainer and Logger class documentation by ItoMasaki in https://github.com/ItoMasaki/PixyzRL/pull/62


**Full Changelog**: https://github.com/ItoMasaki/PixyzRL/compare/v0.1.0...v0.2.0

0.1.0

Highlights
- First official release
- **Pixyz**-based reinforcement learning (RL) framework
- Uncertainty-aware policy optimization using pre-trained distributions
- **Gymnasium**-based environment wrapper
- **Supports PPO (Proximal Policy Optimization) and A2C (Advantage Actor-Critic)**
- **Improved sample efficiency with Rollout Buffer**
- Integrated logging and training management

---

New Features
1. **Introduction of Environment Wrapper** (`pixyzrl.environments`)
- Implemented `BaseEnv` and `Env` classes.
- Compatibility with Gymnasium environments.

2. **Implementation of Reinforcement Learning Models** (`pixyzrl.models`)
- Support for `A2C` (Advantage Actor-Critic)
- Support for `PPO` (Proximal Policy Optimization)
- `DQN` is currently `TODO` (to be added in future releases)

3. **Addition of Rollout Buffer** (`pixyzrl.memory`)
- `RolloutBuffer` improves on-policy algorithm efficiency

4. **Implementation of Trainer** (`pixyzrl.trainer`)
- `OnPolicyTrainer` (for PPO and A2C)
- `OffPolicyTrainer` (for DQN, planned for future release)

5. **Definition of Loss Functions** (`pixyzrl.losses`)
- Clipped loss for `PPO` (`ClipLoss`)
- `MSELoss` (used for state value learning)

6. **Addition of Logging Functionality** (`pixyzrl.logger`)
- Training log management (`training.log`)
- `Logger` class for easy logging

---

Bug Fixes & Improvements
- Optimized batch processing in `Trainer` class
- Improved distribution definition for `Actor-Critic` models
- Integrated `print_latex` into `pixyzrl.utils` for enhanced mathematical representation

---

Installation
PixyzRL requires Python 3.10 or higher. Install with the following command:
bash
pip install torch torchaudio torchvision pixyz gymnasium[box2d] torchrl

Or clone the repository and install:
bash
git clone https://github.com/[ItoMasaki/PixyzRL](https://github.com/ItoMasaki/PixyzRL).git
cd PixyzRL
pip install -e .


---

Contributors
- **Masaki Ito** (l1sum [at] icloud.com)
- **Daisuke Nakahara**

GitHub: [ItoMasaki/PixyzRL](https://github.com/ItoMasaki/PixyzRL)

---

License
PixyzRL is released under the MIT License.

Links

Releases

Has known vulnerabilities

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.