Skip to content

Commit

Permalink
[BugFix] Macbook related bug
Browse files Browse the repository at this point in the history
  • Loading branch information
fedebotu committed Aug 22, 2023
1 parent 7d47178 commit 305e1fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rl4co/models/zoo/active_search/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def setup(self, stage="fit"):
)
self.instance_rewards = torch.zeros(dataset_size)

def on_train_batch_start(self, batch: Any, batch_idx: int) -> int | None:
def on_train_batch_start(self, batch: Any, batch_idx: int):
"""Called before training (i.e. search) for a new batch begins.
We re-load the original policy state dict and configure the optimizer.
"""
Expand Down
2 changes: 1 addition & 1 deletion rl4co/models/zoo/eas/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def setup(self, stage="fit"):
self.instance_solutions = []
self.instance_rewards = []

def on_train_batch_start(self, batch: Any, batch_idx: int) -> int | None:
def on_train_batch_start(self, batch: Any, batch_idx: int):
"""Called before training (i.e. search) for a new batch begins.
We re-load the original policy state dict and configure all parameters not to require gradients.
We do the rest in the training step.
Expand Down

0 comments on commit 305e1fa

Please sign in to comment.