Open Divergense opened 1 year ago
Hi @Divergense , thank you for your feedback, and sorry for our late reply. We were on Chinese New Year last week. It seems like the dvclive
caused a bc issue. We can call different interfaces according to the version of dvclive
. Are you interested in making a PR to fix this issue?
Hi! Yes, i'm interested to make a PR but i never do it before and hence i need to learn the contributing guidelines first.
And i have a couple of questions (sorry for stupid questions):
dvclive
"?bc issue
means the interfaces of dvclive
had been changed and caused the downstream repos to fail.
Thanks for reporting the unexpected results and we appreciate it a lot.
Checklist
Describe the Issue
MMCV hook
DvcliveLoggerHook
has a bug. The class placed atmmcv/runner/hooks/logger/dvclive.py
uses wrong (old) API of DVCLive library (1.3.2 is current version). Exactly the methodlog(self, runner)
usesself.dvclive.set_step
andself.dvclive.log
methods. These methods don't exist in present DVCLive version.Reproduction
What command, code, or script did you run?
Note: the code fully corresponds to the
mmdetection/demo/MMDet_Tutorial.ipynb
guide (v2.27.0).Did you make any modifications on the code? Did you understand what you have modified?
I tried to adopt MMDetection with DVC (tracking experiment metrics) and added
DvcliveLoggerHook
like this:Environment
Please run
python -c "from mmcv.utils import collect_env; print(collect_env())"
to collect necessary environment information and paste it here:Error traceback
Bug fix
Since i don't know what actual behavior is expected (all DVCLive methods produce slightly different results and i was so lazy to find working version of DVCLive) i can make just assumptions. Minimal working changes for me are the following:
replace
self.dvclive.set_step(self.get_iter(runner))
withself.dvclive.step = self.get_iter(runner)
inlog(self, runner)
methodreplace
self.dvclive.log(k, v)
line withself.dvclive.log_metric(k, v)
inlog(self, runner)
methodLater i needed more info and added the following lines in the method:
Final changes look like this: