wsi-patching 0.5.1__tar.gz → 0.5.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/PKG-INFO +1 -1
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/core/pipeline.py +15 -20
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/.github/workflows/docs.yml +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/.github/workflows/integration_tests.yaml +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/.github/workflows/publish.yaml +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/.github/workflows/unit_tests.yaml +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/.gitignore +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/LICENSE +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/README.md +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/docs/concepts.md +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/docs/extending.md +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/docs/index.md +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/docs/installation.md +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/docs/quickstart.md +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/docs/reference.md +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/examples/numpy_stream_writer_demo.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/examples/torch_stream_writer_demo.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/examples/webdataset_materialize_writer_demo.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/mkdocs.yml +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/pyproject.toml +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/__init__.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/annotations/__init__.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/annotations/add_cell_annotation_from_csv.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/assets/models/cellvit_tissue_detector.pt +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/backends/__init__.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/backends/cupy_numpy.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/backends/fastslide.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/backends/torch_device.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/core/__init__.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/core/chunking_and_batching.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/core/types/__init__.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/core/types/types.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/core/types/util_types.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/core/wsi_grid.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/custom_component/__init__.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/encoders/__init__.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/encoders/pngencoder.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/filtering/__init__.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/filtering/cellvit_tissue_classifier_filter.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/filtering/low_contrast_background_filter.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/filtering/otsu_filter.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/filtering/pen_artifact_filter.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/py.typed +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/regions_of_interest/__init__.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/regions_of_interest/attach_rois.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/regions_of_interest/roi_providers.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/regions_of_interest/rois.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/transforms/__init__.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/transforms/macenko_normalizer.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/transforms/reinhard_normalizer.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/utils/__init__.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/utils/logging_config.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/utils/meta_typing.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/utils/profiling.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/utils/wsi_thumbnail_visualization.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/writers/__init__.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/writers/materialize_writers/__init__.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/writers/materialize_writers/materialize_writer_base.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/writers/materialize_writers/webdataset/__init__.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/writers/materialize_writers/webdataset/webdataset_loader.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/writers/materialize_writers/webdataset/webdataset_writer.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/writers/stream_writers/__init__.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/writers/stream_writers/numpy_stream_writer.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/writers/stream_writers/stream_writer_base.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/writers/stream_writers/torch_stream_writer.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/benchmarks/conftest.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/benchmarks/test_benchmark_pipeline.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/benchmarks/test_benchmark_png_encoding.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/benchmarks/test_benchmark_tile_planning.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/integration/conftest.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/integration/test_materialize_pipeline.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/integration/test_resample_pipeline.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/integration/test_roi_pipeline.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/integration/test_streaming_pipeline.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/.gitkeep +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/annotations/test_add_cell_annotation_from_csv.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/backends/test_cupy_numpy.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/backends/test_fastslide.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/backends/test_torch_device.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/core/test_chunking_and_batching.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/core/test_pipeline.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/core/test_wsi_grid.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/filtering/test_cellvit_tissue_classifier_filter.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/filtering/test_low_contrast_background_filter.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/filtering/test_otsu_filter.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/filtering/test_pen_artifact_filter.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/regions_of_interest/test_attach_rois.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/regions_of_interest/test_roi_providers.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/regions_of_interest/test_rois.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/transforms/test_macenko_normalizer.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/transforms/test_reinhard_normalizer.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/utils/test_logging_config.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/utils/test_meta_typing.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/utils/test_profiling.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/writers/materialize_writers/test_materialize_writer_base.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/writers/materialize_writers/webdataset/test_webdataset_loader.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/writers/materialize_writers/webdataset/test_webdataset_writer.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/writers/stream_writers/test_numpy_stream_writer.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/writers/stream_writers/test_stream_writer_base.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/writers/stream_writers/test_torch_stream_writer.py +0 -0
- {wsi_patching-0.5.1 → wsi_patching-0.5.2}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wsi-patching
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.2
|
|
4
4
|
Summary: A High Performance Patching Library for Digital Pathology AI dataset creation.
|
|
5
5
|
Project-URL: Homepage, https://github.com/amspath/wsi-patching-pipeline
|
|
6
6
|
Project-URL: Repository, https://github.com/amspath/wsi-patching-pipeline
|
|
@@ -46,6 +46,16 @@ def _tname(t: Any) -> str:
|
|
|
46
46
|
return str(t)
|
|
47
47
|
|
|
48
48
|
|
|
49
|
+
def _signal_end_of_queue(queue: Queue, stop_event: Event) -> None:
|
|
50
|
+
while True:
|
|
51
|
+
try:
|
|
52
|
+
queue.put(EndOfQueue(), block=True, timeout=0.5)
|
|
53
|
+
return
|
|
54
|
+
except Full:
|
|
55
|
+
if stop_event.is_set():
|
|
56
|
+
return
|
|
57
|
+
|
|
58
|
+
|
|
49
59
|
class Stage(ContextAware, metaclass=StageMeta):
|
|
50
60
|
input_type: Any = object
|
|
51
61
|
output_type: Any = object
|
|
@@ -228,18 +238,12 @@ class Pipeline(Stage):
|
|
|
228
238
|
except GeneratorExit:
|
|
229
239
|
self.log.info("Consumer stopped early; terminating producers.")
|
|
230
240
|
stop_event.set()
|
|
231
|
-
|
|
232
|
-
producer_queue.put(EndOfQueue(), block=True, timeout=0.5)
|
|
233
|
-
except Exception:
|
|
234
|
-
pass
|
|
241
|
+
_signal_end_of_queue(producer_queue, stop_event)
|
|
235
242
|
stop_all()
|
|
236
243
|
raise
|
|
237
244
|
except Exception:
|
|
238
245
|
stop_event.set()
|
|
239
|
-
|
|
240
|
-
producer_queue.put(EndOfQueue(), block=True, timeout=0.5)
|
|
241
|
-
except Exception:
|
|
242
|
-
pass
|
|
246
|
+
_signal_end_of_queue(producer_queue, stop_event)
|
|
243
247
|
stop_all()
|
|
244
248
|
raise
|
|
245
249
|
finally:
|
|
@@ -273,10 +277,7 @@ class Pipeline(Stage):
|
|
|
273
277
|
self.log.info("Materialization completed.")
|
|
274
278
|
except Exception:
|
|
275
279
|
stop_event.set()
|
|
276
|
-
|
|
277
|
-
producer_queue.put(EndOfQueue(), block=True, timeout=0.5)
|
|
278
|
-
except Exception:
|
|
279
|
-
pass
|
|
280
|
+
_signal_end_of_queue(producer_queue, stop_event)
|
|
280
281
|
stop_all()
|
|
281
282
|
raise
|
|
282
283
|
finally:
|
|
@@ -378,10 +379,7 @@ class Pipeline(Stage):
|
|
|
378
379
|
def stop_all():
|
|
379
380
|
with kill_lock:
|
|
380
381
|
stop_event.set()
|
|
381
|
-
|
|
382
|
-
queue.put(EndOfQueue(), block=True, timeout=0.5)
|
|
383
|
-
except Exception:
|
|
384
|
-
pass
|
|
382
|
+
_signal_end_of_queue(queue, stop_event)
|
|
385
383
|
|
|
386
384
|
def supervisor():
|
|
387
385
|
try:
|
|
@@ -414,10 +412,7 @@ class Pipeline(Stage):
|
|
|
414
412
|
received += 1
|
|
415
413
|
finally:
|
|
416
414
|
# Always signal writer; avoid blocking forever
|
|
417
|
-
|
|
418
|
-
queue.put(EndOfQueue(), block=True, timeout=0.5)
|
|
419
|
-
except Exception:
|
|
420
|
-
pass
|
|
415
|
+
_signal_end_of_queue(queue, stop_event)
|
|
421
416
|
|
|
422
417
|
sup = Thread(target=supervisor, name="supervisor", daemon=True)
|
|
423
418
|
sup.start()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/assets/models/cellvit_tissue_detector.pt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/regions_of_interest/attach_rois.py
RENAMED
|
File without changes
|
{wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/regions_of_interest/roi_providers.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/transforms/reinhard_normalizer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/utils/wsi_thumbnail_visualization.py
RENAMED
|
File without changes
|
|
File without changes
|
{wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/writers/materialize_writers/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wsi_patching-0.5.1 → wsi_patching-0.5.2}/src/wsi_patching/writers/stream_writers/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/backends/test_cupy_numpy.py
RENAMED
|
File without changes
|
{wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/backends/test_fastslide.py
RENAMED
|
File without changes
|
{wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/backends/test_torch_device.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/filtering/test_otsu_filter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/utils/test_logging_config.py
RENAMED
|
File without changes
|
{wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/utils/test_meta_typing.py
RENAMED
|
File without changes
|
{wsi_patching-0.5.1 → wsi_patching-0.5.2}/tests/unit/src/wsi_patching/utils/test_profiling.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|