Skip to content
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

Support for reprocessing trials with missing videos #171

Merged
merged 13 commits into from
Jul 1, 2024
Merged

Conversation

antoinefalisse
Copy link
Collaborator

@antoinefalisse antoinefalisse commented Jun 28, 2024

This PR adds support for reprocessing trials that do not have all videos uploaded. There are two ways this can happen: 1) the camera disconnected before hitting start recording. In that case, you have only 2 videos in db. 2) the camera disconnected while the trial was being recorded or during upload. In that case, you cancel upload (or it times out) and you have an entry in the db with video: null. In both cases, the trials are error-ed, but using different mechanisms.

In this PR, I adjusted a flag passed to main camerastouse that is ['all'] by default, but that can now be set to ['all_available']. When that's the case, then a trial can be processed, even if not all videos are available. To be able to reprocess trials on server using that flag, I added the possibility to add that variable to the metadata. Also, I removed a check in app.py that was checking if all video entries actually had a video file. This is now implemented in main. This allows a trial with missing videos to "pass app.py". Note that a trial that has missing videos is not dequeued directly, but after 15 minutes, which is fine.

All is all, it should not change anything to current user experience: A trial with missing videos will be error-ed out. However, if you add the variable to the metadata and kick back the trials to the server, then they will be processed. I tested and it is working all fine. You also see in the main_settings yaml which cameras were used.

Copy link
Member

@suhlrich suhlrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. thanks!

main.py Show resolved Hide resolved
@antoinefalisse antoinefalisse merged commit 637af74 into main Jul 1, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants