Skip to content

Setting work_directory in abstract class JobExecutorConfig breaks SlurmExecutor with no attribute 'initial_queue_polling_delay' #511

@tesujimath

Description

@tesujimath

Running with this executor doesn't work:

    JobExecutor.get_instance(
        "slurm",
        config=JobExecutorConfig(
            launcher_log_file=Path(launcher_log_file),
            work_directory=Path(work_directory),
        ),
    )

failing with this error:

AttributeError: 'JobExecutorConfig' object has no attribute 'initial_queue_polling_delay'

I can fix it by using a BatchSchedulerExecutorConfig, but I'm pretty sure this isn't the intended use of the API, because of the obscure import path

from psij.executors.batch.batch_scheduler_executor import BatchSchedulerExecutorConfig

    JobExecutor.get_instance(
        "slurm",
        config=BatchSchedulerExecutorConfig(
            launcher_log_file=Path(launcher_log_file),
            work_directory=Path(work_directory),
        ),
    )

For now I am indeed using BatchSchedulerExecutorConfig, but I feel like I'm going off-piste here.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions