Skip to content

pixano_inference.settings

Settings for the Pixano Inference API.

Settings(**data)

Bases: BaseSettings

Application settings.

Attributes:

Name Type Description
app_name str

The name of the application.

app_version str

The version of the application.

app_description str

A description of the application.

num_cpus int

The number of CPUs accessible to the application.

num_gpus int

The number of GPUs available for inference.

num_nodes int

The number of nodes available for inference.

Source code in pixano_inference/settings.py
def __init__(self, **data: Any):
    """Initialize the settings."""
    if "num_cpus" not in data:
        data["num_cpus"] = os.cpu_count()
    if "num_gpus" not in data:
        data["num_gpus"] = detect_num_gpus()

    super().__init__(**data)