sse
¶
A module to run sse job on OQTOPUS Cloud.
Classes:
-
OqtopusSseBackend–A job for a SSE.
OqtopusSseBackend
¶
OqtopusSseBackend(config: OqtopusConfig | None = None)
A job for a SSE.
Parameters:
-
(config¶OqtopusConfig | None, default:None) –A :class:
OqtopusConfigfor job execution.
Methods:
-
download_log–Download logs generated by an SSE job on a OQTOPUS Cloud.
-
run_sse–Perform a SSE job.
download_log
¶
Download logs generated by an SSE job on a OQTOPUS Cloud.
Parameters:
-
(job_id¶str | None, default:None) –job id. Defaults to None.
-
(save_dir¶str | None, default:None) –Local directory path for downloads. Defaults to None.
Raises:
-
BackendError–If an error is returned from OQTOPUS Cloud.
-
ValueError–If
save_dirdoes not exist. -
ValueError–If
save_diris not a directory. -
ValueError–If the file already exists.
Returns:
-
str(str) –The file path of the saved SSE log.
run_sse
¶
run_sse(
file_path: str,
device_id: str,
name: str,
description: str | None = None,
) -> OqtopusSamplingJob
Perform a SSE job.
Parameters:
-
(file_path¶str) –The path to program file to upload.
-
(device_id¶str) –The identifier of the device where the job is executed.
-
(name¶str) –The name of the job.
-
(description¶str | None, default:None) –The description of the job. Defaults to None.
Raises:
-
ValueError–If
file_pathis not set. -
ValueError–If
file_pathdoes not exist. -
ValueError–If
file_pathis not a python file. -
ValueError–If file size is larger than max file size
-
BackendError–If an error is returned from OQTOPUS Cloud.
Returns:
-
OqtopusSamplingJob(OqtopusSamplingJob) –The job to be executed.