SforAiDl / genrl

A PyTorch reinforcement learning library for generalizable and reproducible algorithm implementations with an aim to improve accessibility in RL
https://genrl.readthedocs.io
MIT License
403 stars 59 forks source link

Logger Formatting #283

Open Sharad24 opened 4 years ago

Sharad24 commented 4 years ago

The current logger might go on to the next line if there are a lot of key, value pairs. There could be three solutions to this:

  1. Put a limit on number of key-value pairs.
  2. Make logger choose for e.g. top 5 keypairs
  3. Make logging compressed (some keys can be unnecessarily long. Rather than printing in one line, use 2-3 lines to print the key).
someshsingh22 commented 4 years ago

I can take this up.

sampreet-arthi commented 4 years ago

Sure!

Sharad24 commented 4 years ago

How are you tackling this? @someshsingh22

someshsingh22 commented 4 years ago

Split Longer Keys into multiple lines

Also I would recommend converting values into scientific notation to give a very clean view.

How does that sound ?

Sharad24 commented 4 years ago

Split Longer Keys into multiple lines

Sg!

Also I would recommend converting values into scientific notation to give a very clean view.

How does that sound ?

How does shifting to scientific notation give a clean view?

Sharad24 commented 4 years ago

What happens if there are a lot of keys?

someshsingh22 commented 4 years ago

The advantage of having numerical values in scientific notation is that you will have a fixed length representation.

Multiple key value pairs can also be split on the basis of maximum length I guess

sampreet-arthi commented 4 years ago

Tbh, shifting to scientific notation doesn't sound like a good idea. For the simple reason that it doesn't look good. The current logger takes care of the fixed length problem so that's not an issue as you can use the same logic.

Sharad24 commented 4 years ago

Agree with @sampreet-arthi

If it reduces readability, we should avoid it.

someshsingh22 commented 4 years ago

Ok then we can split the lines into multi-lines based on their length. Additionally, we can make the user pass the key, value pairs that he wants to log.

Sharad24 commented 4 years ago

@someshsingh22 Were you able to make any progress here?

github-actions[bot] commented 3 years ago

Stale issue message