dattalab / keypoint-moseq

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

NameError: name 'name' is not defined #96

Closed ryanschwark closed 1 year ago

ryanschwark commented 1 year ago

**Hi all,

After successfully training a full model using the Jupyter notebook, the next cells should allow me to extract model results and save results in CSV format. However, when I run these cells I get this NameError:**

load saved model checkpoint checkpoint = kpms.load_checkpoint(project_dir=project_dir, name=name) extract results results = kpms.extract_results(project_dir=project_dir, config(), checkpoint)

NameError Traceback (most recent call last) Cell In[40], line 2 1 # load saved model checkpoint ----> 2 checkpoint = kpms.load_checkpoint(project_dir=project_dir, name=name) 4 # extract results 5 results = kpms.extract_results(project_dir=project_dir, config(), checkpoint)

NameError: name 'name' is not defined

What might be causing this error? Relaunching the Jupyter notebook doesn't solve the issue, and I get the same error for trying to save results in csv format:

optionally save results as csv kpms.save_results_as_csv(project_dir=project_dir, name=name, **config())


NameError Traceback (most recent call last) Cell In[41], line 2 1 # optionally save results as csv ----> 2 kpms.save_results_as_csv(project_dir=project_dir, name=name, **config())

NameError: name 'name' is not defined

Thanks!

calebweinreb commented 1 year ago

Both of these errors can be addressed by using the more up-to-date function calls from the tutorial https://keypoint-moseq.readthedocs.io/en/latest/modeling.html#extract-model-results

ryanschwark commented 1 year ago

Thank you! Using the newer code solved the issue.