Skip to content

docs(skill): expand anomalib-adding-a-datamodule with a few missed points - #3830

Merged
ashwinvaidya17 merged 8 commits into
open-edge-platform:mainfrom
rajeshgangireddy:feat/improve_data_module_skill
Oct 8, 2026
Merged

ashwinvaidya17 merged 8 commits into
open-edge-platform:mainfrom
rajeshgangireddy:feat/improve_data_module_skill

Conversation

@rajeshgangireddy

Copy link
Copy Markdown
Contributor

Based on recent PRs , I think these additions would make it much more clear in creating a more complete "adding datasets" PR.

  • prepare_data() download patterns (open vs gated datasets, with BMAD/Kaputt references)
  • Reuse AnomalibDataModule._create_test_split()/_create_val_split() instead of hand-rolled splitting
  • Validate dataset-specific params (category/modality) with clear errors
  • Verify License/Reference docstring accuracy against the dataset's actual source, not the paper's code repo
  • Docs page + examples config + CHANGELOG registration steps
  • Sanity-check real pixel data for non-standard image formats, since dummy test generators only produce 8-bit images
  • Updated reviewer checklist to match

📝 Description

  • Provide a clear summary of the changes and the issue that has been addressed.
  • 🛠️ Fixes # (issue number)

✨ Changes

Select what type of change your PR is:

  • 🚀 New feature (non-breaking change which adds functionality)
  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • 🔄 Refactor (non-breaking change which refactors the code base)
  • ⚡ Performance improvements
  • 🎨 Style changes (code style/formatting)
  • 🧪 Tests (adding/modifying tests)
  • 📚 Documentation update
  • 📦 Build system changes
  • 🚧 CI/CD configuration
  • 🔧 Chore (general maintenance)
  • 🔒 Security update
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)

✅ Checklist

Before you submit your pull request, please make sure you have completed the following steps:

  • 📚 I have made the necessary updates to the documentation (if applicable).
  • 🧪 I have written tests that support my changes and prove that my fix is effective or my feature works (if applicable).
  • 🏷️ My PR title follows conventional commit format.

For more information about code review checklists, see the Code Review Checklist.

Copilot AI balanced review requested due to automatic review settings October 1, 2026 09:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Several instructions inaccurately describe split behavior, perform an inefficient URL check, or direct non-image documentation to the wrong location.

Review effort: Balanced
Findings: 3 Low severity

Open (3)
What changed in this PR

Expands datamodule authoring guidance to cover splitting, downloads, validation, documentation, and real-image verification.

Changes:

  • Documents base split helpers and parameter validation.
  • Adds open/gated dataset download patterns.
  • Extends registration, testing, and reviewer checklists.
File Description
.agents/​skills/​anomalib-adding-a-datamodule/​SKILL.md Expands datamodule implementation guidance.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

rajeshgangireddy added a commit to rajeshgangireddy/anomalib that referenced this pull request Oct 2, 2026
…#3830

- Clarify that _create_val_split() is mode-driven (not sample-driven
  like _create_test_split()); FROM_DIR requires self.val_data to be
  set manually in _setup().
- Use a HEAD request with redirect-following for the gating-check
  curl snippet, instead of a plain GET that transfers the full file.
- Generalize the docs-registration step to cover image/video/depth
  reference folders instead of hardcoding image/.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 2, 2026 07:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Access detection is unreliable, and non-standard image formats need repeatable automated coverage rather than manual-only checks.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
Resolved since last review (3)
Previously missed (1)

In code that hasn't changed since last review

Low severity Require deterministic regression coverage for non-standard image formats

.agents/​skills/​anomalib-adding-a-datamodule/​SKILL.md:301

This prescribes only an unrecorded manual check for the exact non-standard-format failure that the skill identifies, so a generated datamodule PR can still have no repeatable regression coverage. Require a deterministic fixture that writes representative bit depths/channel layouts and asserts the result through read_image(); real-sample inspection can remain supplemental.

This issue also appears on line 334 of the same file.

rajeshgangireddy added a commit to rajeshgangireddy/anomalib that referenced this pull request Oct 2, 2026
…#3830

- Clarify that _create_val_split() is mode-driven (not sample-driven
  like _create_test_split()); FROM_DIR requires self.val_data to be
  set manually in _setup().
- Use a HEAD request with redirect-following for the gating-check
  curl snippet, instead of a plain GET that transfers the full file.
- Generalize the docs-registration step to cover image/video/depth
  reference folders instead of hardcoding image/.
@rajeshgangireddy
rajeshgangireddy force-pushed the feat/improve_data_module_skill branch from 20e351d to d629289 Compare October 2, 2026 08:03
Copilot AI balanced review requested due to automatic review settings October 6, 2026 14:49
… review

