Commit c5004113 authored by Klaus Zimmermann's avatar Klaus Zimmermann
Browse files

Add single-threaded dask setup (closes #125)

parent a71a0ebb
......@@ -31,9 +31,19 @@ class LocalThreadsScheduler:
pass
class SingleThreadedScheduler:
def __enter__(self):
dask.config.set(scheduler='single-threaded')
return self
def __exit__(self, type, value, traceback):
pass
SCHEDULERS = OrderedDict([
('distributed-local-cluster', DistributedLocalClusterScheduler),
('threaded', LocalThreadsScheduler),
('single-threaded', SingleThreadedScheduler),
])
......
......@@ -171,7 +171,7 @@ def main():
args = parse_args()
if not args.deactivate_error_tracking:
init_sentry()
with setup_scheduler(args) as scheduler:
with setup_scheduler(args):
logging.info('Scheduler ready; starting main program.')
start = time.time()
try:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment