code
stringlengths
3
6.57k
list(tasks.buffer)
gen_cluster(client=True)
test_no_startstops(c, s, a, b)
TaskStreamPlugin(s)
s.add_plugin(tasks)
c.submit(inc, 1)
wait(future)
len(tasks.buffer)
tasks.transition(future.key, "processing", "erred")
len(tasks.buffer)
tasks.transition(future.key, "processing", "erred", startstops=[])
len(tasks.buffer)
dict(start=time()
time()
len(tasks.buffer)
gen_cluster(client=True)
test_client(c, s, a, b)
c.get_task_stream()
c.map(slowinc, range(10)
wait(futures)
c.get_task_stream()
tuple(tasks.buffer)
test_client_sync(client)
get_task_stream(client=client)
sleep(0.1)
client.map(inc, range(10)
wait(futures)
len(ts.data)
gen_cluster(client=True)
test_get_task_stream_plot(c, s, a, b)
pytest.importorskip("bokeh")
c.get_task_stream()
c.map(slowinc, range(10)
wait(futures)
c.get_task_stream(plot=True)
isinstance(figure, bokeh.plotting.Figure)
test_get_task_stream_save(client, tmpdir)
pytest.importorskip("bokeh")
str(tmpdir)
os.path.join(tmpdir, "foo.html")
get_task_stream(plot="save", filename=fn)
wait(client.map(inc, range(10)
open(fn)
f.read()
isinstance(ts.figure, bokeh.plotting.Figure)
Copyright (C)
logging.getLogger(__name__)
DatasetItemEntity(metaclass=abc.ABCMeta)
entity (e.g. Image)
entity (e.g. saliency map or active score)
DatasetItemEntity()
data (Height, Width, Channels)
Annotation(Rectangle(x1=0.0, y1=0.0, x2=0.5, y2=0.5)
dataset_item.roi_numpy(roi=top_left_quart_roi)
dataset_item.get_roi_labels(labels=...)
dataset_item.get_annotations()
Rectangle(x1=0.2, y1=0.3, x2=0.6, y2=0.5)
dataset_item.append_annotations(annotations=[Annotation(box, labels=[...])
dataset_item.append_labels(labels=[...])
Lock()
Rectangle.is_full_box(annotation.shape)
list(metadata)
metadata(self)
__repr__(self)
roi(self)
Annotation(Rectangle.generate_full_box()
roi(self, roi: Optional[Annotation])
subset(self)
subset(self, value: Subset)
media(self)
roi_numpy(self, roi: Optional[Annotation] = None)
ShapeFactory.shape_as_rectangle(roi.shape)
self.media.roi_numpy(roi=roi)
numpy(self)
shape (Height, Width, Channels)
self.roi_numpy()
width(self)
ShapeFactory.shape_as_rectangle(self.roi.shape)
roi_shape_as_box.clip_to_visible_region()
round(x2 - x1)
round(x2)
round(x1)
int(round(roi_shape_as_box.x1 * width)
int(round(roi_shape_as_box.x2 * width)
height(self)
ShapeFactory.shape_as_rectangle(self.roi.shape)
roi_shape_as_box.clip_to_visible_region()
round(y2 - y1)
round(y2)
round(y1)
int(round(roi_shape_as_box.y1 * height)
int(round(roi_shape_as_box.y2 * height)
annotation_scene(self)
annotation_scene(self, value: AnnotationSceneEntity)
item (wrt. ROI)
Rectangle.is_full_box(self.roi.shape)
O(n)
ShapeFactory.shape_as_rectangle(self.roi.shape)
annotation.get_labels(include_empty)
len(shape_labels)