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

Type checking for scheduler is added #284

Merged
merged 17 commits into from
Jul 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/matgl/utils/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
if TYPE_CHECKING:
import dgl
import numpy as np
from torch.optim import Optimizer
from torch.optim import LRScheduler, Optimizer


class MatglLightningModuleMixin:
Expand Down Expand Up @@ -147,7 +147,7 @@ def __init__(
data_std: float = 1.0,
loss: str = "mse_loss",
optimizer: Optimizer | None = None,
scheduler=None,
scheduler: LRScheduler | None = None,
lr: float = 0.001,
decay_steps: int = 1000,
decay_alpha: float = 0.01,
Expand Down Expand Up @@ -270,7 +270,7 @@ def __init__(
loss: str = "mse_loss",
loss_params: dict | None = None,
optimizer: Optimizer | None = None,
scheduler=None,
scheduler: LRScheduler | None = None,
lr: float = 0.001,
decay_steps: int = 1000,
decay_alpha: float = 0.01,
Expand Down
Loading