Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to change the GlobalWorkspace LR scheduler #132

Merged
merged 3 commits into from
Sep 19, 2024
Merged

Conversation

bdvllrs
Copy link
Collaborator

@bdvllrs bdvllrs commented Sep 2, 2024

Fixes #13.
Add a sheduler parameter to all global workspace that can take a LRScheduler or None (no schduler will be used).
If not given, the OneCycleScheduler is used for backward compatibility.

Copy link
Collaborator

@RolandBERTINJOHANNET RolandBERTINJOHANNET left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sentinelle à vos gardes

@bdvllrs bdvllrs merged commit f13ac8c into main Sep 19, 2024
1 check passed
@bdvllrs bdvllrs deleted the choose_scheduler branch September 19, 2024 09:08
bdvllrs added a commit that referenced this pull request Oct 11, 2024
The previous implementation (#132) could not work with new scheduler as
it could
not take the optimizer as param.
Here, the scheduler should be a callback instead:

```python
def get_scheduler(optimizer: Optimizer) -> LRScheduler:
    return StepLR(otimizer, ...)

gw = GlobalWorkspace(
        ...
        scheduler=get_scheduler
)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No way of changing the LR scheduler and optimizer without having to reimplement a GlobalWorkspace
2 participants