code-loader 1.0.184.dev5__py3-none-any.whl → 1.0.185__py3-none-any.whl

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.
@@ -1189,13 +1189,19 @@ def _warn_image_mask(leap_data, viz_name: str, leap_type_name: str) -> None:
1189
1189
  f"H x W {tuple(image.shape[:2])}. The mask overlay will fail or be misaligned."),
1190
1190
  link_to_docs=_VIZ_DOCS,
1191
1191
  )
1192
+ # plot_image_mask colors label index i where mask == (i + 1), so valid class ids are
1193
+ # 1..len(labels); id 0 is background (uncolored) and ids above len(labels) are never
1194
+ # colored. Compare the actual id range, not the count (which mis-fires when labels is a
1195
+ # global class list and only a subset of classes appears in this sample).
1192
1196
  nonzero = np.unique(mask)
1193
1197
  nonzero = nonzero[nonzero != 0]
1194
- if len(nonzero) != len(labels):
1198
+ if nonzero.size > 0 and int(nonzero.max()) > len(labels):
1195
1199
  store_general_warning(
1196
1200
  key=("viz_mask_labels", viz_name, leap_type_name),
1197
- message=(f"{_viz_prefix(viz_name, leap_type_name)} mask has {len(nonzero)} distinct non-zero value(s) "
1198
- f"but {len(labels)} label(s) were provided. Some regions may be uncolored or some labels unused."),
1201
+ message=(f"{_viz_prefix(viz_name, leap_type_name)} mask contains class id(s) up to "
1202
+ f"{int(nonzero.max())} but only {len(labels)} label(s) were provided. plot_image_mask "
1203
+ f"colors ids 1..{len(labels)}, so regions with higher ids will be left uncolored. "
1204
+ f"Provide a label for each class id."),
1199
1205
  link_to_docs=_VIZ_DOCS,
1200
1206
  )
1201
1207
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: code-loader
3
- Version: 1.0.184.dev5
3
+ Version: 1.0.185
4
4
  Summary:
5
5
  License: MIT
6
6
  Author: dorhar
@@ -21,7 +21,7 @@ code_loader/experiment_api/utils.py,sha256=XZHtxge12TS4H4-8PjV3sKuhp8Ud6ojAiIzTZ
21
21
  code_loader/experiment_api/workingspace_config_utils.py,sha256=DLzXQCg4dgTV_YgaSbeTVzq-2ja_SQw4zi7LXwKL9cY,990
22
22
  code_loader/inner_leap_binder/__init__.py,sha256=koOlJyMNYzGbEsoIbXathSmQ-L38N_pEXH_HvL7beXU,99
23
23
  code_loader/inner_leap_binder/leapbinder.py,sha256=XLYYcV50qjMvoC1S6WW0tLBch_0g5gl1UyHiVSWYbvg,40491
24
- code_loader/inner_leap_binder/leapbinder_decorators.py,sha256=3kcH5xeZsOGnGtmZze3fUxpVBIVRsLiVpx4v9qzTMIM,114805
24
+ code_loader/inner_leap_binder/leapbinder_decorators.py,sha256=8a7aJ1o4f60VnlErNjX_4RbUXpLWt91pgGcIDLBvOWc,115314
25
25
  code_loader/leaploader.py,sha256=K9Q5kiCZ_A2GkS5qOEantAMvWGaz3bmO1X8buXDSpgg,44682
26
26
  code_loader/leaploaderbase.py,sha256=l36qDA00GhZEG5NLKpEtAXgWJA-UQQIhNFGxywK7mUA,6530
27
27
  code_loader/mixpanel_tracker.py,sha256=rNwRmFifNbdUoqLQvvhhgpKczWpWiEmd8MfyJe27sxw,9131
@@ -31,7 +31,7 @@ code_loader/plot_functions/visualize.py,sha256=gsBAYYkwMh7jIpJeDMPS8G4CW-pxwx6Lz
31
31
  code_loader/utils.py,sha256=YecipkdTA-VcE9F0RQcY9cFnY8P3AksPnHM2Db7xUSk,3972
32
32
  code_loader/visualizers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
33
  code_loader/visualizers/default_visualizers.py,sha256=onRnLE_TXfgLN4o52hQIOOhUcFexGlqJ3xSpQDVLuZM,2604
34
- code_loader-1.0.184.dev5.dist-info/LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
35
- code_loader-1.0.184.dev5.dist-info/METADATA,sha256=83dAfYcw1wqEAn7mzBjIYBG4xCZZBJNESjAzXLcr_ks,1107
36
- code_loader-1.0.184.dev5.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
37
- code_loader-1.0.184.dev5.dist-info/RECORD,,
34
+ code_loader-1.0.185.dist-info/LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
35
+ code_loader-1.0.185.dist-info/METADATA,sha256=T0ZdqljpQ1cyo3SpOtdXcf0eg4_p-NUmuzXVi075FGw,1102
36
+ code_loader-1.0.185.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
37
+ code_loader-1.0.185.dist-info/RECORD,,