Skip to content

Commit

Permalink
Resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
yasakova-anastasia committed Feb 9, 2023
2 parents 45fa19b + 912e47e commit e4f1249
Show file tree
Hide file tree
Showing 42 changed files with 793 additions and 410 deletions.
33 changes: 8 additions & 25 deletions .github/workflows/cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,25 @@ on:
- 'develop'

jobs:
get-sha:
uses: ./.github/workflows/search-cache.yml

Caching_CVAT:
needs: search_cache
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Getting SHA with cache from the default branch
id: get-sha
run: |
DEFAULT_BRANCH=$(gh api /repos/$REPO | jq -r '.default_branch')
for sha in $(gh api "/repos/$REPO/commits?per_page=100&sha=${DEFAULT_BRANCH}" | jq -r '.[].sha');
do
RUN_status=$(gh api /repos/${REPO}/actions/workflows/cache.yml/runs | \
jq -r ".workflow_runs[]? | select((.head_sha == \"${sha}\") and (.conclusion == \"success\")) | .status")
if [[ ${RUN_status} == "completed" ]]; then
SHA=$sha
break
fi
done
echo Default branch is ${DEFAULT_BRANCH}
echo Workflow will try to get cache from commit: ${SHA}
echo "default_branch=${DEFAULT_BRANCH}" >> $GITHUB_OUTPUT
echo "sha=${SHA}" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
id: server-cache-action
with:
path: /tmp/cvat_cache_server
key: ${{ runner.os }}-build-server-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build-server-${{ steps.get-sha.outputs.sha }}
${{ runner.os }}-build-server-${{ needs.get-sha.outputs.sha }}
${{ runner.os }}-build-server-
- uses: actions/cache@v3
Expand All @@ -49,7 +32,7 @@ jobs:
path: /tmp/cvat_cache_ui
key: ${{ runner.os }}-build-ui-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build-ui-${{ steps.get-sha.outputs.sha }}
${{ runner.os }}-build-ui-${{ needs.get-sha.outputs.sha }}
${{ runner.os }}-build-ui-
- uses: actions/cache@v3
Expand All @@ -58,7 +41,7 @@ jobs:
path: /tmp/cvat_cache_elasticsearch
key: ${{ runner.os }}-build-elasticsearch-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build-elasticsearch-${{ steps.get-sha.outputs.sha }}
${{ runner.os }}-build-elasticsearch-${{ needs.get-sha.outputs.sha }}
${{ runner.os }}-build-elasticsearch-
- uses: actions/cache@v3
Expand All @@ -67,7 +50,7 @@ jobs:
path: /tmp/cvat_cache_logstash
key: ${{ runner.os }}-build-logstash-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build-logstash-${{ steps.get-sha.outputs.sha }}
${{ runner.os }}-build-logstash-${{ needs.get-sha.outputs.sha }}
${{ runner.os }}-build-logstash-
- name: Set up Docker Buildx
Expand Down
26 changes: 1 addition & 25 deletions .github/workflows/full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,7 @@ env:

jobs:
search_cache:
runs-on: ubuntu-latest
outputs:
sha: ${{ steps.get-sha.outputs.sha}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
steps:
- name: Getting SHA with cache from the default branch
id: get-sha
run: |
DEFAULT_BRANCH=$(gh api /repos/$REPO | jq -r '.default_branch')
for sha in $(gh api "/repos/$REPO/commits?per_page=100&sha=$DEFAULT_BRANCH" | jq -r '.[].sha');
do
RUN_status=$(gh api /repos/${REPO}/actions/workflows/cache.yml/runs | \
jq -r ".workflow_runs[]? | select((.head_sha == \"${sha}\") and (.conclusion == \"success\")) | .status")
if [[ ${RUN_status} == "completed" ]]; then
SHA=$sha
break
fi
done
echo Default branch is ${DEFAULT_BRANCH}
echo Workflow will try to get cache from commit: ${SHA}
echo "default_branch=${DEFAULT_BRANCH}" >> $GITHUB_OUTPUT
echo "sha=${SHA}" >> $GITHUB_OUTPUT
uses: ./.github/workflows/search-cache.yml

build:
needs: search_cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ jobs:
# They are still tested without Helm
run: |
kubectl cp tests/mounted_file_share/images $(kubectl get pods -l component=server -o jsonpath='{.items[0].metadata.name}'):/home/django/share
pytest --platform=kube -m "not with_external_services" tests/python
pytest --timeout 30 --platform=kube -m "not with_external_services" tests/python
32 changes: 5 additions & 27 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,7 @@ jobs:
github.event.pull_request.draft == false &&
!startsWith(github.event.pull_request.title, '[WIP]') &&
!startsWith(github.event.pull_request.title, '[Dependent]')
runs-on: ubuntu-latest
outputs:
sha: ${{ steps.get-sha.outputs.sha}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
steps:
- name: Getting SHA with cache from the default branch
id: get-sha
run: |
DEFAULT_BRANCH=$(gh api /repos/$REPO | jq -r '.default_branch')
for sha in $(gh api "/repos/$REPO/commits?per_page=100&sha=$DEFAULT_BRANCH" | jq -r '.[].sha');
do
RUN_status=$(gh api /repos/${REPO}/actions/workflows/cache.yml/runs | \
jq -r ".workflow_runs[]? | select((.head_sha == \"${sha}\") and (.conclusion == \"success\")) | .status")
if [[ ${RUN_status} == "completed" ]]; then
SHA=$sha
break
fi
done
echo Default branch is ${DEFAULT_BRANCH}
echo Workflow will try to get cache from commit: ${SHA}
echo "default_branch=${DEFAULT_BRANCH}" >> $GITHUB_OUTPUT
echo "sha=${SHA}" >> $GITHUB_OUTPUT
uses: ./.github/workflows/search-cache.yml

build:
needs: search_cache
Expand All @@ -68,6 +42,10 @@ jobs:

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
# we specify version of buildkit due to issue that occurs in latest version
# https://github.com/moby/buildkit/issues/2631
driver-opts: image=moby/buildkit:v0.10.0

- name: Create artifact directories
run: |
Expand Down
30 changes: 1 addition & 29 deletions .github/workflows/schedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,35 +40,7 @@ jobs:
search_cache:
needs: check_updates
if:
needs.check_updates.outputs.last_commit_time > needs.check_updates.outputs.last_night_time
runs-on: ubuntu-latest
outputs:
sha: ${{ steps.get-sha.outputs.sha}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
steps:
- name: Getting SHA with cache from the default branch
id: get-sha
run: |
DEFAULT_BRANCH=$(gh api /repos/$REPO | jq -r '.default_branch')
for sha in $(gh api "/repos/$REPO/commits?per_page=100&sha=$DEFAULT_BRANCH" | jq -r '.[].sha');
do
RUN_status=$(gh api /repos/${REPO}/actions/workflows/cache.yml/runs | \
jq -r ".workflow_runs[]? | select((.head_sha == \"${sha}\") and (.conclusion == \"success\")) | .status")
if [[ ${RUN_status} == "completed" ]]; then
SHA=$sha
break
fi
done
echo Default branch is ${DEFAULT_BRANCH}
echo Workflow will try to get cache from commit: ${SHA}
echo "default_branch=${DEFAULT_BRANCH}" >> $GITHUB_OUTPUT
echo "sha=${SHA}" >> $GITHUB_OUTPUT
uses: ./.github/workflows/search-cache.yml

build:
needs: search_cache
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- \[SDK\] Class to represent a project as a PyTorch dataset
(<https://github.com/opencv/cvat/pull/5523>)
- Grid view and multiple context images supported (<https://github.com/opencv/cvat/pull/5542>)
- Interpolation is now supported for 3D cuboids.
Tracks can be exported/imported to/from Datumaro and Sly Pointcloud formats (<https://github.com/opencv/cvat/pull/5629>)
- Support for custom file to job splits in tasks (server API & SDK only)
(<https://github.com/opencv/cvat/pull/5536>)
- \[SDK\] A PyTorch adapter setting to disable cache updates
Expand Down
14 changes: 13 additions & 1 deletion cvat-canvas3d/src/typescript/canvas3d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (C) 2021-2022 Intel Corporation
// Copyright (C) 2022 CVAT.ai Corporation
// Copyright (C) 2022-2023 CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT

Expand All @@ -15,6 +15,8 @@ import {
ShapeProperties,
GroupData,
Configuration,
SplitData,
MergeData,
} from './canvas3dModel';
import {
Canvas3dView, Canvas3dViewImpl, ViewsDOM, CameraAction,
Expand All @@ -38,6 +40,8 @@ interface Canvas3d {
fitCanvas(): void;
fit(): void;
group(groupData: GroupData): void;
merge(mergeData: MergeData): void;
split(splitData: SplitData): void;
destroy(): void;
}

Expand Down Expand Up @@ -80,6 +84,14 @@ class Canvas3dImpl implements Canvas3d {
this.model.group(groupData);
}

public split(splitData: SplitData): void {
this.model.split(splitData);
}

public merge(mergeData: MergeData): void {
this.model.merge(mergeData);
}

public isAbleToChangeFrame(): boolean {
return this.model.isAbleToChangeFrame();
}
Expand Down
15 changes: 13 additions & 2 deletions cvat-canvas3d/src/typescript/canvas3dController.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// Copyright (C) 2021-2022 Intel Corporation
// Copyright (C) 2022 CVAT.ai Corporation
// Copyright (C) 2022-2023 CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT

import { ObjectState } from '.';
import {
Canvas3dModel, Mode, DrawData, ActiveElement, GroupData, Configuration,
Canvas3dModel, Mode, DrawData, ActiveElement,
GroupData, Configuration, MergeData, SplitData,
} from './canvas3dModel';

export interface Canvas3dController {
Expand All @@ -17,6 +18,8 @@ export interface Canvas3dController {
readonly objects: ObjectState[];
mode: Mode;
group(groupData: GroupData): void;
merge(mergeData: MergeData): void;
split(splitData: SplitData): void;
}

export class Canvas3dControllerImpl implements Canvas3dController {
Expand Down Expand Up @@ -61,4 +64,12 @@ export class Canvas3dControllerImpl implements Canvas3dController {
public group(groupData: GroupData): void {
this.model.group(groupData);
}

public merge(mergeData: MergeData): void {
this.model.merge(mergeData);
}

public split(splitData: SplitData): void {
this.model.split(splitData);
}
}
Loading

0 comments on commit e4f1249

Please sign in to comment.