Skip to content

Commit

Permalink
make test happy
Browse files Browse the repository at this point in the history
  • Loading branch information
hyeok9855 committed Jan 12, 2025
1 parent dcd5821 commit 99a05f3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions rl4co/envs/routing/cvrp/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@

from .generator import CVRPGenerator

from .local_search import local_search
try:
from .local_search import local_search
except: # In case when we fail to build HGS
local_search = None
from .render import render

log = get_pylogger(__name__)
Expand Down Expand Up @@ -253,7 +256,7 @@ def replace_selected_actions(
def local_search(td: TensorDict, actions: torch.Tensor, **kwargs) -> torch.Tensor:
assert (
local_search is not None
), "Cannot import local_search module. Check if `pyvrp` is installed."
), "Cannot import local_search module. Check if HGS is built."
return local_search(td, actions, **kwargs)

@staticmethod
Expand Down

0 comments on commit 99a05f3

Please sign in to comment.