Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(v3.5.5) - Tqdm progress bar and terminal messages improvement #439

Merged
merged 12 commits into from
Sep 6, 2024

Conversation

AlejandroCN7
Copy link
Member

Description

Este PR introduce principalmente el uso de tqdm para las barras de progreso en las simulaciones realizadas con Sinergym. Los parámetros han sido seleccionados para que haya una barra por episodio y para que se mantega en la parte más baja del terminal hasta que se complete. Además, es compatible con las evaluaciones intermedias con otros entornos.

Por otro lado, el handler del TerminalLogger de sinergym ha sido actualizado para que esto pueda ocurrir. Además, se han actualizados los mensajes que se realizan durante el proceso, quedando mejor organizados y simples. Los mensajes para debug han sido ampliados. Los callbacks creados en el proyecto tiene un sistema de log también.

Por último, se ha guardado el path de los mock para test directamente en los fixtures, y que no pertenece directamente al paquete de Sinergym. Para más información, revisar el changelog.

Motivation and Context

  • I have raised an issue to propose this change (required for new features and bug fixes)

Fixes #400

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (update in the documentation)
  • Improvement (of an existing feature)
  • Others

Checklist:

  • I've read the CONTRIBUTION guide (required)
  • My change requires a change to the documentation.
  • I have updated the tests.
  • I have updated the documentation accordingly.
  • I have reformatted the code using autopep8 second level aggressive.
  • I have reformatted the code using isort.
  • I have ensured cd docs && make spelling && make html pass (required if documentation has been updated.)
  • I have ensured pytest tests/ -vv pass. (required).
  • I have ensured pytype -d import-error sinergym/ pass. (required)

Changelog:

  • Constants: Deleted mock path due to some containers don't have tests/folder, instead specify direcly in fixtures.
  • Logging: Update and improve some sinergym terminal logging messages.
  • Simulator: Add episode num in constructor, and update instantiation in environment.
  • Simulator: Improve progres bar with tqdm (parameters set carefully).
  • TerminalLogger: Updated consoleHandler with a new created TqdmLoggingHandler to syncronize with tqdm bar.
  • Scripts: Updating script to use Sinergym terminal logger.
  • Updated simulator tests.

@AlejandroCN7 AlejandroCN7 merged commit b7d9a69 into main Sep 6, 2024
4 checks passed
@AlejandroCN7 AlejandroCN7 deleted the feat/issue-400 branch September 6, 2024 14:06
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.

[Feature]: Use tqdm library with Sinergym
1 participant