Skip to content

Commit

Permalink
Added code to save the eyetracker model
Browse files Browse the repository at this point in the history
  • Loading branch information
lawhead committed Oct 21, 2023
1 parent 7b5963f commit 5c3b38a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions bcipy/signal/model/offline_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def offline_analysis(
figure_handles = visualize_gaze(
raw_data,
save_path=data_folder if save_figures else None,
show=True,
show=show_figures,
raw_plot=True,
)

Expand Down Expand Up @@ -328,10 +328,17 @@ def offline_analysis(
left_eye, right_eye,
means, covs,
save_path=None,
show=True,
show=show_figures,
raw_plot=True,
)

model.metadata = SignalModelMetadata(device_spec=device_spec,
transform=None)
log.info("Training complete for Eyetracker model. Saving data...")
save_model(
model,
Path(data_folder, f"model_{device_spec.content_type}.pkl"))

if alert_finished:
play_sound(f"{STATIC_AUDIO_PATH}/{parameters['alert_sound_file']}")
return model, figure_handles
Expand Down

0 comments on commit 5c3b38a

Please sign in to comment.