You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason of this is that you had a task used in a competition, now you have removed it from the competiiton but one or more submissions have already used this task.
With the new change, the logger returns this when it fails:
django_1|UNUSEDTASKSDELETION--- ("Cannot delete some instances of model 'Task' because they are referenced through a protected foreign key: 'Submission.task'", <QuerySet [<Submission: Cross-DomainMetaDLsubmissionPK=4037bypavaotest>, <Submission: Mini-AutoMLsubmissionPK=8351bypavao>, <Submission: [L2RPN2023] ParisRegionAIChallengeEnergyTransitionsubmissionPK=9219bypavao>, <Submission: [L2RPN2023] ParisRegionAIChallengeEnergyTransitionsubmissionPK=8923bypavao>, <Submission: [L2RPN2023] ParisRegionAIChallengeEnergyTransitionsubmissionPK=8925bybdonnot>, <Submission: [L2RPN2023] ParisRegionAIChallengeEnergyTransitionsubmissionPK=8926bybdonnot>, <Submission: [L2RPN2023] ParisRegionAIChallengeEnergyTransitionsubmissionPK=8927bybdonnot>, <Submission: [L2RPN2023] ParisRegionAIChallengeEnergyTransitionsubmissionPK=8928bybdonnot>, <Submission: [L2RPN2023] ParisRegionAIChallengeEnergyTransitionsubmissionPK=9070bypavao>, <Submission: [L2RPN2023] ParisRegionAIChallengeEnergyTransitionsubmissionPK=9071bypavao>, <Submission: [L2RPN2023] ParisRegionAIChallengeEnergyTransitionsubmissionPK=9116bypavao>, <Submission: [L2RPN2023] ParisRegionAIChallengeEnergyTransitionsubmissionPK=9227bypavao>, <Submission: [L2RPN2023] ParisRegionAIChallengeEnergyTransitionsubmissionPK=9195bybdonnot>, <Submission: [L2RPN2023] ParisRegionAIChallengeEnergyTransitionsubmissionPK=9228bybdonnot>, <Submission: [L2RPN2023] ParisRegionAIChallengeEnergyTransitionsubmissionPK=9036bypavao>, <Submission: [L2RPN2023] ParisRegionAIChallengeEnergyTransitionsubmissionPK=9238bypavao>, <Submission: [L2RPN2023] ParisRegionAIChallengeEnergyTransitionsubmissionPK=9240bybdonnot>, <Submission: [L2RPN2023] ParisRegionAIChallengeEnergyTransitionsubmissionPK=9054bybdonnot>, <Submission: [L2RPN2023] ParisRegionAIChallengeEnergyTransitionsubmissionPK=9220bypavao>, <Submission: [L2RPN2023] ParisRegionAIChallengeEnergyTransitionsubmissionPK=9254bybdonnot>, '...(remaining elements truncated)...']>)
The reason of this is that you had a task used in a competition, now you have removed it from the competiiton but one or more submissions have already used this task.
I merged the Solution 1. It is the responsability of organizers to not delete unused tasks if they plan to re-use a task that have previous submissions.
Activity
ihsaan-ullah commentedon Jun 23, 2023
are you getting this when you click this new button
Delete unused tasks?ihsaan-ullah commentedon Jun 23, 2023
I am going to add logs so that we can see the real error in django
Didayolo commentedon Jun 23, 2023
Yes
ihsaan-ullah commentedon Jun 23, 2023
This is happening because of this line of code
codabench/src/apps/competitions/models.py
Line 443 in 1524632
The reason of this is that you had a task used in a competition, now you have removed it from the competiiton but one or more submissions have already used this task.
ihsaan-ullah commentedon Jun 23, 2023
Solutions for this:
model.PROTECTtoSETNULLihsaan-ullah commentedon Jun 23, 2023
@Didayolo can you also check if you still have
138tasks after the error or some are deleted?Didayolo commentedon Jun 26, 2023
Thanks for the input.
The 138 tasks are remaining
Didayolo commentedon Jun 28, 2023
I'm not sure if I understand this point
Didayolo commentedon Jun 29, 2023
With the new change, the logger returns this when it fails:
Given the logs, I think that you are right.
This is done by this PR: #994
Then would it be possible to remove a task used in a submission? Solution 1 seems more satisfying but I am not sure of the implications
Didayolo commentedon Jun 29, 2023
I merged the Solution 1. It is the responsability of organizers to not delete unused tasks if they plan to re-use a task that have previous submissions.