前提・実現したいこと
DeepLabCutというツールをGoogle colab上のGPUで動かそうと考えています。
以下のサイトを参考にGoogle colab上で順に実行していったのですが、deeplabcut.create_training_dataset(path_config_file)
を実行したところでエラーメッセージが発生してしまいました。
参考サイト:https://qiita.com/riichirohira/items/b92723278ba92fb42db9
発生している問題・エラーメッセージ
KeyError Traceback (most recent call last) /usr/local/lib/python3.7/dist-packages/pandas/core/indexes/base.py in get_loc(self, key, method, tolerance) 2897 try: -> 2898 return self._engine.get_loc(casted_key) 2899 except KeyError as err: pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc() pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc() pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item() pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item() KeyError: 'TS' The above exception was the direct cause of the following exception: KeyError Traceback (most recent call last) <ipython-input-7-b29a52be26d9> in <module>() ----> 1 deeplabcut.create_training_dataset(path_config_file) /usr/local/lib/python3.7/dist-packages/deeplabcut/generate_training_dataset/trainingsetmanipulation.py in create_training_dataset(config, num_shuffles, Shuffles, windows2linux, userfeedback, trainIndices, testIndices, net_type, augmenter_type) 765 if Data is None: 766 return --> 767 Data = Data[scorer] # extract labeled data 768 769 # loading & linking pretrained models /usr/local/lib/python3.7/dist-packages/pandas/core/frame.py in __getitem__(self, key) 2903 if is_single_key: 2904 if self.columns.nlevels > 1: -> 2905 return self._getitem_multilevel(key) 2906 indexer = self.columns.get_loc(key) 2907 if is_integer(indexer): /usr/local/lib/python3.7/dist-packages/pandas/core/frame.py in _getitem_multilevel(self, key) 2953 def _getitem_multilevel(self, key): 2954 # self.columns is a MultiIndex -> 2955 loc = self.columns.get_loc(key) 2956 if isinstance(loc, (slice, np.ndarray)): 2957 new_columns = self.columns[loc] /usr/local/lib/python3.7/dist-packages/pandas/core/indexes/multi.py in get_loc(self, key, method) 2702 2703 if not isinstance(key, tuple): -> 2704 loc = self._get_level_indexer(key, level=0) 2705 return _maybe_to_slice(loc) 2706 /usr/local/lib/python3.7/dist-packages/pandas/core/indexes/multi.py in _get_level_indexer(self, key, level, indexer) 2967 else: 2968 -> 2969 code = self._get_loc_single_level_index(level_index, key) 2970 2971 if level > 0 or self.lexsort_depth == 0: /usr/local/lib/python3.7/dist-packages/pandas/core/indexes/multi.py in _get_loc_single_level_index(self, level_index, key) 2635 return -1 2636 else: -> 2637 return level_index.get_loc(key) 2638 2639 def get_loc(self, key, method=None): /usr/local/lib/python3.7/dist-packages/pandas/core/indexes/base.py in get_loc(self, key, method, tolerance) 2898 return self._engine.get_loc(casted_key) 2899 except KeyError as err: -> 2900 raise KeyError(key) from err 2901 2902 if tolerance is not None: KeyError: 'TS'
該当のソースコード
deeplabcut.create_training_dataset(path_config_file)
試したこと
configファイルの中を書き換えたり、ファイル名に含まれる「TS」を書き変え、一から実行しなおしてみました。
補足情報(FW/ツールのバージョンなど)
ここにより詳細な情報を記載してください。
あなたの回答
tips
プレビュー