d3rlpy
d3rlpy copied to clipboard
Suppress gym deprecation warning during import
This fixes the issue where importing d3rlpy shows a deprecation warning about gym being unmantained. The fix suppresses stderr during gym imports while maintaining compatibility with both gym and gymnasium.
- Suppress warning in types.py (early import point)
- Suppress warning in healthcheck.py
- Import types module early in init.py to ensure suppression
- Add safety measure in base.py
@viknesh-ai Hi, thank you for your contribution! The implementation looks good, but I need you to pass the CI checks. First thing you might need to do is to pass format checks and you can do this as follows:
pip install -r dev.requirements.txt
./scripts/lint