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
Is your feature request related to a problem? Please describe.
When running Compute Scalar DF, code crashes when some of the files have large amount of dropped frames. This is apparently due to mismatch between number of frames in pca_score and the number of frames in the model. It would be great to perform dataset integrity test early in the pipeline to avoid this problem.
~/opt/anaconda3/envs/moseq2-app/lib/python3.7/site-packages/moseq2_viz/scalars/util.py in scalars_to_dataframe(index, include_keys, disable_output, force_conversion, model_path)
432 model_uuids = None
433 if model_path is not None and exists(model_path):
--> 434 labels_df = prepare_model_dataframe(model_path, index['pca_path']).set_index('uuid')
435 has_model = True
436 # loading the session uuids that the model was trained on
~/opt/anaconda3/envs/moseq2-app/lib/python3.7/site-packages/moseq2_viz/model/util.py in prepare_model_dataframe(model_path, pca_path)
895 # make sure all pcs align with labels
896 if not all(k in scores_idx and len(scores_idx[k]) == len(v) for k, v in labels.items()):
--> 897 raise ValueError('PC scores don't align with labels or label UUID not found in PC scores')
898
899 _df = pd.concat((pd.DataFrame({
ValueError: PC scores don't align with labels or label UUID not found in PC scores
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
When running Compute Scalar DF, code crashes when some of the files have large amount of dropped frames. This is apparently due to mismatch between number of frames in pca_score and the number of frames in the model. It would be great to perform dataset integrity test early in the pipeline to avoid this problem.
Error message during Compute Scalar DF:
ValueError Traceback (most recent call last)
in
4 _, sorted_index = parse_index(progress_paths['index_file'])
5 # compute session scalar data
----> 6 scalar_df = scalars_to_dataframe(sorted_index, model_path=progress_paths['model_path'])
7
8 print('The shape of scalar_df', scalar_df.shape)
~/opt/anaconda3/envs/moseq2-app/lib/python3.7/site-packages/moseq2_viz/scalars/util.py in scalars_to_dataframe(index, include_keys, disable_output, force_conversion, model_path)
432 model_uuids = None
433 if model_path is not None and exists(model_path):
--> 434 labels_df = prepare_model_dataframe(model_path, index['pca_path']).set_index('uuid')
435 has_model = True
436 # loading the session uuids that the model was trained on
~/opt/anaconda3/envs/moseq2-app/lib/python3.7/site-packages/moseq2_viz/model/util.py in prepare_model_dataframe(model_path, pca_path)
895 # make sure all pcs align with labels
896 if not all(k in scores_idx and len(scores_idx[k]) == len(v) for k, v in labels.items()):
--> 897 raise ValueError('PC scores don't align with labels or label UUID not found in PC scores')
898
899 _df = pd.concat((pd.DataFrame({
ValueError: PC scores don't align with labels or label UUID not found in PC scores
The text was updated successfully, but these errors were encountered: