amathislab / myochallenge

[NeurIPS 2022, Neuron 2024] Winning code for the Baoding ball MyoChallenge at NeurIPS 2022
https://proceedings.mlr.press/v220/caggiano22a.html
MIT License
14 stars 1 forks source link

Refactoring v0 #5

Closed nisheetpatel closed 1 year ago

nisheetpatel commented 2 years ago

Description

Includes major structural changes. Please review them before accepting.

Changes

Structural

Functional

Standardization

Since we all use vscode, it's just a lot less annoying if everyone uses the same linter and formatting settings with auto-format. Otherwise whenever one of us pushes something, the others have issues. Happy to change any of the settings individually if you prefer some other autoformatter or whatever.

nisheetpatel commented 1 year ago

I also added a trainer class to make main a little bit cleaner and verified that it runs from root with python src/main_new.py as well as from src with python main_new.py. The one problem currently is that is it doesn't save main.py anymore. @albertochiappa could you perhaps tell me which callback that was a part of?

albertochiappa commented 1 year ago

The main_new.py seems to for me after removing the incompatibilities with python 3.7! I have removed everything related to ray and rllib, besides some further refactoring. Could you take a look that everything works as intended?

nisheetpatel commented 1 year ago

The main_new.py seems to for me after removing the incompatibilities with python 3.7! I have removed everything related to ray and rllib, besides some further refactoring. Could you take a look that everything works as intended?

Thanks for cleaning up. Looks great; just a couple of minor issues that I now fixed:

  1. Added missing import os in src/metrics/custom_callbacks.py
  2. Fixed broken EnvDumpCallback import in main_new.py; now importing from metrics.custom_callbacks instead of metrics.sb_callbacks
  3. Deleted main.py and renamed main_new.py as main_baoding.py.