Skip to content

Conversation

@bruniss
Copy link
Member

@bruniss bruniss commented Nov 2, 2025

No description provided.

Copilot AI review requested due to automatic review settings November 2, 2025 05:19
@bruniss bruniss requested a review from jrudolph as a code owner November 2, 2025 05:19
@vercel
Copy link

vercel bot commented Nov 2, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
scrollprize-org Ignored Ignored Preview Nov 2, 2025 6:38am

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for configurable ignore label values across the training pipeline. It enables users to specify labels that should be treated as background during patch validation, loss computation, metrics evaluation, and skeleton transform processing.

Key changes:

  • Added zero_ignore_labels utility function to handle ignore label zeroing in patch validation
  • Extended loss configuration, metrics initialization, and transforms to accept and use ignore values via aliases (ignore_index, ignore_label, ignore_value)
  • Updated dependency versions in pyproject.toml

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
vesuvius/src/vesuvius/models/datasets/find_valid_patches.py Added zero_ignore_labels function and integrated ignore label handling into patch validation logic
vesuvius/src/vesuvius/models/datasets/slicers/chunk.py Updated chunk slicer to propagate ignore values through the validation pipeline
vesuvius/src/vesuvius/models/datasets/base_dataset.py Added _resolve_target_ignore_labels method and integrated ignore values into chunk volumes and skeleton transforms
vesuvius/src/vesuvius/models/training/train.py Enhanced loss initialization and metrics to accept ignore values from target configuration
vesuvius/src/vesuvius/models/augmentation/transforms/utils/skeleton_transform.py Modified skeleton transform to handle ignore values during processing
vesuvius/pyproject.toml Updated package dependencies including version changes and new packages
Comments suppressed due to low confidence (1)

vesuvius/pyproject.toml:64

  • The version s3fs>=2025.9.0 appears to use a future version number. As of January 2025, s3fs follows calendar versioning similar to fsspec. Version 2025.9.0 may not exist yet. Please verify this is the correct version.
    "s3fs>=2025.9.0",

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

MedialSurfaceTransform(
do_tube=False,
target_keys=skeleton_targets,
ignore_values=ignore_values or None,
Copy link

Copilot AI Nov 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The expression ignore_values or None is redundant. An empty dict {} is falsy, so this will return None when ignore_values is empty. Consider simplifying to just ignore_values and let the transform handle the empty dict, or use ignore_values if ignore_values else None to be more explicit about the intent.

Copilot uses AI. Check for mistakes.
MedialSurfaceTransform(
do_tube=False,
target_keys=skeleton_targets,
ignore_values=ignore_values or None,
Copy link

Copilot AI Nov 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The expression ignore_values or None is redundant. An empty dict {} is falsy, so this will return None when ignore_values is empty. Consider simplifying to just ignore_values and let the transform handle the empty dict, or use ignore_values if ignore_values else None to be more explicit about the intent.

Suggested change
ignore_values=ignore_values or None,
ignore_values=ignore_values if ignore_values else None,

Copilot uses AI. Check for mistakes.
else:
try:
mask = (arr == ignore_label)
except TypeError:
Copy link

Copilot AI Nov 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This statement is unreachable.

Copilot uses AI. Check for mistakes.
@giorgioangel
Copy link
Member

@bruniss what's this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants