Skip to content

feat: add dataset stats overview and job metadata tracking with tags and notes#18

Merged
cristofima merged 13 commits into
mainfrom
dev
Dec 23, 2025
Merged

feat: add dataset stats overview and job metadata tracking with tags and notes#18
cristofima merged 13 commits into
mainfrom
dev

Conversation

@cristofima
Copy link
Copy Markdown
Owner

@cristofima cristofima commented Dec 22, 2025

This PR adds job metadata tracking capabilities to the AutoML platform, enabling users to tag and annotate training jobs for better experiment management. The changes include backend API endpoints for updating job metadata, a new frontend component for editing tags and notes, and various UX improvements including enhanced error handling pages and improved dataset statistics visualization.

Key Changes:

  • Added tags and notes fields to job records with PATCH endpoint for updates
  • Created JobMetadataEditor component for inline editing of job metadata
  • Enhanced error pages (global-error, not-found, loading) with better UX and navigation
  • Fixed training container imports (preprocessor.py, eda.py) to use relative imports
  • Updated Terraform CORS configuration to support both Amplify branch and default domains

Enhanced job metadata with optional tags and notes fields to improve experiment tracking and filtering capabilities. Introduced a new
JobUpdateRequest schema for updating these fields.

Modified files (3):
- backend/api/models/schemas.py: Added tags and notes to JobDetails and JobResponse
- backend/api/routers/models.py: Implemented update_job_metadata endpoint
- backend/api/services/dynamo_service.py: Added update_job_metadata method
Implemented tag filtering in the job history page and added a new JobMetadataEditor component for editing job tags and notes. This enhances user experience by allowing better organization and tracking of jobs.

Modified files (4):
- frontend/app/history/page.tsx: Added tag filtering and UI updates
- frontend/app/results/[jobId]/page.tsx: Added JobMetadataEditor for Tags and Notes in job results
- frontend/components/JobMetadataEditor.tsx: New component for editing job metadata
- frontend/lib/api.ts: Updated JobDetails interface to include tags and notes
Implemented user-friendly error handling and loading states across the application.
New components include GlobalError, Loading, and NotFound pages to enhance user experience during application errors and loading processes.

Modified files (6):
- frontend/app/global-error.tsx: Added global error component
- frontend/app/loading.tsx: Added loading component
- frontend/app/not-found.tsx: Added not found component
- frontend/app/results/[jobId]/error.tsx: Updated error handling for results page
- frontend/app/training/[jobId]/error.tsx: Updated error handling for training page
- frontend/app/results/[jobId]/page.tsx: Enhanced error display and loading states
Configured CORS to allow localhost for local development in both dev and prod environments. This change enables smoother testing and integration with frontend applications.

Modified files (3):
- infrastructure/terraform/dev.tfvars: Added localhost to CORS origins
- infrastructure/terraform/prod.tfvars: Added GitHub repository reference
- infrastructure/terraform/s3.tf: Updated CORS origins calculation logic
- Changed relative imports (.utils) to absolute imports (utils) in preprocessor.py and eda.py
- Fixes ImportError when running train.py directly in container
- Also detect Amplify environment in useJobSSE to use polling directly
@cristofima cristofima requested a review from Copilot December 22, 2025 22:29
@cristofima cristofima changed the title feat: add job metadata tracking with tags and notes feat: add dataset stats overview and job metadata tracking with tags and notes Dec 22, 2025
Copy link
Copy Markdown

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 job metadata tracking capabilities to the AutoML platform, enabling users to tag and annotate training jobs for better experiment management. The changes include backend API endpoints for updating job metadata, a new frontend component for editing tags and notes, and various UX improvements including enhanced error handling pages and improved dataset statistics visualization.

Key Changes:

  • Added tags and notes fields to job records with PATCH endpoint for updates
  • Created JobMetadataEditor component for inline editing of job metadata
  • Enhanced error pages (global-error, not-found, loading) with better UX and navigation
  • Fixed training container imports (preprocessor.py, eda.py) to use relative imports
  • Updated Terraform CORS configuration to support both Amplify branch and default domains

Reviewed changes

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

Show a summary per file
File Description
backend/api/models/schemas.py Added tags/notes fields to JobDetails and JobResponse; created JobUpdateRequest schema
backend/api/routers/models.py Implemented PATCH endpoint for updating job metadata with validation
backend/api/services/dynamo_service.py Added update_job_metadata method for DynamoDB updates
frontend/lib/api.ts Added updateJobMetadata function and JobUpdateRequest interface
frontend/components/JobMetadataEditor.tsx New component for editing tags and notes with inline UI
frontend/components/ColumnStatsDisplay.tsx New component for visualizing dataset statistics
frontend/app/training/[jobId]/page.tsx Enhanced error state handling and layout consistency
frontend/app/training/[jobId]/error.tsx New error boundary for training page
frontend/app/results/[jobId]/page.tsx Integrated JobMetadataEditor; improved error handling
frontend/app/results/[jobId]/error.tsx New error boundary for results page
frontend/app/history/page.tsx Added tag filtering and display in jobs table
frontend/app/not-found.tsx New 404 page with navigation options
frontend/app/loading.tsx New loading page with animated spinner
frontend/app/global-error.tsx New global error boundary
frontend/app/error.tsx New root error boundary
frontend/app/configure/[datasetId]/page.tsx Replaced dataset info section with ColumnStatsDisplay
frontend/lib/useJobSSE.ts Added cleanup on persistent polling errors
infrastructure/terraform/s3.tf Updated CORS logic to include both Amplify branch and default domains
infrastructure/terraform/dev.tfvars Added GitHub repository and CORS origins configuration
infrastructure/terraform/prod.tfvars Added GitHub repository configuration
backend/training/preprocessor.py Fixed import to use relative path for Docker container
backend/training/eda.py Fixed import to use relative path for Docker container

Comment thread backend/api/models/schemas.py Outdated
Comment thread frontend/components/JobMetadataEditor.tsx
Comment thread frontend/components/JobMetadataEditor.tsx
Comment thread infrastructure/terraform/dev.tfvars Outdated
Comment thread backend/api/services/dynamo_service.py
Comment thread backend/api/routers/models.py
Comment thread backend/api/routers/models.py Outdated
Comment on lines +3 to +9
export default function GlobalError({
error,
reset,
}: {
error: Error & { digest?: string };
reset: () => void;
}) {
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

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

The global-error.tsx component is missing the required useEffect hook to log errors. Next.js error boundaries should log errors for debugging and monitoring purposes. Consider adding a useEffect similar to the other error.tsx files to log errors to the console.

Copilot uses AI. Check for mistakes.
@cristofima cristofima merged commit dcab02b into main Dec 23, 2025
3 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