MultiAnimal Cross Validation KeyError

Hello!

I’m looking for some help! I keep getting an error when I attempt to cross-validate one of my projects. For context, I am working on Windows 10 and am using version 2.2b8. The same error is created regardless of whether I call the function from the GUI or from terminal and can be seen below:

I also tried copying the project into google drive. I evaluated the snapshot again in google colab (which is using version 2.1.10.1), but running cross-validation seems to create the same error:

/content/drive/My Drive/MatingAttmpt-Hardin-2020-11-16/evaluation-results/iteration-0/MatingAttmptNov16-trainset95shuffle1  already exists!
/content/drive/My Drive/MatingAttmpt-Hardin-2020-11-16/evaluation-results/iteration-0/MatingAttmptNov16-trainset95shuffle1/DLC_resnet_50_MatingAttmptNov16shuffle1_100000-snapshot-100000.h5
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-9-625fafc8dea9> in <module>()
----> 1 deeplabcut.evaluate_multianimal_crossvalidate(path_config_file, target='rpck_test')
      2 
      3 #deeplabcut.analyze_videos(path_config_file,videofile_path, videotype=VideoType)

3 frames
/usr/local/lib/python3.6/dist-packages/deeplabcut/pose_estimation_tensorflow/evaluate_multianimal.py in evaluate_multianimal_crossvalidate(config, Shuffles, trainingsetindex, pbounds, edgewisecondition, target, inferencecfg, init_points, n_iter, log_file, dcorr, leastbpts, printingintermediatevalues, modelprefix, plotting)
    726             leastbpts=leastbpts,
    727             modelprefix=modelprefix,
--> 728             printingintermediatevalues=printingintermediatevalues,
    729         )
    730 

/usr/local/lib/python3.6/dist-packages/deeplabcut/pose_estimation_tensorflow/lib/crossvalutils.py in bayesian_search(config_path, inferencecfg, pbounds, edgewisecondition, shuffle, trainingsetindex, modelprefix, snapshotindex, target, maximize, init_points, n_iter, acq, log_file, dcorr, leastbpts, printingintermediatevalues)
    383                     inferenceboundscfg[str(edge[0]) + "_" + str(edge[1])]["intra_max"]
    384                 )
--> 385                 for edge in partaffinityfield_graph
    386             ]
    387         )

/usr/local/lib/python3.6/dist-packages/deeplabcut/pose_estimation_tensorflow/lib/crossvalutils.py in <listcomp>(.0)
    383                     inferenceboundscfg[str(edge[0]) + "_" + str(edge[1])]["intra_max"]
    384                 )
--> 385                 for edge in partaffinityfield_graph
    386             ]
    387         )

/usr/local/lib/python3.6/dist-packages/ruamel/yaml/comments.py in __getitem__(self, key)
    751         # type: (Any) -> Any
    752         try:
--> 753             return ordereddict.__getitem__(self, key)
    754         except KeyError:
    755             for merged in getattr(self, merge_attrib, []):

KeyError: '10_11'

Any help would be appreciated! Thank you!

Hello @AbbyJMH, please update DLC to 2.1.9 or 2.1.10, the bug should be gone. I would also encourage to stick to the default of rpck_train as optimization target, we found it works best in practice :slight_smile: