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
Save last iterate output #609
Comments
Just talked to @sylvchev who has the same need for trained BCI models. |
Thinking out load, Inspired by the newly added For instance, the following will be the user-defined method to save the output, class Solver(BaseSolver):
...
def post_run(self, result):
x = result["x"]
path = "PATH_WHERE_TO_SAVE_OUTPUT"
with open(path, 'wb') as f:
np.save(f, x)
... Any thoughts, @tomMoral @matthieutrs? |
Yes, I think it would be nice to have an easily customizable function, just like hooks in torch lightning. In my case, I'd be interested only in saving after the last run, but post_run would be fine too. |
I would go for something like: |
Hello and thanks for the support! Computing and saving the metrics returned by an algorithm is great, but it may also be interesting to save the outputs of the algorithm (the path to saved output could be returned in the saved dataframe).
Example of use case: running several imaging algorithms with benchopt and saving the images returned by each algorithm.
The text was updated successfully, but these errors were encountered: