sherpa-ai/sherpa

Filename / path with space in LocalScheduler not working

dosomder opened this issue · 2 comments

The scheduler splits the command with spaces: https://github.com/LarsHH/sherpa/blob/master/sherpa/schedulers.py#L110

This means any file name / file path with space will not work. This should either be changed or mentioned in the docs.

Hi @dosomder !

Apologies for the slow reply and thanks for pointing this out.

It looks like this can be changed relatively easily. _Runner creates the command by joining python and filename. Then for LocalScheduler it gets split up again later. So there is some redundancy.

It seems to make sense to just pass a list with command components (i.e. ['python', filename]) to the scheduler. Then let the scheduler join it together or not, depending on what format is needed.

This slightly changes the interface of the Scheduler.submit_job() method, but since it is not really user facing I think that's okay.

Let me know if you have any more comments.

Best,
Lars

Resolved: 99de04f