Skip to content

Commit

Permalink
Merge branch 'v2.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
juhuntenburg committed Oct 13, 2021
2 parents c3025dc + 5e89eec commit aef2cc6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 29 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile.v2.0
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ COPY me_test_data me_test_data
COPY dlc_test_data_v2.0 dlc_test_data_v2.0

# clone the code
RUN git clone --depth 1 --single-branch --branch one2 https://github.com/int-brain-lab/iblvideo.git
RUN git clone --depth 1 --single-branch --branch v2.0.0 https://github.com/int-brain-lab/iblvideo.git
ENV PYTHONPATH=/iblvideo
11 changes: 11 additions & 0 deletions docker/Dockerfile.v2.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#docker build -t internationalbrainlab/dlc:v2.1 -f Dockerfile.v2.1 --no-cache .
FROM internationalbrainlab/dlc:base

# copy the weights and test data
COPY weights_v2.1 weights_v2.1
COPY me_test_data me_test_data
COPY dlc_test_data_v2.1 dlc_test_data_v2.1

# clone the code
RUN git clone --depth 1 --single-branch --branch v2.1.0 https://github.com/int-brain-lab/iblvideo.git
ENV PYTHONPATH=/iblvideo
6 changes: 3 additions & 3 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ services:
- ~/Documents/PYTHON/iblvideo:/iblvideo
- ~:/root
queue:
image: internationalbrainlab/dlc:v2.0
command: python3 -c "from iblvideo import run_queue; run_queue(target_versions=('1.2.0', '2.0.0'))"
image: internationalbrainlab/dlc:v2.1
command: python3 -c "from iblvideo import run_queue; run_queue(target_versions=('1.2.0', '2.0.0', '2.1.0'))"
runtime: nvidia
volumes:
- ~:/root
- /mnt/s0/Data/FlatIron:/mnt/s0/Data/FlatIron
test:
image: internationalbrainlab/dlc:v2.0
image: internationalbrainlab/dlc:v2.1
command: bash -c "nvcc --version; pytest -s /iblvideo/iblvideo/tests"
runtime: nvidia
volumes:
Expand Down
2 changes: 1 addition & 1 deletion iblvideo/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

__version__ = '2.0.0' # This is the only place where the version is hard coded, only adapt here
__version__ = '2.1.0' # This is the only place where the version is hard coded, only adapt here

import deeplabcut

Expand Down
24 changes: 0 additions & 24 deletions iblvideo/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,30 +245,6 @@ def run_session(session_id, machine=None, cams=('left', 'body', 'right'), one=No
if remove_videos is True:
shutil.rmtree(session_path.joinpath('raw_video_data'), ignore_errors=True)

# Run DLC QC
# Download camera times and then force qc to use local data as dlc might not have
# been updated on FlatIron at this stage
try:
datasets = one.type2datasets(session_id, 'camera.times')
one.load_datasets(session_id, datasets=datasets, download_only=True)
alf_path = one.eid2path(session_id).joinpath('alf')
for cam in cams:
# Only run if dlc actually exists
if alf_path.joinpath(f'_ibl_{cam}Camera.dlc.pqt').exists():
qc = DlcQC(session_id, cam, one=one, download_data=False)
with warnings.catch_warnings():
warnings.simplefilter("ignore", category=RuntimeWarning)
qc.run(update=True)
except AssertionError:
# If the camera.times don't exist we cannot run QC, but the DLC task shouldn't fail
# Make sure to not overwrite the task log if that has already been updated
tdict = one.alyx.rest('tasks', 'list',
django=f"name__icontains,DLC,session__id,{session_id}",
no_cache=True)[0]
patch_data = {'log': tdict['log'] + '\n\n' + traceback.format_exc()}
one.alyx.rest('tasks', 'partial_update', id=tdict['id'], data=patch_data,
no_cache=True)

except BaseException:
# Make sure to not overwrite the task log if that has already been updated
tdict = one.alyx.rest('tasks', 'list',
Expand Down

0 comments on commit aef2cc6

Please sign in to comment.