dattalab / keypoint-moseq

https://keypoint-moseq.readthedocs.io
Other
71 stars 28 forks source link

ValueError: not enough values to unpack (expected 3, got 2) #95

Closed ryanschwark closed 1 year ago

ryanschwark commented 1 year ago

Hi all,

When trailing the initial model during the "Fitting an AR-HMM" step, we've been running into an error where the model training is successful but it says this:

100%|███████████████████████████████████| 51/51 [06:15<00:00, 7.36s/it]

ValueError Traceback (most recent call last) Cell In[21], line 1 ----> 1 model, history, name = kpms.fit_model(model, data, labels, ar_only=True, 2 num_iters=50, project_dir=project_dir)

ValueError: not enough values to unpack (expected 3, got 2)

What might be causing this error? Also, when we move onto the next step "Fitting the Full Model", it doesn't work, and we get this error:

NameError Traceback (most recent call last) Cell In[22], line 2 1 # load model checkpoint generated during step 2 (AR-HMM fitting) ----> 2 checkpoint = kpms.load_checkpoint(project_dir=project_dir, name=name) 4 # the following will cause fitting to resume from iteration 50, rather than the most recent iteration 5 # checkpoint = kpms.revert(checkpoint, 50) 6 7 # update kappa to maintain the desired syllable time-scale 8 checkpoint = kpms.update_hypparams(checkpoint, kappa=9e4)

NameError: name 'name' is not defined

Thanks!

calebweinreb commented 1 year ago

The modeling API changed slightly in the latest version so you'll have to update a few lines of the modeling notebook. The tutorial is up to date: https://keypoint-moseq.readthedocs.io/en/latest/modeling.html#fitting-an-ar-hmm