Closed joshuaspear closed 4 months ago
Did you manage to find a workaround solution for this? Tracking the regularisation term separately would be very useful for the detection of underfitting during training.
Exactly the reason I wanted it as well! :) I haven't yet sorry - I may decide to use an RL library however, will comment on here if I do end up implementing
That would be great! Which RL library were you planning to use, if I may ask?
Looking at RLLIB in RAY (https://github.com/ray-project/ray/tree/master/rllib). Seems pretty flexible once you've grappled with the abstractions. The distributed aspect isn't relevant for me now but thought I may as well learn an industry framework given the direction of the field! More than open to other suggestions though :)
Sorry for the inconvenience. Currently, it's not yet supported. But, in the short term, you can simply hack d3rlpy to track metrics. You can modify these parts to include regularization loss in metrics:
It will break typing checks, but should work.
Hey @takuseno, I'm trying to submit a pull request to add this tracking for the DiscreteCQL model (I will aim to add it for the continuous CQL model later) however, I can't seem to push to a new branch on the git repo in order to open the pull request. Please could I have some guidance.
I have also run the required tests and have a couple of questions:
Thanks!
Looking at RLLIB in RAY (https://github.com/ray-project/ray/tree/master/rllib). Seems pretty flexible once you've grappled with the abstractions. The distributed aspect isn't relevant for me now but thought I may as well learn an industry framework given the direction of the field! More than open to other suggestions though :)
FYI - rllib is an absolute nightmare unless you're doing proper distributed stuff - so many overheads! Back to d3rlpy!
@joshuaspear Hi, thanks for trying to make a PR!
For the tests, you shouldn't run performance
test because it's not really maintained anymore. Please simply run this:
./scripts/test
Recently, formatting libraries have an incompatible update. So please install those by specifying versions like this:
pip install black==22.3.0 mypy==0.942 pylint==2.13.5 yapf isort
And, then run:
./scripts/format
./scripts/lint
Great - thank you, I will rerun the tests. Please can I confirm how I should push the code to Github? Under a new branch?
Hi @takuseno, I have run all the tests and everything has passed (FYI - I had to update the Pendulum environment from v0 to v1) however, I won't push this change. Please let me know the next steps to integrate the PR. Cheers
Sounds good. Thanks for the change! You can't directly push your commits to this repository. Here are the steps:
This document might be helpful. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork
@joshuaspear It seems very useful! Many thanks for picking this up!
Please let me close this since I believe that this issue is already resolved in the latest release.
Is your feature request related to a problem? Please describe. I'm not sure if I am missing something but I would like the ability to easily track different contributions to a given loss - I can't seem to find an easy way to implement this
Describe the solution you'd like I would like the ability to track the individual contributions to the loss function for example, track the MSE of the Bellman error and regularisation separately for CQL on the validation set