Skip to content

Poseidon/feature/temp demo test#128

Merged
92 commits merged intoposeidon/devfrom
poseidon/feature/temp_demo_test
Aug 4, 2025
Merged

Poseidon/feature/temp demo test#128
92 commits merged intoposeidon/devfrom
poseidon/feature/temp_demo_test

Conversation

@ghost
Copy link

@ghost ghost commented Jul 30, 2025

This branch is merging the changes in the following PRs and resolving the conflicts between them; It also fixes issues with the inference and model deployment pages, making the code more reliable and stable. It also cleans some of the mocked requests in the other branches and only relies on the actual services.

  1. Poseidon/feature/state optimization and critical fixes #106
  2. (refactor): database models and their associated calls #104
  3. https://github.com/Mindtrace/mindtrace/tree/poseidon/feature/423-inference-page

mazenelabd and others added 16 commits July 23, 2025 11:53
…dware

Camera Manager & Proxy:
- Enhanced CameraProxy with better error handling and async patterns
- Improved configure method with detailed error reporting
- Added comprehensive batch operations and HDR capture support
- Enhanced retry logic and network bandwidth management

API Enhancements:
- Added comprehensive REST API endpoints for camera operations
- Improved error handling with detailed exception mapping
- Enhanced documentation and type hints
- Added new endpoints for batch operations and HDR capture

Backend Improvements:
- Made ROI and image enhancement methods async in mock backends
- Enhanced error handling and logging throughout backends
- Improved configuration import/export functionality
- Added better validation and error reporting

Test Suite Fixes:
- Fixed test_cameras.py to use correct backend method names
- Added proper async/await patterns throughout tests
- Skipped tests for methods not implemented in backends
- Fixed discovery consistency test for mock cameras
- All 73 tests now pass (68 passed, 5 skipped, 0 failed)

This maintains backward compatibility while providing a robust, modern camera management system.
- Remove reset logic from seed files to make them production-safe
- Make project and organization fields required in Image model
- Remove debug logs from user repository and services
- Fix camera streaming issues (stop streams when switching cameras)
- Implement proper super admin organization management
- Fix Image model initialization in database init
- Clean up verbose database initialization messages
- Fix sample image viewer script to work with current schema
- Add mindtrace-storage dependency to hardware component
- Implement GCS upload for both single and HDR camera captures
- Add GCS configuration settings with auto-upload support
- Update API endpoints to handle GCS URIs in responses
- Add comprehensive GCS documentation and usage examples
- Support explicit GCS parameters and auto-upload via config
- Fix syntax errors and ensure consistent error handling
- Update README with complete GCS integration guide

Features:
- Three storage options: local, GCS, or both
- Auto-upload using configuration defaults
- HDR capture with GCS path patterns
- Metadata support for uploaded images
- Graceful error handling for GCS failures
- Add return_image parameter to CaptureRequest (single capture)
- Add return_images parameter to BatchCaptureRequest (batch capture)
- Update capture endpoints to conditionally return image data
- Update response messages to indicate when image data is excluded
- Update README with comprehensive documentation and examples
- Maintain backward compatibility (defaults to True)

This allows users to reduce response size and improve performance
when only GCS upload or local save is needed, without requiring
image data in the response.
- Fix Basler camera ErrorDescription property access
- Update camera manager GCS upload logic
- Add GCS configuration options
- Make media_type optional in responses
- Update UI camera card with capture button
- Fix camera state GCS path handling
- Update camera configurator UI
…ation-and-critical-fixes

Poseidon/feature/state optimization and critical fixes
- Fix Camera model rebuild error by ensuring models are rebuilt in CameraState initialization
- Add inference page route to poseidon.py for /inference endpoint
- Update GCS bucket configuration to use settings.GCP_BUCKET_NAME
- Optimize database initialization to prevent redundant model rebuilds
- Add proper error handling for model rebuild operations
- Add safe_convert_link() helper function to properly handle Link objects
- Fix 'str' object has no attribute 'get_full_name' error
- Ensure project, organization, and uploaded_by fields are converted correctly
- Add fallback handling for different object types (None, string, object with get_full_name, etc.)
@ghost ghost requested review from Yasserelhaddar and canelbirlik July 30, 2025 11:09
Copy link
Contributor

Choose a reason for hiding this comment

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

are these unrelated file changes coming from dev? If so, lets merge dev into our poseidon/dev i tihnk.

Copy link
Author

Choose a reason for hiding this comment

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

Yes; it was merged by @Yasserelhaddar so that he would be able to use the hardware module

rx.el.select(
rx.el.option("Loading deployments...", value="", disabled=True, selected=True),
disabled=True,
style={
Copy link
Contributor

Choose a reason for hiding this comment

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

reference for UI standardization: too much styling on the pages, lets have these as components. not related wit this pr, just noting.

GCP_BUCKET_NAME: str = ""
GCP_CREDENTIALS_PATH: str = ""

MODEL_SERVER_URL: str = ""
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 we switch to .env based configuration located at the root? i.e.
test.env, prod.env, this class simply could read&populate Settings with it. Class Config seems to almost want to do something similar, though i think its not being used?

Copy link
Author

Choose a reason for hiding this comment

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

We haven't switched to .env yet; it is in a different PR by Uzair.

Copy link
Contributor

Choose a reason for hiding this comment

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

too many repo files. should we create folders, i.e. scan/classification_repo etc

Copy link
Author

Choose a reason for hiding this comment

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

The repo files have one to one relationship with the schema files. which means each schema has a repo. This is why I think it would be ideal to maintain the same folder structure between the schema and the repo files.

@canelbirlik
Copy link
Contributor

Looks good to me, there are few bugs in the UI that are not related with this PR. In future PRs lets not include diffs from merges from main branch I think, so PR against a branch that has already merged mindtrace package updates or we auto merge main dev branch into paz.

@ghost
Copy link
Author

ghost commented Jul 31, 2025

Looks good to me, there are few bugs in the UI that are not related with this PR. In future PRs lets not include diffs from merges from main branch I think, so PR against a branch that has already merged mindtrace package updates or we auto merge main dev branch into paz.

Agree; we should merge the main dev directly to PAZ when needed since the main dev is reviewed and maintained by the core team.

@YasserElHaddar16
Copy link
Contributor

Hey Team,
I agree with both of you on these points.

  • The configuration should be first thing to address, let's make everything centralised in a BaseSetting class that gets the dev prod values from an env file. We can certainly do this now and do it once so we start clean after the merge. or postpone this to the first contribution in the next sprint. What do you think @mazen-elabd @canelbirlik ?
  • There's also quite a bit of debug code scattered throughout. I saw several print() statements - I contributed to those as well - that we probably should replace with proper logging.
  • The repository structure discussion makes sense too, though the current approach of keeping schemas and repos aligned seems reasonable for now.

@canelbirlik
Copy link
Contributor

canelbirlik commented Aug 1, 2025

I've pushed config loading similar to #117
looks good to me overall, lets merge this I think and for remaining things, lets create issues in the project board & solve seperately rather than delaying this stable version.

@ghost ghost merged commit bd73340 into poseidon/dev Aug 4, 2025
Yasserelhaddar pushed a commit that referenced this pull request Aug 26, 2025
This pull request was closed.
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.

7 participants