-
Notifications
You must be signed in to change notification settings - Fork 110
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
Implement MockDriver #6788
Implement MockDriver #6788
Conversation
ed21dd5
to
159b0c7
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #6788 +/- ##
=======================================
Coverage 83.88% 83.88%
=======================================
Files 365 365
Lines 21383 21398 +15
Branches 948 948
=======================================
+ Hits 17937 17950 +13
- Misses 3152 3154 +2
Partials 294 294 ☔ View full report in Codecov by Sentry. |
driver = MockDriver(init=init) | ||
|
||
sch = scheduler.Scheduler(driver) | ||
sch.add_realization(realization, callback_timeout=lambda _: None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can remove callback_timeout
from this function call.
bf5137f
to
d710981
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌🏻
e2834d8
to
0470e9c
Compare
b6fe7c6
to
10243a3
Compare
LocalDriver differs from the HPC drivers in that it is made of three parts that are run in sequence. `init` the subprocess, `wait` for the process to complete and `kill` when the user wants to cancel. Between the three parts the driver needs to send `JobEvent`s to the `Scheduler`. This commit implements a `MockDriver`, where the user can optionally specify a simplified version of each of `init`, `wait` or `kill`, depending on what they wish to do.
LocalDriver differs from the HPC drivers in that it is made of three
parts that are run in sequence.
init
the subprocess,wait
for theprocess to complete and
kill
when the user wants to cancel. Betweenthe three parts the driver needs to send
JobEvent
s to theScheduler
.This commit implements a
MockDriver
, where the user can optionallyspecify a simplified version of each of
init
,wait
orkill
,depending on what they wish to do.