Skip to content

Feature/create report - #2

Open
Ch1L1 wants to merge 6 commits into
masterfrom
feature/create-report
Open

Feature/create report#2
Ch1L1 wants to merge 6 commits into
masterfrom
feature/create-report

Conversation

@Ch1L1

@Ch1L1 Ch1L1 commented Apr 15, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Added reporting system with configurable options for multiple deployment environments (local, cluster-based, and external).
    • Enabled report generation, storage, and display with multiple backend options including local filesystem and MLflow artifact storage.
    • Added support for background mask retrieval and validation heatmap configurations.
  • Chores

    • Added reporting dependency to project.

@Ch1L1
Ch1L1 requested a review from Copilot April 15, 2026 09:10
@Ch1L1 Ch1L1 self-assigned this Apr 15, 2026
@Ch1L1
Ch1L1 requested review from a team, JakubPekar and ejdam87 April 15, 2026 09:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a comprehensive reporting configuration system by adding various YAML configuration files for Hydra, MLFlow tracking, mask retrievers, and report storage. It also integrates the report library as a new dependency in pyproject.toml and uv.lock, along with its required sub-dependencies. I have no feedback to provide as there were no review comments to assess.

@coderabbitai

coderabbitai Bot commented Apr 15, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This pull request introduces a comprehensive reporting configuration system by adding multiple YAML configuration files for MLflow tracking URI setup, reporter masking and save strategies, and validation heatmap examples. It also adds a new report dependency to the project.

Changes

Cohort / File(s) Summary
MLflow Configuration
configs/reporting/mlflow/base.yaml, configs/reporting/mlflow/kubas_cluster.yaml, configs/reporting/mlflow/kubas_cluster_s3.yaml, configs/reporting/mlflow/kubas_external.yaml, configs/reporting/mlflow/local.yaml
Added five MLflow tracking URI configurations for different environments: base placeholder, kubas cluster, S3-backed cluster, external cloud instance, and local filesystem storage.
Main Reporting Configuration
configs/reporting/default.yaml, configs/reporting/hydra/default.yaml
Established root reporting configuration with Hydra groups (default, kubas_cluster), reporter settings (save, background, title, masking, metrics), template asset path, and metadata section mapping user, experiment_name, run_name, and description.
Mask Retriever Configurations
configs/reporting/reporter/background/drive.yaml, configs/reporting/reporter/background/mlflow_artifact.yaml, configs/reporting/reporter/background/mlflow_run_id.yaml, configs/reporting/reporter/background/mlflow_tyler.yaml
Added four mask retriever strategy configurations targeting different sources: Drive, MLflow artifact URI, MLflow run ID, and MLflow Tyler retrievers with corresponding required parameters.
Report Save Configurations
configs/reporting/reporter/save/local.yaml, configs/reporting/reporter/save/mlflow_attach_to_run.yaml, configs/reporting/reporter/save/mlflow_standalone_run.yaml
Defined three save destination strategies: local file system, attaching reports to existing MLflow runs, and creating standalone MLflow runs.
Validation Heatmap Configuration
configs/reporting/reporter/validation_heatmap/virchow2_level1.yaml
Added example reporting configuration for SNB IHC validation with background image retrieval, classification heatmap masking with red semi-transparent shaders, and MLflow integration metadata.
Dependency Management
pyproject.toml
Reordered existing dependencies and added report as a new direct dependency with corresponding entry in dependency-groups and Git source mapping.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Hops of joy through configs new,
MLflow URIs, retriever queues,
Heatmaps painted, reports all set,
A reporting pipeline without regret! 🎨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Feature/create report' is vague and uses a generic 'Feature/' prefix; it does not clearly convey what reporting functionality is being added or what the main changes accomplish. Improve the title to be more specific about the reporting feature being implemented, such as 'Add reporting configuration and templates for experiment reports' or 'Implement MLflow-based experiment report generation'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/create-report

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
pyproject.toml (1)

25-25: Clarify the purpose of the report dependency group.

The report package is already listed as a direct dependency in [project].dependencies (line 25), making it installed by default. The separate [dependency-groups].report group (line 33) containing only ["report"] appears redundant unless there's a specific use case (e.g., making it optional in the future).

If the intent is to keep report as an optional dependency, consider removing it from [project].dependencies and only keeping it in the dependency group.

