Skip to content

Commit

Permalink
Resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Marishka17 committed Feb 14, 2025
2 parents 3c9895b + 3caac72 commit a896dfd
Show file tree
Hide file tree
Showing 91 changed files with 1,690 additions and 1,805 deletions.
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"background": {
"activeOnStart": true,
"beginsPattern": "webpack-dev-server",
"endsPattern": "Compiled"
"endsPattern": "compiled"
}
}
}
Expand Down
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

<!-- scriv-insert-here -->

<a id='changelog-2.29.0'></a>
## \[2.29.0\] - 2025-02-10

### Added

- Tasks created from cloud storage can be backed up now
(<https://github.com/cvat-ai/cvat/pull/8972>)

- \[CLI\] `function create-native` now sends the function's declared label types
to the server
(<https://github.com/cvat-ai/cvat/pull/9035>)

### Changed

- When invoking Nuclio functions, labels of type `any` can now be mapped to
labels of all types except `skeleton`
(<https://github.com/cvat-ai/cvat/pull/9050>)

### Fixed

- Fixed invalid server-side track interpolation in tasks with deleted frames
(<https://github.com/cvat-ai/cvat/pull/9059>)

<a id='changelog-2.28.0'></a>
## \[2.28.0\] - 2025-02-06

Expand Down
8 changes: 8 additions & 0 deletions changelog.d/20250203_125000_klakhov_refactor_settings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
### Changed

- Client settings are now saved automatically
(<https://github.com/cvat-ai/cvat/pull/9032>)

### Added
- Gamma filter settings are now automatically saved and restored upon reload
(<https://github.com/cvat-ai/cvat/pull/9032>)
5 changes: 0 additions & 5 deletions changelog.d/20250204_183545_roman_unknown_any.md

This file was deleted.

4 changes: 4 additions & 0 deletions changelog.d/20250205_141639_klakhov_setup_logo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Added

- Ability to customize `api/sever/about` endpoint via settings including logo and sign-in page subtitle
(<https://github.com/cvat-ai/cvat/pull/9052>)
5 changes: 5 additions & 0 deletions changelog.d/20250210_172119_roman_missing_kwargs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Fixed

- \[SDK\] `skeleton_label_spec` now correctly forwards `kwargs` to
`PatchedLabelRequest`
(<https://github.com/cvat-ai/cvat/pull/9087>)
4 changes: 4 additions & 0 deletions changelog.d/20250212_115404_maria_fix_type_annotation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Fixed

- 500 status code returned by API endpoints that support TUS OPTIONS requests
(<https://github.com/cvat-ai/cvat/pull/9077>)
4 changes: 4 additions & 0 deletions changelog.d/20250212_154930_klakhov_frame_regression.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Fixed

- Error: Cannot read properties of undefined (reading 'width') that occurs when changing frames in a video-based GT job
(<https://github.com/cvat-ai/cvat/pull/9095>)
2 changes: 1 addition & 1 deletion cvat-cli/requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cvat-sdk==2.28.1
cvat-sdk==2.29.1

attrs>=24.2.0
Pillow>=10.3.0
Expand Down
5 changes: 5 additions & 0 deletions cvat-cli/src/cvat_cli/_internal/commands_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ def execute(
"name": label_spec.name,
}
)

if getattr(label_spec, "type", "any") != "any":
# Add the type conditionally, to stay compatible with older
# CVAT versions when the function doesn't define label types.
remote_function["labels_v2"][-1]["type"] = label_spec.type
else:
raise cvataa.BadFunctionError(
f"Unsupported function spec type: {type(function.spec).__name__}"
Expand Down
2 changes: 1 addition & 1 deletion cvat-cli/src/cvat_cli/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "2.28.1"
VERSION = "2.29.1"
41 changes: 41 additions & 0 deletions cvat-core/src/about.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT

import { SerializedAbout } from './server-response-types';

export default class AboutData {
#description: string;
#name: string;
#version: string;
#logoURL: string;
#subtitle: string;

constructor(initialData: SerializedAbout) {
this.#description = initialData.description;
this.#name = initialData.name;
this.#version = initialData.version;
this.#logoURL = initialData.logo_url;
this.#subtitle = initialData.subtitle;
}

get description(): string {
return this.#description;
}

get name(): string {
return this.#name;
}

get version(): string {
return this.#version;
}

get logoURL(): string {
return this.#logoURL;
}

get subtitle(): string {
return this.#subtitle;
}
}
3 changes: 2 additions & 1 deletion cvat-core/src/api-implementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import {
QualitySettingsFilter, SerializedAsset,
} from './server-response-types';
import QualityReport from './quality-report';
import AboutData from './about';
import QualityConflict, { ConflictSeverity } from './quality-conflict';
import QualitySettings from './quality-settings';
import { getFramesMeta } from './frames';
Expand Down Expand Up @@ -72,7 +73,7 @@ export default function implementAPI(cvat: CVATCore): CVATCore {

implementationMixin(cvat.server.about, async () => {
const result = await serverProxy.server.about();
return result;
return new AboutData(result);
});
implementationMixin(cvat.server.share, async (directory: string, searchPrefix?: string) => {
const result = await serverProxy.server.share(directory, searchPrefix);
Expand Down
5 changes: 2 additions & 3 deletions cvat-core/src/core-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SPDX-License-Identifier: MIT

import {
ModelKind, ModelReturnType, RQStatus, ShapeType,
LabelType, ModelKind, RQStatus,
} from './enums';

export interface ModelAttribute {
Expand All @@ -28,7 +28,7 @@ export interface MLModelTip {

export interface MLModelLabel {
name: string;
type: ShapeType | 'unknown';
type: LabelType;
attributes: ModelAttribute[];
sublabels?: MLModelLabel[];
svg?: string,
Expand All @@ -42,7 +42,6 @@ export interface SerializedModel {
description?: string;
kind?: ModelKind;
type?: string;
return_type?: ModelReturnType;
owner?: any;
provider?: string;
url?: string;
Expand Down
7 changes: 0 additions & 7 deletions cvat-core/src/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,6 @@ export enum ModelProviders {
CVAT = 'cvat',
}

export enum ModelReturnType {
RECTANGLE = 'rectangle',
TAG = 'tag',
POLYGON = 'polygon',
MASK = 'mask',
}

export const colors = [
'#33ddff',
'#fa3253',
Expand Down
4 changes: 3 additions & 1 deletion cvat-core/src/frames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,9 @@ export async function getFrame(
await refreshJobCacheIfOutdated(jobID);

const framesMetaData = await frameDataCache[jobID].getMeta();
const frameMeta = framesMetaData.frames[frame - jobStartFrame];
const dataFrameNumber = framesMetaData.getDataFrameNumber(frame - jobStartFrame);
const frameIndex = framesMetaData.getFrameIndex(dataFrameNumber);
const frameMeta = framesMetaData.frames[frameIndex];
frameDataCache[jobID].provider.setRenderSize(frameMeta.width, frameMeta.height);
frameDataCache[jobID].decodeForward = isPlaying;
frameDataCache[jobID].forwardStep = step;
Expand Down
3 changes: 2 additions & 1 deletion cvat-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import AnalyticsReport from './analytics-report';
import AnnotationGuide from './guide';
import { JobValidationLayout, TaskValidationLayout } from './validation-layout';
import { Request } from './request';
import AboutData from './about';
import {
runAction,
callAction,
Expand Down Expand Up @@ -61,7 +62,7 @@ export default interface CVATCore {
requests: typeof lambdaManager.requests;
};
server: {
about: typeof serverProxy.server.about;
about: () => Promise<AboutData>;
share: (dir: string) => Promise<{
mimeType: string;
name: string;
Expand Down
18 changes: 13 additions & 5 deletions cvat-core/src/ml-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import PluginRegistry from './plugins';
import {
ModelProviders, ModelKind, ModelReturnType,
LabelType, ModelProviders, ModelKind,
} from './enums';
import {
SerializedModel, ModelParams, MLModelTip, MLModelLabel,
Expand Down Expand Up @@ -44,8 +44,11 @@ export default class MLModel {

public get displayKind(): string {
if (this.kind === ModelKind.DETECTOR) {
if (this.returnType === ModelReturnType.TAG) return 'classifier';
if (this.returnType === ModelReturnType.MASK) return 'segmenter';
switch (this.returnType) {
case LabelType.TAG: return 'classifier';
case LabelType.MASK: return 'segmenter';
default: // fall back on the original kind
}
}
return this.kind;
}
Expand Down Expand Up @@ -94,8 +97,13 @@ export default class MLModel {
return this.serialized?.url;
}

public get returnType(): ModelReturnType | undefined {
return this.serialized?.return_type;
public get returnType(): LabelType {
const uniqueLabelTypes = new Set(this.labels.map((label) => label.type));

if (uniqueLabelTypes.size !== 1) return LabelType.ANY;

const [labelType] = uniqueLabelTypes;
return labelType;
}

public async preview(): Promise<string> {
Expand Down
2 changes: 2 additions & 0 deletions cvat-core/src/server-response-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ export interface SerializedAbout {
description: string;
name: string;
version: string;
logo_url: string;
subtitle: string;
}

export interface SerializedRemoteFile {
Expand Down
2 changes: 1 addition & 1 deletion cvat-sdk/cvat_sdk/auto_annotation/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def skeleton_label_spec(
name: str, id: int, sublabels: Sequence[models.SublabelRequest], **kwargs
) -> models.PatchedLabelRequest:
"""Helper factory function for PatchedLabelRequest with type="skeleton"."""
return models.PatchedLabelRequest(name=name, id=id, type="skeleton", sublabels=sublabels)
return label_spec(name, id, type="skeleton", sublabels=sublabels, **kwargs)


# pylint: disable-next=redefined-builtin
Expand Down
2 changes: 1 addition & 1 deletion cvat-sdk/gen/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -e

GENERATOR_VERSION="v6.0.1"

VERSION="2.28.1"
VERSION="2.29.1"
LIB_NAME="cvat_sdk"
LAYER1_LIB_NAME="${LIB_NAME}/api_client"
DST_DIR="$(cd "$(dirname -- "$0")/.." && pwd)"
Expand Down
2 changes: 1 addition & 1 deletion cvat-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cvat-ui",
"version": "2.28.1",
"version": "2.29.1",
"description": "CVAT single-page application",
"main": "src/index.tsx",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions cvat-ui/src/actions/about-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SPDX-License-Identifier: MIT

import { ActionUnion, createAction, ThunkAction } from 'utils/redux';
import { getCore } from 'cvat-core-wrapper';
import { AboutData, getCore } from 'cvat-core-wrapper';

const core = getCore();

Expand All @@ -15,7 +15,7 @@ export enum AboutActionTypes {

const aboutActions = {
getAbout: () => createAction(AboutActionTypes.GET_ABOUT),
getAboutSuccess: (server: any) => createAction(AboutActionTypes.GET_ABOUT_SUCCESS, { server }),
getAboutSuccess: (server: AboutData) => createAction(AboutActionTypes.GET_ABOUT_SUCCESS, { server }),
getAboutFailed: (error: any) => createAction(AboutActionTypes.GET_ABOUT_FAILED, { error }),
};

Expand Down
Loading

0 comments on commit a896dfd

Please sign in to comment.