feat: Enhanced file and annotation synchronization across DataMate and LabelStudio. fix: change LabelStudio mapping to +1 of DataMate.

* feat: Refactor configuration and sync logic for improved dataset handling and logging

* feat: Enhance annotation synchronization and dataset file management

- Added new fields `tags_updated_at` to `DatasetFiles` model for tracking the last update time of tags.
- Implemented new asynchronous methods in the Label Studio client for fetching, creating, updating, and deleting task annotations.
- Introduced bidirectional synchronization for annotations between DataMate and Label Studio, allowing for flexible data management.
- Updated sync service to handle annotation conflicts based on timestamps, ensuring data integrity during synchronization.
- Enhanced dataset file response model to include tags and their update timestamps.
- Modified database initialization script to create a new column for `tags_updated_at` in the dataset files table.
- Updated requirements to ensure compatibility with the latest dependencies.

* fix: Update port mapping for label studio and adjust base URL in DataAnnotation component
This commit is contained in:
Jason Wang
2025-11-10 10:04:41 +08:00
committed by GitHub
parent 60e2289019
commit 8a0228b20e
2 changed files with 2 additions and 3 deletions

View File

@@ -9,7 +9,7 @@ services:
expose:
- "8000"
ports:
- "8000:8000"
- "30001:8000"
depends_on:
- pg-db
environment:

View File

@@ -14,7 +14,6 @@ import {
deleteAnnotationTaskByIdUsingDelete,
queryAnnotationTasksUsingGet,
syncAnnotationTaskUsingPost,
getConfigUsingGet,
} from "../annotation.api";
import { mapAnnotationTask } from "../annotation.const";
import CreateAnnotationTask from "../Create/components/CreateAnnptationTaskDialog";
@@ -47,7 +46,7 @@ export default function DataAnnotation() {
let mounted = true;
(async () => {
try {
const baseUrl = `http://${window.location.hostname}:8000`;
const baseUrl = `http://${window.location.hostname}:${window.location.port + 1}`;
if (mounted) setLabelStudioBase(baseUrl);
} catch (e) {
if (mounted) setLabelStudioBase(null);