Skip to content

Commit 001d4b1

Browse files
committed
skip unsupported special handling
1 parent 605ce0a commit 001d4b1

4 files changed

Lines changed: 4 additions & 16 deletions

File tree

adaptive/learner/balancing_learner.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,7 @@ def _ask_and_tell_based_on_loss(
209209
for _ in range(n):
210210
losses = self._losses(real=False)
211211
index, _ = max(
212-
enumerate(zip(losses, (-n for n in total_points))),
213-
key=itemgetter(1),
212+
enumerate(zip(losses, (-n for n in total_points))), key=itemgetter(1)
214213
)
215214
total_points[index] += 1
216215

adaptive/learner/integrator_learner.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -566,10 +566,7 @@ def plot(self):
566566
ivals = sorted(self.ivals, key=attrgetter("a"))
567567
if not self.data:
568568
return hv.Path([])
569-
xs, ys = zip(
570-
*[(x, y) for ival in ivals for x, y in sorted(ival.data.items())],
571-
strict=True,
572-
)
569+
xs, ys = zip(*[(x, y) for ival in ivals for x, y in sorted(ival.data.items())])
573570
return hv.Path((xs, ys))
574571

575572
def to_numpy(self):

adaptive/runner.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import itertools
99
import pickle
1010
import platform
11-
import sys
1211
import time
1312
import traceback
1413
import warnings
@@ -808,8 +807,7 @@ async def _run(self) -> None:
808807
try:
809808
while not self.goal(self.learner):
810809
futures = self._get_futures()
811-
kw = {"loop": self.ioloop} if sys.version_info[:2] < (3, 10) else {}
812-
done, _ = await asyncio.wait(futures, return_when=first_completed, **kw) # type: ignore[arg-type,type-var]
810+
done, _ = await asyncio.wait(futures, return_when=first_completed) # type: ignore[arg-type,type-var]
813811
self._process_futures(done)
814812
finally:
815813
remaining = self._remove_unfinished()

adaptive/tests/test_notebook_integration.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
from __future__ import annotations
22

3-
import os
4-
import sys
53
from typing import TYPE_CHECKING
64

75
import pytest
@@ -16,13 +14,9 @@
1614
except ImportError:
1715
with_notebook_dependencies = False
1816

19-
# XXX: remove when is fixed https://github.com/ipython/ipykernel/issues/468
20-
skip_because_of_bug = os.name == "nt" and sys.version_info[:2] == (3, 8)
21-
2217

2318
@pytest.mark.skipif(
24-
not with_notebook_dependencies or skip_because_of_bug,
25-
reason="notebook dependencies are not installed",
19+
not with_notebook_dependencies, reason="notebook dependencies are not installed"
2620
)
2721
def test_private_api_used_in_live_info():
2822
"""We are catching all errors in

0 commit comments

Comments
 (0)