Skip to content

sse

A module to run sse job on OQTOPUS Cloud.

Classes:

OqtopusSseBackend

OqtopusSseBackend(config: OqtopusConfig | None = None)

A job for a SSE.

Parameters:

  • config

    (OqtopusConfig | None, default: None ) –

    A :class:OqtopusConfig for 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_log(
    job_id: str | None = None, save_dir: str | None = None
) -> str

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_dir does not exist.

  • ValueError

    If save_dir is 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_path is not set.

  • ValueError

    If file_path does not exist.

  • ValueError

    If file_path is not a python file.

  • ValueError

    If file size is larger than max file size

  • BackendError

    If an error is returned from OQTOPUS Cloud.

Returns: