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

Add periodic_callable #209

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Add periodic_callable #209

wants to merge 11 commits into from

Conversation

basnijholt
Copy link
Owner

@basnijholt basnijholt commented Mar 11, 2024

@jbweston, what about this? Closes #206.

I haven't really tested it but I suppose you can first see it this matches your use-case.

edit: I tested it and now it works

Copy link

codecov bot commented Mar 11, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 74.40%. Comparing base (a8a8c48) to head (d8742e0).
Report is 1 commits behind head on main.

Files Patch % Lines
adaptive_scheduler/_server_support/launcher.py 22.22% 7 Missing ⚠️
adaptive_scheduler/_server_support/run_manager.py 83.33% 1 Missing ⚠️
adaptive_scheduler/client_support.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #209      +/-   ##
==========================================
- Coverage   74.54%   74.40%   -0.15%     
==========================================
  Files          22       22              
  Lines        2742     2754      +12     
==========================================
+ Hits         2044     2049       +5     
- Misses        698      705       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jbweston
Copy link
Collaborator

Great! The only change I would add would be to pass the learner's "fname" along with the learner itself (like 'to_dataframe' takes)

The first argument is the 'fname' of the learner, and the
second argument is the learner itself. The fname is needed
to use as a base, if the periodic callable will save some
additional data.
Copy link
Owner Author

@basnijholt basnijholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @jbweston! Go ahead and merge if you are happy with the implementation and it works for your use-case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Periodically call arbitrary callback
2 participants