Skip to content

Types

CommonKwargs

Source code in python/opsml/types/_types.pyi
class CommonKwargs:
    IsPipeline: "CommonKwargs"
    ModelType: "CommonKwargs"
    ModelClass: "CommonKwargs"
    ModelArch: "CommonKwargs"
    PreprocessorName: "CommonKwargs"
    Preprocessor: "CommonKwargs"
    TaskType: "CommonKwargs"
    Model: "CommonKwargs"
    Undefined: "CommonKwargs"
    Backend: "CommonKwargs"
    Pytorch: "CommonKwargs"
    Tensorflow: "CommonKwargs"
    SampleData: "CommonKwargs"
    Onnx: "CommonKwargs"
    LoadType: "CommonKwargs"
    DataType: "CommonKwargs"
    Tokenizer: "CommonKwargs"
    TokenizerName: "CommonKwargs"
    FeatureExtractor: "CommonKwargs"
    FeatureExtractorName: "CommonKwargs"
    Image: "CommonKwargs"
    Text: "CommonKwargs"
    VowpalArgs: "CommonKwargs"
    BaseVersion: "CommonKwargs"
    SampleDataInterfaceType: "CommonKwargs"

    @staticmethod
    def from_string(s: str) -> Optional["CommonKwargs"]:
        """Return the CommonKwargs enum from a string.

        Args:
            s:
                The string representation of the CommonKwargs.

        Returns:
            The CommonKwargs enum.
        """

    def as_string(self) -> str:
        """Return the string representation of the CommonKwargs.

        Returns:
            String representation of the CommonKwargs.
        """

as_string()

Return the string representation of the CommonKwargs.

Returns:

Type Description
str

String representation of the CommonKwargs.

Source code in python/opsml/types/_types.pyi
def as_string(self) -> str:
    """Return the string representation of the CommonKwargs.

    Returns:
        String representation of the CommonKwargs.
    """

from_string(s) staticmethod

Return the CommonKwargs enum from a string.

Parameters:

Name Type Description Default
s str

The string representation of the CommonKwargs.

required

Returns:

Type Description
Optional[CommonKwargs]

The CommonKwargs enum.

Source code in python/opsml/types/_types.pyi
@staticmethod
def from_string(s: str) -> Optional["CommonKwargs"]:
    """Return the CommonKwargs enum from a string.

    Args:
        s:
            The string representation of the CommonKwargs.

    Returns:
        The CommonKwargs enum.
    """

DriftProfileUri

Source code in python/opsml/types/_types.pyi
class DriftProfileUri:
    root_dir: Path
    uri: Path
    drift_type: DriftType

    def __init__(self, uri: Path, drift_type: DriftType) -> None:
        """Define a drift profile

        Args:
            root_dir:
                The root directory of the drift profile
            uri:
                The relative path to the drift profile
            drift_type:
                Drift profile type
        """

__init__(uri, drift_type)

Define a drift profile

Parameters:

Name Type Description Default
root_dir

The root directory of the drift profile

required
uri Path

The relative path to the drift profile

required
drift_type DriftType

Drift profile type

required
Source code in python/opsml/types/_types.pyi
def __init__(self, uri: Path, drift_type: DriftType) -> None:
    """Define a drift profile

    Args:
        root_dir:
            The root directory of the drift profile
        uri:
            The relative path to the drift profile
        drift_type:
            Drift profile type
    """

SaveName

Source code in python/opsml/types/_types.pyi
class SaveName:
    Card: "SaveName"
    Audit: "SaveName"
    ModelMetadata: "SaveName"
    Model: "SaveName"
    Preprocessor: "SaveName"
    OnnxModel: "SaveName"
    SampleModelData: "SaveName"
    DataProfile: "SaveName"
    Data: "SaveName"
    Profile: "SaveName"
    Artifacts: "SaveName"
    QuantizedModel: "SaveName"
    Tokenizer: "SaveName"
    FeatureExtractor: "SaveName"
    Metadata: "SaveName"
    Graphs: "SaveName"
    OnnxConfig: "SaveName"
    Dataset: "SaveName"
    DriftProfile: "SaveName"

    @staticmethod
    def from_string(s: str) -> Optional["SaveName"]:
        """Return the SaveName enum from a string.

        Args:
            s:
                The string representation of the SaveName.

        Returns:
            The SaveName enum.
        """

    def as_string(self) -> str:
        """Return the string representation of the SaveName.

        Returns:
            String representation of the SaveName.
        """

    def __str__(self):
        """Return a string representation of the SaveName.

        Returns:
            String representation of the SaveName.
        """

