Add a frequency parameter to TriggerWandbSyncLightningCallback#101
Add a frequency parameter to TriggerWandbSyncLightningCallback#101CedricLeon wants to merge 9 commits intoklieret:mainfrom
frequency parameter to TriggerWandbSyncLightningCallback#101Conversation
Changed Files
|
| """ | ||
| super().__init__() | ||
| self._hook = TriggerWandbSyncHook(communication_dir=communication_dir) | ||
| self.frequency = frequency |
There was a problem hiding this comment.
could you make this private? i.e., self._frequency
|
I like this, this would be an alternate way of solving #83 and much simpler than implementing multiprocessing. As for tests, I think this is fine, I'd say it's simple enough :) |
| def __init__( | ||
| self, | ||
| communication_dir: PathLike = _comm_default_dir, | ||
| frequency: int = 1, |
There was a problem hiding this comment.
I wonder if there's a better name for this. Because this setting is basically 1/frequency, right? (the larger this value is, the less often we sync). So perhaps something like sync_every_n_epochs?
There was a problem hiding this comment.
I started with such a name but thought that frequency was shorter and still self-explanatory.
I will make the change to sync_every_n_epochs, it is more accurate
…tialization Now the calling `hook()` must be done by giving information about the current epoch
…ialization and call
|
I made the changes. Still without testing 😇 |
|
I just realized that the
I see an easy fix for the Lightning callback; adding the |
|
Oh you're 100% right, I should have thought about that as well. A totally different avenue of solution (that might also help with syncing hyperparameters of runs that get killed because of #100) would be that the Let me think about that. We might in fact do both (and perhaps add a note to the |
|
That would be a pretty robust workaround indeed. I dug into the problem I raised in #100 and this is deeper that just not syncing the config. i will detail what I found so far in the Issue. |
|
@klieret should I push this temporary fix? |
…tion on the end of the last epoch
for more information, see https://pre-commit.ci
|
Sorry for my late replies! Let me take a look now :) |
|
Could you give me push permission on the branch (I made some fixes and added some tests to this). You only have to click a checkbox on this PR, I think |
The box is checked, it seems to be checked by default btw |
|
Hi @klieret, any update about this PR? |
|
Hey @klieret, I found this old PR. Is that anything you're still working on? It seems your package has evolved quite significantly; maybe we should just close that one. |
In order to synchronize every N epoch instead of every epoch (by default), I added a frequency parameter to the Lightning callback.
I did not write any test for that feature, mainly because I am not sure how you proceed (but also because of lazyness 😅)
Tell me if you want me to add a test for that.