Skip to content

feat(studio): model info on fileset details page#205

Open
aray12 wants to merge 2 commits into
mainfrom
astd-189-filesets-add-model-entity-deployment-info-on-the-model
Open

feat(studio): model info on fileset details page#205
aray12 wants to merge 2 commits into
mainfrom
astd-189-filesets-add-model-entity-deployment-info-on-the-model

Conversation

@aray12
Copy link
Copy Markdown
Contributor

@aray12 aray12 commented Jun 5, 2026

Summary by CodeRabbit

  • New Features

    • Added fileset-based filtering for models using the {workspace}/{fileset_name} reference format.
  • Tests

    • Enhanced test coverage for fileset filtering and metadata section rendering.

@aray12 aray12 requested review from a team as code owners June 5, 2026 19:17
Signed-off-by: Alex Ray <alray@nvidia.com>
@aray12 aray12 force-pushed the astd-189-filesets-add-model-entity-deployment-info-on-the-model branch from f48b98b to 4437116 Compare June 5, 2026 19:21
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 5, 2026

Need the big picture first? Review this PR in Change Stack to see what changed before going file by file.

Review Change Stack

📝 Walkthrough

Walkthrough

Add fileset filter support to model list API: OpenAPI schema and Python backend schema now accept optional fileset field. Mock handler includes a fileset-backed model and filters by fileset with workspace fallback. Unit tests updated to validate metadata sections with entity data.

Changes

Model Fileset Filtering and Metadata Display

Layer / File(s) Summary
API schema and backend model filter
openapi/openapi.yaml, services/core/models/src/nmp/core/models/schemas.py
OpenAPI and Python schema now define fileset: Optional[str] filter field expecting {workspace}/{fileset_name} format.
Mock data and handler fileset filtering
web/packages/studio/src/mocks/entity-store/models.ts, web/packages/studio/src/mocks/handlers/models.ts
New mock model entityStoreModelWithFileset is imported and added to mock list. Handler adds filter[fileset] support; workspace derivation from request path occurs only when fileset filter is absent.
Test updates for metadata entity sections
web/packages/studio/src/routes/FilesetDetailRoute/FilesetMetadataPanel/utils.spec.tsx
Existing license-link and source-section tests updated to pass entities array. New test suite validates model entity section creation, deployment-status rendering (empty vs populated model_providers), and section omission when entities array is empty.

Suggested reviewers

  • htolentino-nvidia
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding model information display on the fileset details page, which aligns with all file modifications across the backend schema, frontend mocks, and tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch astd-189-filesets-add-model-entity-deployment-info-on-the-model

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

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 (1)
openapi/openapi.yaml (1)

20319-20322: ⚡ Quick win

Add pattern validation for fileset reference format.

Description claims {workspace}/{fileset_name} format but schema accepts any string. Add pattern constraint:

Proposed validation
 fileset:
   description: Filter by fileset reference in the form {workspace}/{fileset_name}.
   title: Fileset
   type: string
+  pattern: '^[^/]+/[^/]+$'
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@openapi/openapi.yaml` around lines 20319 - 20322, The fileset schema
currently allows any string but claims the format "{workspace}/{fileset_name}";
update the fileset property in openapi.yaml to add a pattern regex enforcing a
single slash-separated pair (e.g. pattern: '^[^/]+/[^/]+$') so that values like
workspace/fileset_name are required; locate the fileset schema block (properties
-> fileset with title "Fileset") and add the pattern constraint (and optionally
an example) to validate the expected format.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@web/packages/studio/src/routes/ModelDetailRoute/ModelMetadataPanel/utils.tsx`:
- Around line 177-187: Update formatFinetuningType to map all backend enum
values (e.g., 'all_weights', 'lora_merged', 'p_tuning_v2', plus existing 'lora'
and 'p_tuning') to human-friendly labels like "All Weights", "LoRA (merged)",
"P-Tuning v2", etc., instead of returning raw snake_case; modify the switch in
formatFinetuningType to include cases for 'all_weights', 'lora_merged',
'p_tuning_v2' and any other backend enums, and fall back to a normalized
title-case conversion (replace underscores with spaces and capitalize words) for
unknown values so snake_case never renders raw.

---

Nitpick comments:
In `@openapi/openapi.yaml`:
- Around line 20319-20322: The fileset schema currently allows any string but
claims the format "{workspace}/{fileset_name}"; update the fileset property in
openapi.yaml to add a pattern regex enforcing a single slash-separated pair
(e.g. pattern: '^[^/]+/[^/]+$') so that values like workspace/fileset_name are
required; locate the fileset schema block (properties -> fileset with title
"Fileset") and add the pattern constraint (and optionally an example) to
validate the expected format.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 94f022ae-be41-46e3-8a0e-2d705048aae2

📥 Commits

Reviewing files that changed from the base of the PR and between 029d6d0 and f48b98b.

📒 Files selected for processing (8)
  • openapi/openapi.yaml
  • services/core/models/src/nmp/core/models/schemas.py
  • web/packages/studio/src/mocks/entity-store/models.ts
  • web/packages/studio/src/mocks/handlers/models.ts
  • web/packages/studio/src/routes/ModelDetailRoute/ModelCardTab/index.tsx
  • web/packages/studio/src/routes/ModelDetailRoute/ModelMetadataPanel/index.tsx
  • web/packages/studio/src/routes/ModelDetailRoute/ModelMetadataPanel/utils.spec.tsx
  • web/packages/studio/src/routes/ModelDetailRoute/ModelMetadataPanel/utils.tsx

