> ## Documentation Index
> Fetch the complete documentation index at: https://www.truefoundry.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SDK Types

> Reference for all data types in the TrueFoundry ML SDK including InternalNamespace and ModelFramework.

## \_InternalNamespace

**Module:** `ml.internal_namespace`

## \_ModelFramework

**Module:** `ml.model_framework`

<ParamField body="__root__" type="ModelFrameworkType" required>
  [🔗 ModelFrameworkType](/docs/truefoundry-ml-reference/types#modelframeworktype)
</ParamField>

## \_SerializationFormatLoaderRegistry

**Module:** `ml.model_framework`

## ActiveRuns

**Module:** `ml.session`

## AppName

Custom ParamType to validate application names

**Module:** `ml.utils`

Custom ParamType to validate application names.

**Union, One Of:**

* [🔗 click.ParamType](/docs/truefoundry-ml-reference/types#click.paramtype)

## ArtifactIdentifier

**Module:** `ml.truefoundry_artifact_repo`

<ParamField body="artifact_version_id" type="Optional[uuid.UUID]" />

<ParamField body="dataset_id" type="Optional[str]" />

<ParamField body="dataset_fqn" type="Optional[str]" />

## ArtifactPath

**Module:** `ml.artifact`

<ParamField body="src" type="str" required />

<ParamField body="dest" type="Optional[str]" />

## ArtifactVersion

**Module:** `ml.artifact`

<ParamField body="name" type="str" required>
  Get the name of the artifact
</ParamField>

<ParamField body="artifact_fqn" type="str" required>
  Get fqn of the artifact
</ParamField>

<ParamField body="version" type="int" required>
  Get version information of the artifact
</ParamField>

<ParamField body="fqn" type="str" required>
  Get fqn of the current artifact version
</ParamField>

<ParamField body="step" type="Optional[int]" required>
  Get the step in which artifact was created
</ParamField>

<ParamField body="description" type="str" required>
  Get description of the artifact
</ParamField>

<ParamField body="metadata" type="Dict[str, Any]" required>
  Get metadata for the current artifact
</ParamField>

<ParamField body="version_alias" type="Optional[str]" required>
  Get version alias for the current artifact version
</ParamField>

<ParamField body="created_at" type="Optional[datetime.datetime]" required>
  Get the time at which artifact was created
</ParamField>

<ParamField body="updated_at" type="Optional[datetime.datetime]" required>
  Get the information about when the artifact was updated
</ParamField>

## ArtifactVersionDownloadInfo

**Module:** `ml.artifact`

<ParamField body="download_dir" type="str" required />

## ArtifactVersionInternalMetadata

**Module:** `ml.artifact`

<ParamField body="files_dir" type="str" required />

## BlobStorageDirectory

**Module:** `ml.artifact`

<ParamField body="uri" type="StrictStr" required />

## BoundingBox

**Module:** `ml.types`

<ParamField body="position" type="Position" required>
  [🔗 Position](/docs/truefoundry-ml-reference/types#position)
</ParamField>

<ParamField body="class_name" type="NonEmptyStr" required />

<ParamField body="caption" type="Optional[str]" />

## BoundingBoxGroups

**Module:** `ml.types`

<ParamField body="__root__" type="Dict[Group, List[BoundingBox]]" required>
  [🔗 BoundingBox](/docs/truefoundry-ml-reference/types#boundingbox)
</ParamField>

## ClassGroups

**Module:** `ml.types`

<ParamField body="__root__" type="Dict[Group, List[NonEmptyStr]]" required />

## Config

**Module:** `ml.types`

## DataDirectory

**Module:** `ml.dataset`

<ParamField body="name" type="str" required>
  Get the name of the DataDirectory
</ParamField>

<ParamField body="fqn" type="str" required>
  Get fqn of the DataDirectory
</ParamField>

<ParamField body="storage_root" type="str" required>
  Get storage\_root of the DataDirectory
</ParamField>

<ParamField body="description" type="Optional[str]" required>
  Get description of the DataDirectory
</ParamField>

<ParamField body="metadata" type="Dict[str, Any]" required>
  Get metadata for the current DataDirectory
</ParamField>

<ParamField body="created_at" type="datetime.datetime" required>
  Get the time at which DataDirectory was created
</ParamField>

<ParamField body="updated_at" type="datetime.datetime" required>
  Get the information about when the DataDirectory was updated
</ParamField>

## DataDirectoryPath

**Module:** `ml.dataset`

<ParamField body="src" type="str" required />

<ParamField body="dest" type="Optional[str]" />

## EnumMissingMixin

**Module:** `ml.enums`

## FastAIFramework

FastAI model Framework

**Module:** `ml.model_framework`

FastAI model Framework

<ParamField body="type" type="Literal[Any]" default="fastai" required />

## FileInfo

**Module:** `ml.entities`

<ParamField body="path" type="StrictStr" required />

<ParamField body="is_dir" type="StrictBool" required />

<ParamField body="file_size" type="Optional[StrictInt]" />

<ParamField body="signed_url" type="Optional[StrictStr]" />

## GitInfo

**Module:** `ml.git_info`

<ParamField body="current_commit_sha" type="str" required />

<ParamField body="current_branch_name" type="str" required />

<ParamField body="remote_url" type="Optional[str]" required />

<ParamField body="diff_patch" type="str" required />

<ParamField body="is_dirty" type="bool" required />

## GluonFramework

Gluon model Framework

**Module:** `ml.model_framework`

Gluon model Framework

<ParamField body="type" type="Literal[Any]" default="gluon" required />

## H2OFramework

H2O model Framework

**Module:** `ml.model_framework`

H2O model Framework

<ParamField body="type" type="Literal[Any]" default="h2o" required />

## Image

**Module:** `ml.image`

<ParamField body="image" type="Any" required />

<ParamField body="caption" type="Optional[str]" required />

<ParamField body="class_groups" type="Optional[ClassGroups]" required>
  [🔗 ClassGroups](/docs/truefoundry-ml-reference/types#classgroups)
</ParamField>

<ParamField body="bbox_groups" type="Optional[BoundingBoxGroups]" required>
  [🔗 BoundingBoxGroups](/docs/truefoundry-ml-reference/types#boundingboxgroups)
</ParamField>

## ImageRunLogType

**Module:** `ml.image`

<ParamField body="value" type="Dict[str, Any]" required />

## ImageVersionInternalMetadata

**Module:** `ml.image`

<ParamField body="image_file" type="str" required />

<ParamField body="image_metadata_file" type="str" required />

## InferMethodName

Name of the inference method for model serving

**Module:** `ml._autogen.client.models`

Inference method name

## Iterator

An iterator that yields items one at a time

**Module:** `typing`

Iterator type for collections

## KerasFramework

Keras model Framework

**Module:** `ml.model_framework`

Keras model Framework

<ParamField body="type" type="Literal[Any]" default="keras" required />

## LibraryName

Name of a library dependency

**Module:** `ml._autogen.entities.artifacts`

Library name for dependencies

## LightGBMFramework

LightGBM model Framework

**Module:** `ml.model_framework`

LightGBM model Framework

<ParamField body="type" type="Literal[Any]" default="lightgbm" required />

## Metric

**Module:** `ml.entities`

<ParamField body="key" type="StrictStr" required />

<ParamField body="value" type="Optional[Union[StrictFloat, StrictInt]]" />

<ParamField body="timestamp" type="Optional[StrictInt]" />

<ParamField body="step" type="Optional[StrictInt]" />

## MlFoundry

MlFoundry

**Module:** `ml.mlfoundry_api`

MlFoundry.

## MlFoundryArtifactsRepository

**Module:** `ml.truefoundry_artifact_repo`

## MlFoundryException

**Module:** `ml.exceptions`

**Union, One Of:**

* [🔗 Exception](/docs/truefoundry-ml-reference/types#exception)

## MlFoundryRun

MlFoundryRun

**Module:** `ml.mlfoundry_run`

MlFoundryRun.

<ParamField body="run_id" type="str" required>
  Get run\_id for the current `run`
</ParamField>

<ParamField body="run_name" type="str" required>
  Get run\_name for the current `run`
</ParamField>

<ParamField body="fqn" type="str" required>
  Get fqn for the current `run`
</ParamField>

<ParamField body="status" type="RunStatus" required>
  [🔗 RunStatus](/docs/truefoundry-ml-reference/enums#runstatus)

  Get status for the current `run`
</ParamField>

<ParamField body="ml_repo" type="str" required>
  Get ml\_repo name of which the current `run` is part of
</ParamField>

<ParamField body="auto_end" type="bool" required>
  Tells whether automatic end for `run` is True or False
</ParamField>

<ParamField body="dashboard_link" type="str" required>
  Get Mlfoundry dashboard link for a `run`
</ParamField>

## MLFoundryServerApiClient

**Module:** `ml.session`

<ParamField body="tfy_host" type="str" required />

<ParamField body="access_token" type="str" required />

## MLFoundrySession

**Module:** `ml.session`

**Union, One Of:**

* [🔗 Session](/docs/truefoundry-ml-reference/types#session)

## MLRepo

A repository for ML training runs and versioned entities

**Module:** `ml._autogen.entities.artifacts`

MLRepo is a repository ML training runs that log params, metrics, plots, images and versioned entities like artifacts, models, prompts, tools, agents

## ModelFrameworkType

Base class for all model framework implementations

**Module:** `ml.model_framework`

Base class for model framework types

## ModelVersion

**Module:** `ml.model`

<ParamField body="name" type="str" required>
  Get the name of the model
</ParamField>

<ParamField body="model_fqn" type="str" required>
  Get fqn of the model
</ParamField>

<ParamField body="version" type="int" required>
  Get version information of the model
</ParamField>

<ParamField body="fqn" type="str" required>
  Get fqn of the current model version
</ParamField>

<ParamField body="step" type="Optional[int]" required>
  Get the step in which model was created
</ParamField>

<ParamField body="description" type="str" required>
  Get description of the model
</ParamField>

<ParamField body="metadata" type="Dict[str, Any]" required>
  Get metadata for the current model
</ParamField>

<ParamField body="version_alias" type="Optional[str]" required>
  Get version alias for the current model version
</ParamField>

<ParamField body="environment" type="Optional[ModelVersionEnvironment]" required>
  [🔗 ModelVersionEnvironment](/docs/truefoundry-ml-reference/types#modelversionenvironment)

  Get the environment details for the model
</ParamField>

<ParamField body="framework" type="Optional[Any]" required>
  Get the framework of the model
</ParamField>

<ParamField body="created_at" type="Optional[datetime.datetime]" required>
  Get the time at which model version was created
</ParamField>

<ParamField body="updated_at" type="Optional[datetime.datetime]" required>
  Get the information about when the model version was updated
</ParamField>

## ModelVersionDownloadInfo

**Module:** `ml.model`

<ParamField body="download_dir" type="str" required />

<ParamField body="model_dir" type="str" required />

<ParamField body="model_framework" type="ModelFramework" default="ModelFramework.UNKNOWN" required>
  [🔗 ModelFramework](/docs/truefoundry-ml-reference/enums#modelframework)
</ParamField>

<ParamField body="model_filename" type="Optional[str]" />

## ModelVersionEnvironment

Environment configuration for model deployment

**Module:** `ml._autogen.client.models`

Environment for model version

## ModelVersionInternalMetadata

**Module:** `ml.model`

<ParamField body="files_dir" type="str" required />

<ParamField body="model_dir" type="str" required />

<ParamField body="model_is_null" type="bool" required />

<ParamField body="framework" type="ModelFramework" default="ModelFramework.UNKNOWN" required>
  [🔗 ModelFramework](/docs/truefoundry-ml-reference/enums#modelframework)
</ParamField>

<ParamField body="transformers_pipeline_task" type="Optional[str]" />

<ParamField body="model_filename" type="Optional[str]" />

<ParamField body="mlfoundry_version" type="Optional[str]" />

<ParamField body="truefoundry_version" type="Optional[str]" />

## NonEmptyString

**Module:** `ml.utils`

**Union, One Of:**

* [🔗 click.ParamType](/docs/truefoundry-ml-reference/types#click.paramtype)

## NumpyEncoder

Special json encoder for numpy types

**Module:** `ml.run_utils`

Special json encoder for numpy types

**Union, One Of:**

* [🔗 json.JSONEncoder](/docs/truefoundry-ml-reference/types#json.jsonencoder)

## ONNXFramework

ONNX model Framework

**Module:** `ml.model_framework`

ONNX model Framework

<ParamField body="type" type="Literal[Any]" default="onnx" required />

## PaddleFramework

Paddle model Framework

**Module:** `ml.model_framework`

Paddle model Framework

<ParamField body="type" type="Literal[Any]" default="paddle" required />

## Plot

**Module:** `ml.plot`

## PlotArtifact

**Module:** `ml.plot`

<ParamField body="artifact_file" type="str" required />

<ParamField body="format" type="Format" required>
  [🔗 Format](/docs/truefoundry-ml-reference/enums#format)
</ParamField>

## PlotRunLogType

**Module:** `ml.plot`

<ParamField body="value" type="PlotArtifact" required>
  [🔗 PlotArtifact](/docs/truefoundry-ml-reference/types#plotartifact)
</ParamField>

## PlotVersionInternalMetadata

**Module:** `ml.plot`

<ParamField body="plot_file" type="str" required />

## Position

**Module:** `ml.types`

<ParamField body="min_x" type="float" required />

<ParamField body="min_y" type="float" required />

<ParamField body="max_x" type="float" required />

<ParamField body="max_y" type="float" required />

## PydanticBase

**Module:** `ml.pydantic_base`

**Union, One Of:**

* [🔗 BaseModel](/docs/truefoundry-ml-reference/types#basemodel)

## PyTorchFramework

PyTorch model Framework

**Module:** `ml.model_framework`

PyTorch model Framework

<ParamField body="type" type="Literal[Any]" default="pytorch" required />

## SklearnFramework

Sklearn model Framework

**Module:** `ml.model_framework`

Sklearn model Framework

<ParamField body="type" type="Literal[Any]" default="sklearn" required />

## SklearnModelSchema

Schema definition for scikit-learn model serialization

**Module:** `ml._autogen.client.models`

Schema for scikit-learn models

## SpaCyFramework

SpaCy model Framework

**Module:** `ml.model_framework`

SpaCy model Framework

<ParamField body="type" type="Literal[Any]" default="spacy" required />

## StatsModelsFramework

StatsModels model Framework

**Module:** `ml.model_framework`

StatsModels model Framework

<ParamField body="type" type="Literal[Any]" default="statsmodels" required />

## TensorFlowFramework

TensorFlow model Framework

**Module:** `ml.model_framework`

TensorFlow model Framework

<ParamField body="type" type="Literal[Any]" default="tensorflow" required />

## TransformersFramework

Transformers model Framework

**Module:** `ml.model_framework`

Transformers model Framework

<ParamField body="type" type="Literal[Any]" default="transformers" required />

## XGBoostFramework

XGBoost model Framework

**Module:** `ml.model_framework`

XGBoost model Framework

<ParamField body="type" type="Literal[Any]" default="xgboost" required />

## XGBoostModelSchema

Schema definition for XGBoost model serialization

**Module:** `ml._autogen.client.models`

Schema for XGBoost models