__str__()

Return a string representation of the SaveName.

Returns:

Type Description

String representation of the SaveName.

Source code in python/opsml/types/_types.pyi
def __str__(self):
    """Return a string representation of the SaveName.

    Returns:
        String representation of the SaveName.
    """

as_string()

Return the string representation of the SaveName.

Returns:

Type Description
str

String representation of the SaveName.

Source code in python/opsml/types/_types.pyi
def as_string(self) -> str:
    """Return the string representation of the SaveName.

    Returns:
        String representation of the SaveName.
    """

from_string(s) staticmethod

Return the SaveName enum from a string.

Parameters:

Name Type Description Default
s str

The string representation of the SaveName.

required

Returns:

Type Description
Optional[SaveName]

The SaveName enum.

Source code in python/opsml/types/_types.pyi
@staticmethod
def from_string(s: str) -> Optional["SaveName"]:
    """Return the SaveName enum from a string.

    Args:
        s:
            The string representation of the SaveName.

    Returns:
        The SaveName enum.
    """

SaverPath

Source code in python/opsml/types/_types.pyi
class SaverPath:
    path: Path

    def __init__(
        self,
        parent: Path,
        child: Optional[Path],
        filename: Optional[SaveName],
        extension: Optional[Suffix],
    ) -> None:
        """Helper for creating paths for saving artifacts.

        Args:
            parent (Path):
                The parent path.
            child (Path | None):
                The child path.
            filename (SaveName | None):
                The filename.
            extension (Suffix | None):
                The extension.
        """

__init__(parent, child, filename, extension)

Helper for creating paths for saving artifacts.

Parameters:

Name Type Description Default
parent Path

The parent path.

required
child Path | None

The child path.

required
filename SaveName | None

The filename.

required
extension Suffix | None

The extension.

required
Source code in python/opsml/types/_types.pyi
def __init__(
    self,
    parent: Path,
    child: Optional[Path],
    filename: Optional[SaveName],
    extension: Optional[Suffix],
) -> None:
    """Helper for creating paths for saving artifacts.

    Args:
        parent (Path):
            The parent path.
        child (Path | None):
            The child path.
        filename (SaveName | None):
            The filename.
        extension (Suffix | None):
            The extension.
    """

Suffix

Source code in python/opsml/types/_types.pyi
class Suffix:
    Onnx: "Suffix"
    Parquet: "Suffix"
    Zarr: "Suffix"
    Joblib: "Suffix"
    Html: "Suffix"
    Json: "Suffix"
    Ckpt: "Suffix"
    Pt: "Suffix"
    Text: "Suffix"
    Catboost: "Suffix"
    Jsonl: "Suffix"
    Empty: "Suffix"
    Dmatrix: "Suffix"
    Model: "Suffix"

    @staticmethod
    def from_string(s: str) -> Optional["Suffix"]:
        """Return the Suffix enum from a string.

        Args:
            s:
                The string representation of the Suffix.

        Returns:
            The Suffix enum.
        """

    def as_string(self) -> str:
        """Return the string representation of the Suffix.

        Returns:
            String representation of the Suffix.
        """

    def __str__(self):
        """Return a string representation of the Suffix.

        Returns:
            String representation of the Suffix.
        """

__str__()

Return a string representation of the Suffix.

Returns:

Type Description

String representation of the Suffix.

Source code in python/opsml/types/_types.pyi
def __str__(self):
    """Return a string representation of the Suffix.

    Returns:
        String representation of the Suffix.
    """

as_string()

Return the string representation of the Suffix.

Returns:

Type Description
str

String representation of the Suffix.

Source code in python/opsml/types/_types.pyi
def as_string(self) -> str:
    """Return the string representation of the Suffix.

    Returns:
        String representation of the Suffix.
    """

from_string(s) staticmethod

Return the Suffix enum from a string.

Parameters:

Name Type Description Default
s str

The string representation of the Suffix.

required

Returns:

Type Description
Optional[Suffix]

The Suffix enum.

Source code in python/opsml/types/_types.pyi
@staticmethod
def from_string(s: str) -> Optional["Suffix"]:
    """Return the Suffix enum from a string.

    Args:
        s:
            The string representation of the Suffix.

    Returns:
        The Suffix enum.
    """