Skip to content

Conversation

@ActiveChooN
Copy link

@ActiveChooN ActiveChooN commented Nov 27, 2025

📝 Description

Added export model dialog and model action menu item
Screenshot 2025-11-28 at 14 04 41

UI is blocking for now, but I'll implement download status in the status bar in my next PR

  • 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 review requested due to automatic review settings November 27, 2025 09:19
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 an export functionality for completed models in the inspect feature, allowing users to download models in various formats (OpenVINO, ONNX, PyTorch) with optional compression for OpenVINO models.

Key Changes:

  • Added export model dialog with format and compression selection
  • Integrated export action into the model actions menu
  • Implemented blob download utility for file downloads

Reviewed changes

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

File Description
application/ui/src/features/inspect/utils.ts Added downloadBlob utility function for triggering file downloads
application/ui/src/features/inspect/models/model-actions-menu.component.tsx Added export menu item and dialog integration for completed models
application/ui/src/features/inspect/models/export-model-dialog.component.tsx New dialog component for selecting export format and compression options

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

});

if (response.error) {
throw new Error('Export failed');
Copy link

Copilot AI Nov 27, 2025

Choose a reason for hiding this comment

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

The error message 'Export failed' is generic and doesn't provide helpful information. Consider including the actual error details from response.error to help with debugging.

Copilot uses AI. Check for mistakes.
Comment on lines +33 to +35
{ id: 'int8', name: 'INT8' },
{ id: 'int8_ptq', name: 'INT8 PTQ' },
{ id: 'int8_acq', name: 'INT8 ACQ' },
Copy link
Contributor

Choose a reason for hiding this comment

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

I think here we need to figure out if we can forward the user to some documentation page to explain the differences between these.
Ideally we should tell the user why they should pick one of these options over the other.

Copy link
Author

Choose a reason for hiding this comment

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

This is the first implementation of this dialog. Ideally, it should be a separate page, so there is plenty of room for improvement in future PRs. I'll consider how it can be implemented neatly.


const blob = response.data as Blob;
const compressionSuffix = compression ? `_${compression}` : '';
const filename = `${model.name}_${selectedFormat}${compressionSuffix}.zip`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we sanitize model.name here? I think at the moment we always use the snake case format from the server, but I can imagine us changing that later on to be "Title case"?

One other thing we could do is prefix with the project name or id (I think name would be more ux friendly) and later model version (in case the user has trained say Padim twice).
Alternatively we could add the export date to the file.
These are mostly suggestions because I find that in Geti I would often export multiple models at a time but have no clue which zip file corresponds to which project/model.

Copy link
Author

Choose a reason for hiding this comment

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

Good point. For now, I've added the project name. Would it be more helpful to add the train job timestamp to the file than the export timestamp?

Comment on lines 20 to 22
const [isLogsDialogOpen, setIsLogsDialogOpen] = useState(false);
const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState(false);
const [isExportDialogOpen, setIsExportDialogOpen] = useState(false);
Copy link
Contributor

Choose a reason for hiding this comment

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

Refactor suggestion: instead of having multiple isXOpen states, we could have a useState<null | 'logs' | 'delete' | 'export'> type of state?

Copy link
Author

Choose a reason for hiding this comment

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

Fixed

Signed-off-by: Dmitry Kalinin <[email protected]>
Signed-off-by: Dmitry Kalinin <[email protected]>
Copilot AI review requested due to automatic review settings November 28, 2025 13:08
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

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


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

Comment on lines 69 to 70
const handleExport = async () => {
setIsExporting(true);
Copy link
Contributor

Choose a reason for hiding this comment

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

Wdyt of wrapping this in a useMutation? That way you don't need to keep track of isExporting etc (less chance of race conditions)

Copy link
Author

Choose a reason for hiding this comment

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

Good point, changed

Signed-off-by: Dmitry Kalinin <[email protected]>
@ActiveChooN ActiveChooN merged commit efd0710 into open-edge-platform:feature/geti-inspect Dec 1, 2025
19 of 21 checks passed
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