Skip to content

Commit

Permalink
pbar update
Browse files Browse the repository at this point in the history
  • Loading branch information
PMazarovich committed Aug 7, 2023
1 parent 0c83a79 commit 7141a5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cvat-core/src/server-response-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export interface SerializedTask {
dimension: DimensionType;
id: number;
image_quality: number;
jobs: { count: 1; completed: 0; url: string; };
jobs: { count: 1; completed: 0; url: string; validation: 0};
labels: { count: number; url: string; };
mode: TaskMode | '';
name: string;
Expand Down
15 changes: 2 additions & 13 deletions cvat-core/src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -744,21 +744,10 @@ export class Task extends Session {
data.progress = {
completedJobs: initialData?.jobs?.completed || 0,
totalJobs: initialData?.jobs?.count || 0,
validationJobs: 0,
annotationJobs: 0
validationJobs: initialData?.jobs?.validation || 0,
annotationJobs: (initialData?.jobs?.count || 0) - (initialData?.jobs?.validation || 0) - (initialData?.jobs?.completed || 0)
};

console.log("initial data")
console.log(initialData)
if (Array.isArray(initialData.jobs)) {
console.log("INITIAL JOB")
for (const job of initialData.jobs) {
console.log(job)
if (job.stage === 'validation') data.progress.validationJobs += 1;
if (job.stage === 'annotation') data.progress.annotationJobs += 1;
}
}

data.files = Object.freeze({
server_files: [],
client_files: [],
Expand Down

0 comments on commit 7141a5e

Please sign in to comment.