Skip to content

Conversation

@JasonW404
Copy link
Collaborator

This pull request introduces several improvements and refactors to the Data Annotation module, focusing on migrating annotation task creation to use templates, cleaning up related UI components, and improving Docker and deployment configuration. The most significant changes are the switch to template-based annotation task creation, removal of the inline labeling config editor, and updates to Docker build targets and compose files for better maintainability and external volume/network support.

Backend Improvements:

  • Changed Python dependency management tool to Poetry. This simplified package management to only concern main package and provides easy project management as well.

Data Annotation Task Creation and UI Refactor:

  • Migrated annotation task creation to use annotation templates instead of inline labeling config, removing the in-form labeling config editor and related UI logic from CreateAnnotationTaskDialog.tsx. The dialog now fetches available templates and requires users to select one, streamlining the creation process. [1] [2] [3] [4] [5]
  • Renamed the dialog component from CreateAnnptationTaskDialog to CreateAnnotationTaskDialog for consistency and fixed import references in DataAnnotation.tsx.

Frontend Improvements:

  • Added a new custom hook useTagConfig to fetch and parse Label Studio tag configuration, improving code reuse and error handling for tag config management.
  • Updated HTTP query parameter naming in useFetchData.ts to use camelCase (pageSize instead of size) for consistency with backend expectations.
  • Fixed calculation of the Label Studio base URL in DataAnnotation.tsx to correctly parse and increment the port number.
  • Updated the annotation task deletion API call to use the correct parameter signature.

Docker and Deployment Configuration:

  • Added backend-python-docker-build as a required dependency for the main build target in the Makefile, ensuring all necessary backend images are built.
  • Refactored Docker build targets: removed the obsolete label-studio-adapter-docker-build and consolidated the backend-python-docker-build target definition. [1] [2]
  • Updated the docker-compose.yml for Label Studio to mark datamate-dataset-volume and datamate-network as external resources, improving deployment flexibility.

Component and UI Cleanups:

  • Reduced the width of the annotation task creation modal for a more compact UI.

References: [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]

- Added DatasetMappingCreateRequest and DatasetMappingUpdateRequest schemas to handle dataset mapping requests with camelCase and snake_case support.
- Introduced Annotation Template schemas including CreateAnnotationTemplateRequest, UpdateAnnotationTemplateRequest, and AnnotationTemplateResponse for managing annotation templates.
- Implemented AnnotationTemplateService for creating, updating, retrieving, and deleting annotation templates, including validation of configurations and XML generation.
- Added utility class LabelStudioConfigValidator for validating Label Studio configurations and XML formats.
- Updated database schema for annotation templates and labeling projects to include new fields and constraints.
- Seeded initial annotation templates for various use cases including image classification, object detection, and text classification.
… rendering; update LabelStudio config validation for camelCase support
- Introduced new components for tag selection and browsing in the frontend.
- Added API endpoint to fetch tag configuration from the backend.
- Implemented tag configuration management in the backend, including loading from YAML.
- Enhanced template service to support dynamic tag rendering based on configuration.
- Updated validation utilities to incorporate tag configuration checks.
- Refactored existing code to utilize the new tag configuration structure.
…ncy management

- Added pyyaml (>=6.0.3,<7.0.0) to pyproject.toml dependencies.
- Updated Dockerfile to install Poetry and manage dependencies using it.
- Improved layer caching by copying only dependency files before the application code.
- Removed unnecessary installation of build dependencies to keep the final image size small.
@JasonW404 JasonW404 merged commit 45743f3 into main Nov 13, 2025
2 checks passed
JasonW404 added a commit that referenced this pull request Nov 13, 2025
Re-adds the 'database-docker-build' step to the build process. This target was accidentally removed in PR #79.
JasonW404 added a commit that referenced this pull request Nov 13, 2025
Re-adds the 'database-docker-build' step to the build process. This target was accidentally removed in PR #79.
@JasonW404 JasonW404 deleted the add_labeling_template branch November 13, 2025 08:26
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