Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Warm start from a loaded model not using the previous best equations #820

Open
romanovzky opened this issue Feb 5, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@romanovzky
Copy link

What happened?

Hi, I was fitting a model that hanged. So I decided to load it to continue the run

model = PySRRegressor.from_file(run_directory=PATH)
model.warm_start = True
model.fit(X_train, y_train, variable_names=feature_columns)

however, I noticed that it was not continuing from where it left of, but started a new run and rewrote the CSV file with new (and worse) equations. I then tinkered a bit to try to understand, and did this

model = PySRRegressor.from_file(run_directory=PATH)
model.warm_start = True
old_run_id = model.run_id
model.run_id = model.run_id+"-2"
model.run_id_ = model.run_id_+"-2"
model.fit(X_train, y_train, variable_names=feature_columns)

and it starts a new run, ignoring the previous hall of fame, but at least it doesn't re-write the previous run.

Am I missing something?

Version

1.3.1

Operating System

Linux

Package Manager

Other (specify below)

Interface

Jupyter Notebook

Relevant log output

Extra Info

package manager: uv

@romanovzky romanovzky added the bug Something isn't working label Feb 5, 2025
@MilesCranmer
Copy link
Owner

Might be related to #816?

If you can make a MWE it would be much appreciated. I'm not able to reproduce this at the moment, though it certainly seems like there's some sort of bug here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants