Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
Fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
leonlan committed Sep 22, 2023
1 parent 93821cd commit 7a86f20
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import numpy as np
import tomli
from pyvrp import CostEvaluator
from tqdm import tqdm
from tqdm.contrib.concurrent import process_map

Expand All @@ -13,7 +14,6 @@
from ddwp.read import read
from ddwp.sampling import SAMPLING_METHODS
from ddwp.static_solvers import default_solver
from pyvrp import CostEvaluator


def parse_args():
Expand Down
3 changes: 2 additions & 1 deletion ddwp/static_solvers/default_solver.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from ddwp.VrpInstance import VrpInstance
from pyvrp import Model, Result
from pyvrp.stop import MaxRuntime

from ddwp.VrpInstance import VrpInstance

from .instance2data import instance2data


Expand Down
2 changes: 1 addition & 1 deletion ddwp/static_solvers/instance2data.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from collections import Counter

import numpy as np
from pyvrp import Client, ProblemData, VehicleType

from ddwp.VrpInstance import VrpInstance
from pyvrp import Client, ProblemData, VehicleType


def instance2data(instance: VrpInstance) -> ProblemData:
Expand Down
3 changes: 2 additions & 1 deletion ddwp/static_solvers/scenario_solver.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import warnings

from ddwp.VrpInstance import VrpInstance
from pyvrp import (
GeneticAlgorithm,
PenaltyManager,
Expand All @@ -25,6 +24,8 @@
)
from pyvrp.stop import MaxRuntime

from ddwp.VrpInstance import VrpInstance

from .instance2data import instance2data

warnings.filterwarnings("ignore", category=EmptySolutionWarning)
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ ignore = [
"C901", # too complex
"E741", # ambiguous variable name
]
extend-exclude = ["tune"]


[tool.ruff.per-file-ignores]
Expand Down

1 comment on commit 7a86f20

@leonlan
Copy link
Owner Author

Choose a reason for hiding this comment

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

Something happened with my local installation that doesn't recognize pyvrp as third-party module. But after starting fresh by cloning this repository again it was fixed.

Please sign in to comment.