LocalRunner#

class lumopt2.utils.runner.LocalRunner(resource: str = 'GPU', max_retries: int = 2)#

Class to manage simulation jobs locally.

Parameters:
resourcestr, optional

Resource type for computation: “CPU” or “GPU” (default: “GPU”).

max_retriesint, optional

Maximum number of retry attempts for failed simulations that remain in layout mode after running. This can help recover from transient issues like license checkout failures (default: 2).

Methods

LocalRunner.add_job(task[, inputs, label, ...])

Add a job to the runner.

LocalRunner.check_circular_dependencies()

Check for circular dependencies in the job graph.

LocalRunner.clear()

Remove the generated .fsp and .log files, the folder, and clears the jobs

LocalRunner.clear_jobs()

Clear all jobs

LocalRunner.get_job(label)

Get a job by its label.

LocalRunner.get_job_dependencies_ids(job)

Get the job IDs of a job's dependencies.

LocalRunner.get_job_result(label)

Get the result of a job by its label.

LocalRunner.get_task_type(task)

Get the type of task.

LocalRunner.print_job_statuses()

Log the status of all jobs.

LocalRunner.pyfct_to_script(fct, inputs, label)

Convert a Python function to a standalone script file.

LocalRunner.run(job)

Run a single job.

LocalRunner.run_dependencies(job)

Run all dependencies of a job.

LocalRunner.run_jobs(jobs)

Run multiple jobs in parallel.

LocalRunner.run_queue()

Run all pending jobs in the queue.

LocalRunner.set_done(label)

Set a job as done by its label.

LocalRunner.set_fdtd_session(fdtd_session)

Set the FDTD session.

LocalRunner.set_job_result(label, result)

Set the result of a job by its label.

LocalRunner.set_jobid(label, jobid)

Set the job ID for a job by its label.