-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Task moving between projects #3164
Conversation
…penvinotoolkit/cvat into dk/tasks-move-between-projects
…penvinotoolkit/cvat into dk/tasks-move-between-projects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Client part LGTM
@ActiveChooN , could you please resolve issues with Remark and ESLinter? Why did we get them? If it is necessary, please consult with @dvkruchinin . |
@dvkruchinin , tests were failed after develop merge. Could you please take a look? |
…oolkit/cvat into dk/tasks-move-between-projects
…penvinotoolkit/cvat into dk/tasks-move-between-projects
@ActiveChooN , could you remind me why clear attributes are always on? |
In the corresponding workflow run, there were problems with the cvat-ui container build. It is worth waiting for the completion of the current launch. |
if instance.project_id is None: | ||
for old_label in instance.label_set.all(): | ||
try: | ||
new_label = project.label_set.filter(name=old_label.name).first() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For every label it is a separate DB call. Probably it isn't a problem for now. Let's keep it as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, there are already 4 DB calls for every label at least. I will try to improve it.
It's a boilerplate for future feature development. Now only a simple moving algorithm is available witch will wipe label attributes while moving. But in the next PRs, it can include attributes mapping too. And it's a reminder for users that their labels will be deleted. |
new_label = project.label_set.filter(name=old_label.name).first() | ||
except ValueError: | ||
raise serializers.ValidationError(f'Target project does not have label with name "{old_label.name}"') | ||
old_label.attributespec_set.all().delete() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In some specific cases we want to transfer attributes as well. For example, when we have identical definition for labels and attributes. Are you going to support that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but it's quite an independent feature so in future implementations
Fixed for ESLint but have no idea, why remark getting issues with |
@ActiveChooN |
@TOsmanov, @aschernov, could you add documentation to cover this feature to the "Creating an annotation task" page, please? |
@ActiveChooN , yes, we'll take it in work. |
@aschernov, hi, have you any updates or time estimation for this feature? |
@ActiveChooN , Hi, it was implemented here #3232 , or what do you mean? |
Motivation and context
Added task moving between projects.
Resolve #2972.
The moving process supports moving a task from outside into a project with mapping task and project and from project to project. Attributes are clearing now during the moving process. In case of label mismatch, you can create or delete necessary labels in the project/task. Many labels can be mapped to one in the target project.
How has this been tested?
Manually.
Checklist
develop
branchcvat-core, cvat-data and cvat-ui)
License
Feel free to contact the maintainers if that's a concern.