Skip to content

Commit

Permalink
Updating inputs for MABSelector to new types LearningPolicyType and N…
Browse files Browse the repository at this point in the history
…eighboorhoodPolicyType from the new version of mabwiser (#162)

Updating inputs for MABSelector to new types LearningPolicyType and NeighboorhoodPolicyType

---------

Co-authored-by: Peruri, Ashish <ashish.peruri@fmr.com>
  • Loading branch information
AshishPvjs and AshishPvjs committed Aug 3, 2023
1 parent 1960a0e commit 0477e1e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions alns/select/MABSelector.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from alns.select.OperatorSelectionScheme import OperatorSelectionScheme

try:
from mabwiser.mab import MAB, LearningPolicy, NeighborhoodPolicy
from mabwiser.mab import MAB, LearningPolicyType, NeighborhoodPolicyType

MABWISER_AVAILABLE = True
except ModuleNotFoundError:
Expand Down Expand Up @@ -79,8 +79,8 @@ def __init__(
scores: List[float],
num_destroy: int,
num_repair: int,
learning_policy: "LearningPolicy",
neighborhood_policy: Optional["NeighborhoodPolicy"] = None,
learning_policy: "LearningPolicyType",
neighborhood_policy: Optional["NeighborhoodPolicyType"] = None,
seed: Optional[int] = None,
op_coupling: Optional[np.ndarray] = None,
**kwargs,
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ classifiers = [
python = "^3.8, <4.0"
numpy = ">=1.18.0"
matplotlib = ">=3.5.0"
mabwiser = { version = ">=2.7.0", optional = true }
mabwiser = { version = ">=2.7.1", optional = true }

[tool.poetry.extras]
mabwiser = ["mabwiser"] # optional integration with MABWiser
Expand All @@ -44,7 +44,7 @@ pre-commit = "^2.20.0"
pytest = ">=6.0.0"
pytest-cov = ">=2.6.1"
codecov = "*"
mabwiser = ">=2.7.0"
mabwiser = ">=2.7.1"

# This optional docs group is needed to build the documentation. It is not
# required by the package itself.
Expand All @@ -59,7 +59,7 @@ numpydoc = ">=1.5.0"
sphinx_rtd_theme = ">=0.5.1"
sphinx-autoapi = ">=2.0.1"
docutils = "==0.16"
mabwiser = ">=2.7.0"
mabwiser = ">=2.7.1"

# This optional examples group is needed to run the example notebooks, but not
# required for the package itself.
Expand All @@ -71,7 +71,7 @@ vrplib = "^1.0.1"
networkx = ">=2.4.0"
tsplib95 = ">=0.7.0"
jupyter = "^1.0.0"
mabwiser = ">=2.7.0"
mabwiser = ">=2.7.1"

[tool.black]
line-length = 79
Expand Down

0 comments on commit 0477e1e

Please sign in to comment.