-
Notifications
You must be signed in to change notification settings - Fork 846
π feat(inspect): Geti Inspect #3158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Mainly based on the UI files and architecture from [Geti Tune](https://github.com/open-edge-platform/training_extensions/tree/develop/ui)
* initial backend commit Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * app -> src Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * Remove empty file Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * move code Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * fix style backend Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * rename media endpoint Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> --------- Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com>
add unit tests for endpoints Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com>
These won't be needed yet
* Use src folder inside run.sh * Set openapi_url path * Update to react 19 * Specify bash language in readme
* add training + inference endpoint Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * remove model api Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * cleanup code Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * update async execution Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * improve training worker loop and predict endpoint Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * fix style Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * fix style to use python3.10 generics Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * add tests for services Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * style fix Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * style fix Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * style fix Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * style fix Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * style fix Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> --------- Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com>
* Add github actions for ui and server of geti inspect * Exclude UI from pre-commit prettier configuration The UI uses a different prettier configuration that does not seem to be picked up by pre-commit. * Add newline to .prettierignore * Apply prettier to `geti-inspect.yaml` * Generate OpenAPI spec before running UI checks * Checkout with lfs * Fix lint issues by removing wip components * Try installing git lfs in the playwright docker image * Fix unused noqa
* Add OpenAPI route * Remove MSW browser worker * Rename infernece to inspect * Update navbar title * Rename infernece to inspect
* rename models/ to pydantic_models/ Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * switch to use async session context manager Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * fix unit tests Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * add pipeline endpoints Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * fix frame aquisition worker and rename pipiline endpoints Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * add sources and sinks endpoints Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * stream loading working Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * add webrtc endpoints Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * fix workers: stream loading + inference + dispatcher Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * fix sinks Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * style Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * add unit tests and address comments Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * add tests Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * fix example schema Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * add todo Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> --------- Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com>
* chore: Add path alias to icons * feat: Add sidebar with dataset, models and stats
* feat: Display placeholders for images * refactor: Fix scrollbar * chore: Remove learn more
* chore(inspect): Update UI scripts * chore: Update github actions * chore: Update port to 8000
* chore: Add project route * feat: Add project management * revert ui lock change * chore: Remove not needed code for project management
β¦ts from the UI (#2980) chore(inspect): Update allowed origins
β¦ training progress (#2984) * feat: Allow user to upload images * feat: List uploaded images * chore: Extract components to separate files and add ready to train and training progress * chore: comment thumbnail url generation
chore(inspect): Update openapi page title
β¦of email (#2990) refactor: Update photo placeholder to use indicator instead of email
Improve error and suspense handling in router By moving all of the routes into a single root route we can make sure that all routes are rendered inside of an layout that has a suspense and error boundary.
Signed-off-by: Ashwin Vaidya <ashwin.vaidya@intel.com>
β¦#2992) refactor: Improvements to the jobs management and training
chore(inspect): Add more models
π fix(inspect): Fix unable to start train job
chore(inspect): Update uv.lock
* add trainable models endpoint * fix Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * add test Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * add copyright Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> --------- Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com>
* add thumbnails endpoint Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * add tests Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * generate thumbnails as background task Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> * update docstring Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com> --------- Signed-off-by: Ma, Xiangxiang <xiangxiang.ma@intel.com>
There was a problem hiding this 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 234 out of 415 changed files in this pull request and generated 3 comments.
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| from api.endpoints.trainable_models_endpoints import _get_trainable_models # noqa: PLC2701 | ||
|
|
||
|
|
||
| def test_list_trainable_models(fxt_client): | ||
| _get_trainable_models.cache_clear() | ||
| # Mock anomalib.models.list_models to return a predictable set | ||
| with patch("api.endpoints.trainable_models_endpoints.list_models", return_value={"padim", "patchcore"}): |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Importing a private function (prefixed with _) from another module is an anti-pattern and breaks encapsulation. Consider making this function public or refactoring the test to use the public API.
| from api.endpoints.trainable_models_endpoints import _get_trainable_models # noqa: PLC2701 | |
| def test_list_trainable_models(fxt_client): | |
| _get_trainable_models.cache_clear() | |
| # Mock anomalib.models.list_models to return a predictable set | |
| with patch("api.endpoints.trainable_models_endpoints.list_models", return_value={"padim", "patchcore"}): | |
| def test_list_trainable_models(fxt_client): | |
| # Mock anomalib.models.list_models to return a predictable set | |
| with patch("api.endpoints.trainable_models_endpoints.list_models", return_value={"padim", "patchcore"}): | |
| with patch("api.endpoints.trainable_models_endpoints.list_models", return_value={"padim", "patchcore"}): |
| const handleCancel = async () => { | ||
| try { | ||
| if (trainingJob.id === undefined) { | ||
| throw Error('TODO: jobs should always have an ID'); |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error message contains 'TODO' indicating incomplete implementation. Replace with a proper error message like 'Job ID is required for cancellation' or ensure jobs always have IDs before this point.
| throw Error('TODO: jobs should always have an ID'); | |
| throw Error('Job ID is required for cancellation'); |
| style={{ | ||
| // Enable hardware acceleration | ||
| transform: 'translate3d(0, 0, 0)', | ||
| '--zoom-scale': zoom.scale, |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] CSS custom property is defined but not used in the component's styles. Either use this property in the CSS or remove it to avoid confusion.
| '--zoom-scale': zoom.scale, |
add mising imports Signed-off-by: Colorado, Camilo <camilo.colorado@intel.com>
select completed models Signed-off-by: Colorado, Camilo <camilo.colorado@intel.com>
There was a problem hiding this 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 234 out of 417 changed files in this pull request and generated 1 comment.
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Start the stop event task | ||
| stop_task = asyncio.create_task(set_stop_event()) | ||
|
|
||
| # Run the train loop |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Comment uses 'train loop' but should clarify this is the training worker's run loop.
| # Run the train loop | |
| # Run the training worker's run loop |
* camera unique names and auto name completion Signed-off-by: Max Xiang <xiangxiang.ma@intel.com> * fix Signed-off-by: Max Xiang <xiangxiang.ma@intel.com> * fix name Signed-off-by: Max Xiang <xiangxiang.ma@intel.com> * Update application/ui/src/features/inspect/toolbar/sources/webcam/webcam-fields.component.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Max Xiang <maxx.rift@gmail.com> * Update application/ui/src/features/inspect/toolbar/sources/webcam/webcam-fields.component.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Max Xiang <maxx.rift@gmail.com> * Update application/ui/src/features/inspect/toolbar/sources/webcam/webcam-fields.component.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Max Xiang <maxx.rift@gmail.com> * Update application/ui/src/features/inspect/toolbar/sources/webcam/webcam-fields.component.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Max Xiang <maxx.rift@gmail.com> * style fix Signed-off-by: Max Xiang <xiangxiang.ma@intel.com> --------- Signed-off-by: Max Xiang <xiangxiang.ma@intel.com> Signed-off-by: Max Xiang <maxx.rift@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* add project deletion Signed-off-by: Max Xiang <xiangxiang.ma@intel.com> * return 409 if running jobs Signed-off-by: Max Xiang <xiangxiang.ma@intel.com> * fix tests Signed-off-by: Max Xiang <xiangxiang.ma@intel.com> * fix mypy Signed-off-by: Max Xiang <xiangxiang.ma@intel.com> * fix test Signed-off-by: Max Xiang <xiangxiang.ma@intel.com> * use pascal case for trainable models Signed-off-by: Max Xiang <xiangxiang.ma@intel.com> * remove unused import Signed-off-by: Max Xiang <xiangxiang.ma@intel.com> --------- Signed-off-by: Max Xiang <xiangxiang.ma@intel.com>
There was a problem hiding this 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 227 out of 417 changed files in this pull request and generated 1 comment.
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| from fastapi import status | ||
|
|
||
| from api.endpoints.trainable_models_endpoints import _get_trainable_models # noqa: PLC2701 |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Importing a private function (prefixed with _) from another module violates encapsulation. Consider exposing this function publicly or refactoring the test to use the public API.
adopt google style docstring Signed-off-by: Max Xiang <xiangxiang.ma@intel.com>
* 3173 remove statistics tab Signed-off-by: Colorado, Camilo <camilo.colorado@intel.com> * rename project Signed-off-by: Colorado, Camilo <camilo.colorado@intel.com> * dataset virtualization Signed-off-by: Colorado, Camilo <camilo.colorado@intel.com> * dataset infinite scroll Signed-off-by: Colorado, Camilo <camilo.colorado@intel.com> * eslint fixes Signed-off-by: Colorado, Camilo <camilo.colorado@intel.com> --------- Signed-off-by: Colorado, Camilo <camilo.colorado@intel.com>
There was a problem hiding this 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 228 out of 425 changed files in this pull request and generated 2 comments.
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const context = useContext(SetZoom); | ||
|
|
||
| if (!context) { | ||
| throw new Error(''); |
Copilot
AI
Dec 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty error message in useSetZoom hook. The error message should be descriptive to help developers understand what went wrong, e.g., 'useSetZoom must be used within a ZoomProvider'.
| throw new Error(''); | |
| throw new Error('useSetZoom must be used within a ZoomProvider'); |
| src={`data:image/png;base64,${inferenceResult.anomaly_map}`} | ||
| alt={`${selectedMediaItem.filename} inference`} | ||
| className={clsx(classes.inferenceImage)} | ||
| style={{ opacity: inferenceOpacity }} |
Copilot
AI
Dec 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The opacity is set both in the style prop and in the animate prop. Since the animate prop controls the opacity transition, the inline style is redundant and could cause conflicts. Remove the inline style and rely solely on the animate prop.
| style={{ opacity: inferenceOpacity }} |
* Implemented new status bar Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com> * Added tests Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com> * Fixed timers Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com> * Fixed linter Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com> * Fixed linter Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com> * Minor fixes Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com> * Fixed comment Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com> * Fixed comments Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com> * Fixed linter Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com> * Fixed comment Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com> * Fixed comments Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com> * Moved export hook to a separate file Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com> --------- Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
* remove item from view modal Signed-off-by: Colorado, Camilo <camilo.colorado@intel.com> * download button Signed-off-by: Colorado, Camilo <camilo.colorado@intel.com> * new end list hook Signed-off-by: Colorado, Camilo <camilo.colorado@intel.com> * LoadMoreList component Signed-off-by: Colorado, Camilo <camilo.colorado@intel.com> --------- Signed-off-by: Colorado, Camilo <camilo.colorado@intel.com>
There was a problem hiding this 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 229 out of 448 changed files in this pull request and generated 1 comment.
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| style={{ | ||
| // Enable hardware acceleration | ||
| transform: 'translate3d(0, 0, 0)', | ||
| '--zoom-scale': zoom.scale, |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] CSS custom property value should be converted to a string. While JavaScript may coerce the number, explicit conversion with .toString() or template literal is more reliable and matches CSS custom property best practices.
| '--zoom-scale': zoom.scale, | |
| '--zoom-scale': `${zoom.scale}`, |
feat(inspect): add contextual help for compression types in export model dialog Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
β¦3201) * fix pipeline visualization Signed-off-by: Max Xiang <xiangxiang.ma@intel.com> * fix tests Signed-off-by: Max Xiang <xiangxiang.ma@intel.com> * make max_epochs optional Signed-off-by: Max Xiang <xiangxiang.ma@intel.com> * make max_epochs optional Signed-off-by: Max Xiang <xiangxiang.ma@intel.com> * add pipeline overlay on/off Signed-off-by: Max Xiang <xiangxiang.ma@intel.com> * make fps more reactive Signed-off-by: Max Xiang <xiangxiang.ma@intel.com> * address comment Signed-off-by: Max Xiang <xiangxiang.ma@intel.com> * enable/disable pipeline overlay Signed-off-by: Colorado, Camilo <camilo.colorado@intel.com> * COLOR_RGB2BGR Signed-off-by: Max Xiang <xiangxiang.ma@intel.com> * enabled -> overlay Signed-off-by: Max Xiang <xiangxiang.ma@intel.com> --------- Signed-off-by: Max Xiang <xiangxiang.ma@intel.com> Signed-off-by: Colorado, Camilo <camilo.colorado@intel.com> Co-authored-by: Colorado, Camilo <camilo.colorado@intel.com>
There was a problem hiding this 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 229 out of 448 changed files in this pull request and generated 1 comment.
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # - Multiple training jobs to run concurrently | ||
| # - Event loop to remain responsive for shutdown signals | ||
| if len(running_tasks) < MAX_CONCURRENT_TRAINING: | ||
| running_tasks.add(asyncio.create_task(training_service.train_pending_job())) |
Copilot
AI
Dec 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fire-and-forget task creation could lead to unhandled exceptions being silently ignored. Consider storing task exceptions and logging them. For example: task = asyncio.create_task(training_service.train_pending_job()); task.add_done_callback(lambda t: logger.error(f'Task failed: {t.exception()}') if t.exception() else None)
| running_tasks.add(asyncio.create_task(training_service.train_pending_job())) | |
| task = asyncio.create_task(training_service.train_pending_job()) | |
| task.add_done_callback( | |
| lambda t: logger.error(f"Task failed: {t.exception()}", exc_info=True) if t.exception() else None | |
| ) | |
| running_tasks.add(task) |
* limit next page request Signed-off-by: Colorado, Camilo <camilo.colorado@intel.com> * load paginated projects Signed-off-by: Colorado, Camilo <camilo.colorado@intel.com> --------- Signed-off-by: Colorado, Camilo <camilo.colorado@intel.com>
* reorder anomaly-map Signed-off-by: Colorado, Camilo <camilo.colorado@intel.com> * selection card style Signed-off-by: Colorado, Camilo <camilo.colorado@intel.com> * field validations Signed-off-by: Colorado, Camilo <camilo.colorado@intel.com> * disable remove source/sink when connected to a pipeline Signed-off-by: Colorado, Camilo <camilo.colorado@intel.com> --------- Signed-off-by: Colorado, Camilo <camilo.colorado@intel.com>
There was a problem hiding this 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 231 out of 454 changed files in this pull request and generated no new comments.
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Update Playwright to 1.57 I've also ran `npm audit fix` to fix minor security vulnerabilities related to our linting tools. Signed-off-by: Mark Redeman <mark.s.redeman@intel.com>
* Add early stopping Signed-off-by: Ashwin Vaidya <ashwin.vaidya@intel.com> * Fix test Signed-off-by: Ashwin Vaidya <ashwin.vaidya@intel.com> --------- Signed-off-by: Ashwin Vaidya <ashwin.vaidya@intel.com>
There was a problem hiding this 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 230 out of 454 changed files in this pull request and generated no new comments.
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
π Description
β¨ Changes
Select what type of change your PR is:
β Checklist
Before you submit your pull request, please make sure you have completed the following steps:
For more information about code review checklists, see the Code Review Checklist.