Also applies to: 33-33

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pyproject.toml` at line 25, The pyproject declares "report" both in
[project].dependencies and in [dependency-groups].report, which is redundant;
decide whether "report" should be a default dependency or optional—if optional,
remove "report" from [project].dependencies and keep it only in
[dependency-groups].report, otherwise delete the [dependency-groups].report
entry so "report" remains a normal required dependency; update the manifest
accordingly to reflect that decision.
configs/reporting/reporter/validation_heatmap/virchow2_level1.yaml (1)

10-11: Avoid hardcoded local filesystem paths in shared config.

Line 10 makes this run config host-specific and brittle across environments. Prefer a required placeholder (or env interpolation) and pass it via override.

Proposed refactor
 background:
   _target_: report.masks.BasicImageRetriever
-  source_dir: /mnt/data/MOU/lymph_nodes/dataset1-ihc-2023/
+  source_dir: ???
   globs: ["SNB_IHC_CASE_1_SLIDE_3-1.mrxs"]
   layer_name: background
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@configs/reporting/reporter/validation_heatmap/virchow2_level1.yaml` around
lines 10 - 11, Replace the hardcoded filesystem path in the config key
source_dir with a required placeholder or environment interpolation (e.g.
${SOURCE_DIR} or ${env:SOURCE_DIR}) and keep globs as-is; update the config
consumer/loader to treat source_dir as mandatory and fail fast with a clear
message if the placeholder/env var is unset so callers pass an override or set
the env before running.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@configs/reporting/default.yaml`:
- Around line 1-4: The reporting/default.yaml file is not included in the active
Hydra defaults chain; add "reporting/default" to the defaults list so the
reporting config is reachable at runtime — update the defaults array in
configs/base.yaml (or alternatively add it to the defaults in
configs/lymph_nodes.yaml or configs/preprocessing.yaml) so that the defaults
chain contains the entry "reporting: default" (i.e., include reporting/default)
and thus wires the reporting stack into the application's Hydra configuration
tree.

---

Nitpick comments:
In `@configs/reporting/reporter/validation_heatmap/virchow2_level1.yaml`:
- Around line 10-11: Replace the hardcoded filesystem path in the config key
source_dir with a required placeholder or environment interpolation (e.g.
${SOURCE_DIR} or ${env:SOURCE_DIR}) and keep globs as-is; update the config
consumer/loader to treat source_dir as mandatory and fail fast with a clear
message if the placeholder/env var is unset so callers pass an override or set
the env before running.

In `@pyproject.toml`:
- Line 25: The pyproject declares "report" both in [project].dependencies and in
[dependency-groups].report, which is redundant; decide whether "report" should
be a default dependency or optional—if optional, remove "report" from
[project].dependencies and keep it only in [dependency-groups].report, otherwise
delete the [dependency-groups].report entry so "report" remains a normal
required dependency; update the manifest accordingly to reflect that decision.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9870dd68-22ca-44cc-a069-8ed695e0363e

📥 Commits

Reviewing files that changed from the base of the PR and between 5865333 and 45a8fcc.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (16)
  • configs/reporting/default.yaml
  • configs/reporting/hydra/default.yaml
  • configs/reporting/mlflow/base.yaml
  • configs/reporting/mlflow/kubas_cluster.yaml
  • configs/reporting/mlflow/kubas_cluster_s3.yaml
  • configs/reporting/mlflow/kubas_external.yaml
  • configs/reporting/mlflow/local.yaml
  • configs/reporting/reporter/background/drive.yaml
  • configs/reporting/reporter/background/mlflow_artifact.yaml
  • configs/reporting/reporter/background/mlflow_run_id.yaml
  • configs/reporting/reporter/background/mlflow_tyler.yaml
  • configs/reporting/reporter/save/local.yaml
  • configs/reporting/reporter/save/mlflow_attach_to_run.yaml
  • configs/reporting/reporter/save/mlflow_standalone_run.yaml
  • configs/reporting/reporter/validation_heatmap/virchow2_level1.yaml
  • pyproject.toml

Comment on lines +1 to +4
defaults:
- _self_
- hydra: default
- mlflow: kubas_cluster

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Hydra entrypoints =="
rg -nP --type=py '@hydra\.main\s*\(|config_name\s*=|config_path\s*=' -C2

echo
echo "== References to reporting/default and reporting groups =="
rg -nP 'reporting/default|configs/reporting|reporter/validation_heatmap|mlflow_standalone_run|mlflow_artifact' -C2

echo
echo "== Root defaults files =="
fd -i 'base.yaml|lymph_nodes.yaml|default.yaml' configs --exec sh -c 'echo "--- $1"; sed -n "1,120p" "$1"' sh {}

Repository: RationAI/lymph-nodes

Length of output: 3230


Wire reporting/default.yaml into the active config tree.

configs/reporting/default.yaml is not reachable from any of the application's Hydra entrypoints. The root configs (lymph_nodes, preprocessing) do not include reporting/default in their defaults chains. Without this wiring, the reporting stack cannot be used at runtime, even though the configuration files are present.

Add reporting/default to the defaults chain in configs/base.yaml or to the relevant entrypoint configs (configs/lymph_nodes.yaml or configs/preprocessing.yaml).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@configs/reporting/default.yaml` around lines 1 - 4, The
reporting/default.yaml file is not included in the active Hydra defaults chain;
add "reporting/default" to the defaults list so the reporting config is
reachable at runtime — update the defaults array in configs/base.yaml (or
alternatively add it to the defaults in configs/lymph_nodes.yaml or
configs/preprocessing.yaml) so that the defaults chain contains the entry
"reporting: default" (i.e., include reporting/default) and thus wires the
reporting stack into the application's Hydra configuration tree.

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.

2 participants