Add guidance gaps surfaced while reviewing PR open-edge-platform#3800 (LIBAD dataset):
- prepare_data() download patterns (open vs gated datasets, with
  BMAD/Kaputt references)
- Reuse AnomalibDataModule._create_test_split()/_create_val_split()
  instead of hand-rolled splitting
- Validate dataset-specific params (category/modality) with clear errors
- Verify License/Reference docstring accuracy against the dataset's
  actual source, not the paper's code repo
- Docs page + examples config + CHANGELOG registration steps
- Sanity-check real pixel data for non-standard image formats, since
  dummy test generators only produce 8-bit images
- Updated reviewer checklist to match

Signed-off-by: Rajesh Gangireddy <rajesh.gangireddy@intel.com>
…#3830

- Clarify that _create_val_split() is mode-driven (not sample-driven
  like _create_test_split()); FROM_DIR requires self.val_data to be
  set manually in _setup().
- Use a HEAD request with redirect-following for the gating-check
  curl snippet, instead of a plain GET that transfers the full file.
- Generalize the docs-registration step to cover image/video/depth
  reference folders instead of hardcoding image/.

Signed-off-by: Rajesh Gangireddy <rajesh.gangireddy@intel.com>
Drop mid-sentence/clause-level bold that doesn't match the skill's
existing convention of using bold only as a short label (e.g. 'Open
dataset:', 'Never trust dataset paths:'). Code spans already carry
enough emphasis without wrapping full sentences in bold.

Signed-off-by: Rajesh Gangireddy <rajesh.gangireddy@intel.com>
@rajeshgangireddy
rajeshgangireddy force-pushed the feat/improve_data_module_skill branch from 4c4cdd7 to 303480c Compare October 6, 2026 14:51
@rajeshgangireddy
rajeshgangireddy marked this pull request as ready for review October 6, 2026 14:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Download security and failure-handling guidance contains inaccuracies that could propagate unsafe implementations.

Review effort: Balanced
Findings: 2 Medium severity · 2 Low severity

Open (4)
Resolved since last review (1)

Copilot AI balanced review requested due to automatic review settings October 6, 2026 14:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Several additions contain incomplete or misleading guidance about split conditions, references, and HTTP access checks.

Review effort: Balanced
Findings: 2 Medium severity · 4 Low severity

Open (6)

Copilot AI balanced review requested due to automatic review settings October 7, 2026 13:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Signed-off-by: Rajesh Gangireddy <rajesh.gangireddy@intel.com>
Copilot AI balanced review requested due to automatic review settings October 7, 2026 14:02
Signed-off-by: Rajesh Gangireddy <rajesh.gangireddy@intel.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

The guidance omits dataset exports and overgeneralizes license/reference requirements.

Review effort: Balanced
Findings: None

Resolved since last review (9)
Previously missed (2)

In code that hasn't changed since last review

Low severity Limit citation requirements to published third-party datasets

.agents/​skills/​anomalib-adding-a-datamodule/​SKILL.md:110

This unconditional requirement does not apply to generic/internal loaders: the existing Folder and Tabular dataset/datamodule pairs have no external dataset license or paper to cite, and some third-party datasets may have no arXiv ID or DOI. Qualify the rule to published third-party datasets to avoid prompting contributors to invent inapplicable metadata.

Low severity Document re-exporting datasets through the public API

.agents/​skills/​anomalib-adding-a-datamodule/​SKILL.md:205

The registration flow stops after exporting the datamodule, but source-specific dataset classes are also consistently re-exported through src/anomalib/data/datasets/image/__init__.py:30-44, src/anomalib/data/datasets/__init__.py:46-58, and src/anomalib/data/__init__.py:75-89. Please add these steps so following this skill does not leave MyDataset outside the established public API.

Copilot AI balanced review requested due to automatic review settings October 7, 2026 14:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Split documentation is misleading and the newly introduced guidance lacks corresponding skill eval coverage.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
Previously missed (1)

In code that hasn't changed since last review

Low severity Document split_ratio falsey handling and effective default

.agents/​skills/​anomalib-adding-a-datamodule/​SKILL.md:44

test_split_ratio is set describes a state the base class does not preserve: AnomalibDataModule.__init__ converts None (and other falsey values) to 0.5. This could lead contributors to assume that passing None suppresses sampling. Document the actual trigger and effective default instead.

@ashwinvaidya17 ashwinvaidya17 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

@ashwinvaidya17
ashwinvaidya17 merged commit dc087d5 into open-edge-platform:main Oct 8, 2026
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