Comment on lines +177 to +187
const formatFinetuningType = (type: string): string => {
switch (type.toLowerCase()) {
case 'lora':
return 'LoRA';
case 'p_tuning':
return 'P-Tuning';
case 'sft':
return 'SFT';
default:
return type;
}
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 | 🟡 Minor | ⚡ Quick win

Map actual finetuning enum values, not just sft.

Line 183 maps 'sft', but the backend enum uses values like 'all_weights', 'lora_merged', and 'p_tuning_v2'; these will render raw snake_case today.

Suggested fix
 const formatFinetuningType = (type: string): string => {
-  switch (type.toLowerCase()) {
-    case 'lora':
-      return 'LoRA';
-    case 'p_tuning':
-      return 'P-Tuning';
-    case 'sft':
-      return 'SFT';
-    default:
-      return type;
-  }
+  const normalizedType = type.toLowerCase();
+
+  if (['lora', 'qlora', 'adalora', 'dora', 'lora_plus', 'lora_merged'].includes(normalizedType)) {
+    return 'LoRA';
+  }
+  if (
+    ['prompt_tuning', 'prefix_tuning', 'p_tuning', 'p_tuning_v2', 'soft_prompt'].includes(
+      normalizedType
+    )
+  ) {
+    return 'P-Tuning';
+  }
+  if (normalizedType === 'all_weights') {
+    return 'SFT';
+  }
+  return type;
 };
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/packages/studio/src/routes/ModelDetailRoute/ModelMetadataPanel/utils.tsx`
around lines 177 - 187, Update formatFinetuningType to map all backend enum
values (e.g., 'all_weights', 'lora_merged', 'p_tuning_v2', plus existing 'lora'
and 'p_tuning') to human-friendly labels like "All Weights", "LoRA (merged)",
"P-Tuning v2", etc., instead of returning raw snake_case; modify the switch in
formatFinetuningType to include cases for 'all_weights', 'lora_merged',
'p_tuning_v2' and any other backend enums, and fall back to a normalized
title-case conversion (replace underscores with spaces and capitalize words) for
unknown values so snake_case never renders raw.

…-model-entity-deployment-info-on-the-model

Signed-off-by: Alex Ray <alray@nvidia.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

Documentation preview is ready

Preview: https://nvidia-nemo.github.io/nemo-platform/pr-preview/pr-205/pr-205/

Built from 9c9c161 in workflow run.

This preview is deployed from this PR branch, updates when docs changes are pushed, and will be removed when the PR closes.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
web/packages/studio/src/routes/FilesetDetailRoute/FilesetMetadataPanel/utils.spec.tsx (1)

44-50: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Fix getMetadataSections API mismatch with utils.spec.tsx (entities arg not supported)

  • web/packages/studio/src/routes/FilesetDetailRoute/FilesetMetadataPanel/utils.tsx defines getMetadataSections(fileset, readmeMetadata) (2 args), but web/packages/studio/src/routes/FilesetDetailRoute/FilesetMetadataPanel/utils.spec.tsx calls it with a 3rd entities argument (getMetadataSections(huggingfaceFileset, ..., []) / [entity]), which should fail TypeScript compilation.
  • The “model entity sections” assertions (model-entity-* and “Deployment” rows) aren’t produced by the current getMetadataSections implementation (it only returns source and optional details).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@web/packages/studio/src/routes/FilesetDetailRoute/FilesetMetadataPanel/utils.spec.tsx`
around lines 44 - 50, The test calls getMetadataSections with a third entities
argument but the implementation getMetadataSections(fileset, readmeMetadata)
only accepts two params, so update the spec to match the API: remove the third
argument (e.g., change getMetadataSections(huggingfaceFileset, { license: 'MIT',
license_link: 'javascript:alert(1)' }, []) to
getMetadataSections(huggingfaceFileset, { license: 'MIT', license_link:
'javascript:alert(1)' })) and adjust the expectations/assertions to only assert
the sections the function currently returns (e.g., 'source' and optional
'details'), removing any assertions for "model-entity-*" or "Deployment" rows
that the current getMetadataSections does not produce; reference
getMetadataSections, huggingfaceFileset, and the test file utils.spec.tsx while
making these edits.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In
`@web/packages/studio/src/routes/FilesetDetailRoute/FilesetMetadataPanel/utils.spec.tsx`:
- Around line 44-50: The test calls getMetadataSections with a third entities
argument but the implementation getMetadataSections(fileset, readmeMetadata)
only accepts two params, so update the spec to match the API: remove the third
argument (e.g., change getMetadataSections(huggingfaceFileset, { license: 'MIT',
license_link: 'javascript:alert(1)' }, []) to
getMetadataSections(huggingfaceFileset, { license: 'MIT', license_link:
'javascript:alert(1)' })) and adjust the expectations/assertions to only assert
the sections the function currently returns (e.g., 'source' and optional
'details'), removing any assertions for "model-entity-*" or "Deployment" rows
that the current getMetadataSections does not produce; reference
getMetadataSections, huggingfaceFileset, and the test file utils.spec.tsx while
making these edits.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: e8b85f62-9d71-4e9a-81d2-cee26b87d825

📥 Commits

Reviewing files that changed from the base of the PR and between 4437116 and 9c9c161.

📒 Files selected for processing (2)
  • openapi/openapi.yaml
  • web/packages/studio/src/routes/FilesetDetailRoute/FilesetMetadataPanel/utils.spec.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • openapi/openapi.yaml

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

Suite Lines Covered Line Rate Branch Rate
Unit Tests 18712/24765 75.6% 62.0%
Integration Tests 11992/23529 51.0% 26.1%

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.

1 participant