repo
stringclasses
454 values
file_path
stringlengths
5
201
extension
stringclasses
1 value
content
stringlengths
8
509k
num_lines
int64
3
16.9k
size_bytes
int64
8
511k
mlflow
mlflow/tracing/otel/translation/open_inference.py
.py
""" Translation utilities for OpenInference semantic conventions. Reference: https://github.com/Arize-ai/openinference/blob/main/python/openinference-semantic-conventions/ """ from mlflow.entities.span import SpanType from mlflow.tracing.otel.translation.base import OtelSchemaTranslator class OpenInferenceTranslato...
55
2,644
mlflow
mlflow/tracing/otel/translation/voltagent.py
.py
import json from typing import Any from mlflow.entities.span import SpanType from mlflow.tracing.otel.translation.base import OtelSchemaTranslator class VoltAgentTranslator(OtelSchemaTranslator): """ Translator for VoltAgent semantic conventions. VoltAgent provides clean chat-formatted messages in `agen...
122
4,341
mlflow
mlflow/tracing/otel/translation/spring_ai.py
.py
""" Translation utilities for Spring AI semantic conventions. Spring AI uses OpenTelemetry GenAI semantic conventions but stores prompt/completion content in events rather than attributes: - gen_ai.content.prompt event with gen_ai.prompt attribute - gen_ai.content.completion event with gen_ai.completion attribute Ref...
98
3,218
mlflow
mlflow/tracing/otel/translation/google_adk.py
.py
from mlflow.tracing.otel.translation.base import OtelSchemaTranslator class GoogleADKTranslator(OtelSchemaTranslator): """ Translator for Google ADK semantic conventions. Google ADK mostly uses OpenTelemetry semantic conventions, but with some custom inputs and outputs attributes. """ # Input...
15
667
mlflow
mlflow/tracing/otel/translation/vercel_ai.py
.py
import json from typing import Any from mlflow.entities.span import SpanType from mlflow.tracing.constant import SpanAttributeKey from mlflow.tracing.otel.translation.base import OtelSchemaTranslator class VercelAITranslator(OtelSchemaTranslator): """Translator for Vercel AI SDK spans.""" # https://ai-sdk.d...
92
3,350
mlflow
mlflow/tracing/otel/translation/base.py
.py
""" Base class for OTEL semantic convention translators. This module provides a base class that implements common translation logic. Subclasses only need to define the attribute keys and mappings as class attributes. """ import json import logging from typing import Any _logger = logging.getLogger(__name__) class ...
238
7,822
mlflow
mlflow/tracing/processor/inference_table.py
.py
import json import logging from opentelemetry.context import Context from opentelemetry.sdk.trace import ReadableSpan as OTelReadableSpan from opentelemetry.sdk.trace import Span as OTelSpan from opentelemetry.sdk.trace.export import SimpleSpanProcessor, SpanExporter from mlflow.entities.span import create_mlflow_spa...
190
8,292
mlflow
mlflow/tracing/processor/otel.py
.py
import logging from opentelemetry.sdk.trace import ReadableSpan as OTelReadableSpan from opentelemetry.sdk.trace.export import BatchSpanProcessor, SpanExporter from mlflow.entities.span import create_mlflow_span from mlflow.entities.trace_info import TraceInfo, TraceLocation, TraceState from mlflow.environment_variab...
106
4,649
mlflow
mlflow/tracing/processor/base_mlflow.py
.py
import json import logging import threading import weakref from typing import Any from opentelemetry.context import Context from opentelemetry.sdk.trace import ReadableSpan as OTelReadableSpan from opentelemetry.sdk.trace import Span as OTelSpan from opentelemetry.sdk.trace.export import ( BatchSpanProcessor, ...
393
17,862
mlflow
mlflow/tracing/processor/uc_table.py
.py
import logging from opentelemetry.sdk.trace import ReadableSpan as OTelReadableSpan from opentelemetry.sdk.trace import Span as OTelSpan from opentelemetry.sdk.trace.export import SpanExporter from mlflow.entities.trace_info import TraceInfo from mlflow.entities.trace_location import TraceLocation, UCSchemaLocation, ...
105
4,486
mlflow
mlflow/tracing/processor/mlflow_v3.py
.py
import logging from opentelemetry.sdk.trace import Span as OTelSpan from opentelemetry.sdk.trace.export import SpanExporter from mlflow.entities.trace_info import TraceInfo from mlflow.entities.trace_location import TraceLocation from mlflow.entities.trace_state import TraceState from mlflow.tracing.processor.base_ml...
54
2,042
mlflow
mlflow/tracing/processor/otel_metrics_mixin.py
.py
""" Mixin class for OpenTelemetry span processors that provides metrics recording functionality. This mixin allows different span processor implementations to share common metrics logic while maintaining their own inheritance hierarchies (BatchSpanProcessor, SimpleSpanProcessor). """ import logging from typing import...
122
4,737
mlflow
mlflow/tracing/utils/copy.py
.py
from typing import Any from mlflow.entities.span import LiveSpan, Span from mlflow.exceptions import MlflowException from mlflow.protos.databricks_pb2 import INVALID_STATE from mlflow.tracing.trace_manager import InMemoryTraceManager def copy_trace_to_experiment(trace_dict: dict[str, Any], experiment_id: str | None ...
63
2,583
mlflow
mlflow/tracing/utils/default_log_level.py
.py
from __future__ import annotations from mlflow.entities.span_log_level import SpanLogLevel # Span types whose default level is INFO. These represent the user-visible # semantic operations (model calls, tool calls, retrievals, agent turns, etc.) # that should remain visible at the default UI threshold. Everything else...
34
1,257
mlflow
mlflow/tracing/utils/once.py
.py
# Customized from https://github.com/open-telemetry/opentelemetry-python/blob/754fc36a408dd45e86d4a0f820f84e692f14b4c1/opentelemetry-api/src/opentelemetry/util/_once.py from threading import Lock from typing import Callable class Once: """Execute a function exactly once and block all callers until the function re...
26
800
mlflow
mlflow/tracing/utils/timeout.py
.py
import atexit import logging import threading import time from collections import OrderedDict from cachetools import Cache, TTLCache from mlflow.entities.span_event import SpanEvent from mlflow.entities.span_status import SpanStatusCode from mlflow.environment_variables import ( MLFLOW_TRACE_BUFFER_MAX_SIZE, ...
251
8,779
mlflow
mlflow/tracing/utils/token.py
.py
from dataclasses import dataclass from typing import TYPE_CHECKING from mlflow.entities import LiveSpan if TYPE_CHECKING: from mlflow.tracing.provider import SpanContextToken @dataclass class SpanWithToken: """ A utility container to hold an MLflow span and its corresponding OpenTelemetry token. Th...
23
751
mlflow
mlflow/tracing/utils/environment.py
.py
import logging import os from functools import lru_cache from mlflow.tracking.context.git_context import GitRunContext from mlflow.tracking.context.registry import resolve_tags from mlflow.utils.databricks_utils import is_in_databricks_notebook from mlflow.utils.git_utils import get_git_branch, get_git_commit, get_git...
56
1,974
mlflow
mlflow/tracing/utils/warning.py
.py
import functools import importlib import logging import warnings _logger = logging.getLogger(__name__) class LogDemotionFilter(logging.Filter): def __init__(self, module: str, message: str): super().__init__() self.module = module self.message = message def filter(self, record: loggi...
76
2,655
mlflow
mlflow/tracing/utils/__init__.py
.py
# TODO: Split this file into multiple files and move under utils directory. from __future__ import annotations import inspect import json import logging import uuid from collections import defaultdict from contextlib import contextmanager from dataclasses import dataclass, fields, is_dataclass from functools import lr...
953
35,005
mlflow
mlflow/tracing/utils/exception.py
.py
import functools from mlflow.exceptions import MlflowTracingException def raise_as_trace_exception(f): """ A decorator to make sure that the decorated function only raises MlflowTracingException. Any exceptions are caught and translated to MlflowTracingException before exiting the function. This is ...
22
618
mlflow
mlflow/tracing/utils/artifact_utils.py
.py
from mlflow.entities.trace_info import TraceInfo from mlflow.exceptions import MlflowTraceDataCorrupted from mlflow.tracing.constant import TraceTagKey from mlflow.utils.mlflow_tags import MLFLOW_ARTIFACT_LOCATION TRACE_DATA_FILE_NAME = "traces.json" def _get_trace_request_id(trace_info: TraceInfo) -> str | None: ...
45
1,581
mlflow
mlflow/tracing/utils/search.py
.py
from __future__ import annotations from typing import TYPE_CHECKING, Any, Literal, NamedTuple from mlflow.exceptions import MlflowException SPANS_COLUMN_NAME = "spans" if TYPE_CHECKING: import pandas import mlflow.entities from mlflow.entities import Trace def traces_to_df( traces: list[Trace], e...
199
6,157
mlflow
mlflow/tracing/utils/processor.py
.py
import logging from mlflow.exceptions import MlflowException _logger = logging.getLogger(__name__) def apply_span_processors(span): """Apply configured span processors sequentially to the span.""" from mlflow.tracing.config import get_config config = get_config() if not config.span_processors: ...
55
1,809
mlflow
mlflow/tracing/utils/prompt.py
.py
import json from mlflow.entities.model_registry import PromptVersion from mlflow.exceptions import MlflowException from mlflow.tracing.constant import TraceTagKey # TODO: Remove tag based linking once we migrate to LinkPromptsToTraces endpoint def update_linked_prompts_tag(current_tag_value: str | None, prompt_versi...
48
1,750
mlflow
mlflow/tracing/utils/truncation.py
.py
import json from functools import lru_cache from typing import Any from mlflow.entities.trace_data import TraceData from mlflow.entities.trace_info import TraceInfo from mlflow.tracing.constant import ( TRACE_REQUEST_RESPONSE_PREVIEW_MAX_LENGTH_DBX, TRACE_REQUEST_RESPONSE_PREVIEW_MAX_LENGTH_OSS, ) from mlflow....
130
4,524
mlflow
mlflow/tracing/utils/otlp.py
.py
import base64 import gzip import os import zlib from typing import Any from opentelemetry.proto.common.v1.common_pb2 import AnyValue, ArrayValue, KeyValueList from opentelemetry.proto.resource.v1.resource_pb2 import Resource as OTelProtoResource from opentelemetry.sdk.resources import Resource as OTelResource from ope...
286
10,344
mlflow
mlflow/entities/run_status.py
.py
from mlflow.protos.service_pb2 import RunStatus as ProtoRunStatus class RunStatus: """Enum for status of an :py:class:`mlflow.entities.Run`.""" RUNNING = ProtoRunStatus.Value("RUNNING") SCHEDULED = ProtoRunStatus.Value("SCHEDULED") FINISHED = ProtoRunStatus.Value("FINISHED") FAILED = ProtoRunStat...
42
1,540
mlflow
mlflow/entities/run_tag.py
.py
from mlflow.entities._mlflow_object import _MlflowObject from mlflow.protos.service_pb2 import RunTag as ProtoRunTag class RunTag(_MlflowObject): """Tag object associated with a run.""" def __init__(self, key, value): self._key = key self._value = value def __eq__(self, other): i...
37
890
mlflow
mlflow/entities/mcp_access_endpoint.py
.py
from __future__ import annotations from dataclasses import dataclass, field from typing import TYPE_CHECKING, Any from mlflow.entities.mcp_server import MCPRemoteTransportType from mlflow.exceptions import MlflowException from mlflow.utils.annotations import experimental from mlflow.utils.workspace_utils import resol...
72
2,782
mlflow
mlflow/entities/scorer.py
.py
import json from functools import cached_property from mlflow.entities._mlflow_object import _MlflowObject from mlflow.protos.service_pb2 import Scorer as ProtoScorer class ScorerVersion(_MlflowObject): """ A versioned scorer entity that represents a specific version of a scorer within an MLflow experime...
207
7,409
mlflow
mlflow/entities/metric.py
.py
from mlflow.entities._mlflow_object import _MlflowObject from mlflow.exceptions import MlflowException from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.protos.service_pb2 import Metric as ProtoMetric from mlflow.protos.service_pb2 import MetricWithRunId as ProtoMetricWithRunId class Metric...
196
5,538
mlflow
mlflow/entities/trace.py
.py
from __future__ import annotations import json import logging import re from dataclasses import dataclass from typing import TYPE_CHECKING, Any, Literal from mlflow.entities._mlflow_object import _MlflowObject from mlflow.entities.span import Span, SpanType from mlflow.entities.trace_data import TraceData from mlflow...
331
11,688
mlflow
mlflow/entities/span_event.py
.py
import json import time import traceback from dataclasses import dataclass, field from datetime import datetime from opentelemetry.util.types import AttributeValue from mlflow.entities._mlflow_object import _MlflowObject from mlflow.tracing.utils.otlp import _set_otel_proto_anyvalue @dataclass class SpanEvent(_Mlfl...
104
3,382
mlflow
mlflow/entities/entity_type.py
.py
""" Entity type constants for MLflow's entity_association table. The entity_association table enables many-to-many relationships between different MLflow entities. It uses source and destination type/id pairs to create flexible associations without requiring dedicated junction tables for each relationship type. """ c...
18
594
mlflow
mlflow/entities/gateway_endpoint.py
.py
from __future__ import annotations from dataclasses import dataclass, field from enum import Enum from mlflow.entities._mlflow_object import _MlflowObject from mlflow.protos.service_pb2 import FallbackConfig as ProtoFallbackConfig from mlflow.protos.service_pb2 import FallbackStrategy as ProtoFallbackStrategy from ml...
483
17,951
mlflow
mlflow/entities/dataset_input.py
.py
from mlflow.entities._mlflow_object import _MlflowObject from mlflow.entities.dataset import Dataset from mlflow.entities.input_tag import InputTag from mlflow.protos.service_pb2 import DatasetInput as ProtoDatasetInput class DatasetInput(_MlflowObject): """DatasetInput object associated with an experiment.""" ...
50
1,581
mlflow
mlflow/entities/workspace.py
.py
"""Workspace entity shared between server and stores.""" from __future__ import annotations from dataclasses import dataclass from enum import Enum from typing import Any from mlflow.protos.service_pb2 import Workspace as ProtoWorkspace class WorkspaceDeletionMode(str, Enum): """Controls what happens to resour...
109
4,265
mlflow
mlflow/entities/gateway_secrets.py
.py
from dataclasses import dataclass from typing import Any from mlflow.entities._mlflow_object import _MlflowObject from mlflow.protos.service_pb2 import GatewaySecretInfo as ProtoGatewaySecretInfo from mlflow.utils.workspace_utils import resolve_entity_workspace_name @dataclass(frozen=True) class GatewaySecretInfo(_M...
90
3,975
mlflow
mlflow/entities/trace_location.py
.py
from abc import ABC, abstractmethod from dataclasses import dataclass from enum import Enum from typing import Any from mlflow.entities._mlflow_object import _MlflowObject from mlflow.exceptions import MlflowException from mlflow.protos import service_pb2 as pb from mlflow.utils.annotations import deprecated, experime...
397
13,937
mlflow
mlflow/entities/trace_info.py
.py
import json from dataclasses import dataclass, field from typing import Any from google.protobuf.duration_pb2 import Duration from google.protobuf.json_format import MessageToDict from google.protobuf.timestamp_pb2 import Timestamp from mlflow.entities._mlflow_object import _MlflowObject from mlflow.entities.assessme...
266
10,826
mlflow
mlflow/entities/evaluation_dataset.py
.py
from __future__ import annotations import json from enum import Enum from typing import TYPE_CHECKING, Any from mlflow.data import Dataset from mlflow.data.evaluation_dataset_source import EvaluationDatasetSource from mlflow.data.pyfunc_dataset_mixin import PyFuncConvertibleDatasetMixin from mlflow.entities._mlflow_o...
637
23,852
mlflow
mlflow/entities/trace_state.py
.py
from enum import Enum from opentelemetry import trace as trace_api from mlflow.protos import service_pb2 as pb class TraceState(str, Enum): """Enum representing the state of a trace. - ``STATE_UNSPECIFIED``: Unspecified trace state. - ``OK``: Trace successfully completed. - ``ERROR``: Trace encount...
43
1,169
mlflow
mlflow/entities/logged_model_output.py
.py
from mlflow.entities._mlflow_object import _MlflowObject from mlflow.protos.service_pb2 import ModelOutput class LoggedModelOutput(_MlflowObject): """ModelOutput object associated with a Run.""" def __init__(self, model_id: str, step: int) -> None: self._model_id = model_id self._step = step ...
36
1,004
mlflow
mlflow/entities/assessment_error.py
.py
from dataclasses import dataclass from mlflow.entities._mlflow_object import _MlflowObject from mlflow.protos.assessments_pb2 import AssessmentError as ProtoAssessmentError _STACK_TRACE_TRUNCATION_PREFIX = "[Stack trace is truncated]\n...\n" _STACK_TRACE_TRUNCATION_LENGTH = 10000 @dataclass class AssessmentError(_M...
78
2,498
mlflow
mlflow/entities/_job.py
.py
import json from typing import Any from mlflow.entities._job_status import JobStatus from mlflow.entities._mlflow_object import _MlflowObject from mlflow.utils.workspace_utils import resolve_entity_workspace_name class Job(_MlflowObject): """ MLflow entity representing a Job. """ def __init__( ...
122
3,616
mlflow
mlflow/entities/trace_data.py
.py
from collections import Counter from dataclasses import dataclass, field from typing import Any from mlflow.entities import Span from mlflow.tracing.constant import SpanAttributeKey from mlflow.utils.annotations import deprecated @dataclass class TraceData: """A container object that holds the spans data of a tr...
86
3,531
mlflow
mlflow/entities/gateway_guardrail.py
.py
from __future__ import annotations from dataclasses import dataclass from enum import Enum from mlflow.entities._mlflow_object import _MlflowObject from mlflow.entities.scorer import ScorerVersion from mlflow.protos.service_pb2 import GatewayGuardrail as ProtoGatewayGuardrail from mlflow.protos.service_pb2 import Gat...
134
4,591
mlflow
mlflow/entities/__init__.py
.py
""" The ``mlflow.entities`` module defines entities returned by the MLflow `REST API <../rest-api.html>`_. """ from mlflow.entities.assessment import ( Assessment, AssessmentError, AssessmentSource, AssessmentSourceType, Expectation, Feedback, IssueReference, ) from mlflow.entities.dataset ...
229
6,932
mlflow
mlflow/entities/logged_model_parameter.py
.py
import sys from mlflow.entities._mlflow_object import _MlflowObject from mlflow.protos import service_pb2 as pb2 class LoggedModelParameter(_MlflowObject): """ MLflow entity representing a parameter of a Model. """ def __init__(self, key, value): if "pyspark.ml" in sys.modules: i...
47
1,140
mlflow
mlflow/entities/logged_model_tag.py
.py
from mlflow.entities._mlflow_object import _MlflowObject from mlflow.protos import service_pb2 as pb2 class LoggedModelTag(_MlflowObject): """Tag object associated with a Model.""" def __init__(self, key, value): self._key = key self._value = value def __eq__(self, other): if typ...
34
850
mlflow
mlflow/entities/run.py
.py
from typing import Any from mlflow.entities._mlflow_object import _MlflowObject from mlflow.entities.run_data import RunData from mlflow.entities.run_info import RunInfo from mlflow.entities.run_inputs import RunInputs from mlflow.entities.run_outputs import RunOutputs from mlflow.exceptions import MlflowException fro...
98
2,763
mlflow
mlflow/entities/link.py
.py
import base64 from dataclasses import dataclass from typing import Any from mlflow.entities._mlflow_object import _MlflowObject @dataclass class Link(_MlflowObject): """ Represents an OpenTelemetry Span Link that connects spans across traces. Span Links allow you to link spans that don't have a parent-c...
65
2,270
mlflow
mlflow/entities/view_type.py
.py
from mlflow.protos import service_pb2 class ViewType: """Enum to filter requested experiment types.""" ACTIVE_ONLY, DELETED_ONLY, ALL = range(1, 4) _VIEW_TO_STRING = { ACTIVE_ONLY: "active_only", DELETED_ONLY: "deleted_only", ALL: "all", } _STRING_TO_VIEW = {value: key for...
52
1,816
mlflow
mlflow/entities/file_info.py
.py
from mlflow.entities._mlflow_object import _MlflowObject from mlflow.protos.service_pb2 import FileInfo as ProtoFileInfo class FileInfo(_MlflowObject): """ Metadata about a file or directory. """ def __init__(self, path, is_dir, file_size): self._path = path self._is_dir = is_dir ...
46
1,215
mlflow
mlflow/entities/run_data.py
.py
from mlflow.entities._mlflow_object import _MlflowObject from mlflow.entities.metric import Metric from mlflow.entities.param import Param from mlflow.entities.run_tag import RunTag from mlflow.protos.service_pb2 import Param as ProtoParam from mlflow.protos.service_pb2 import RunData as ProtoRunData from mlflow.protos...
85
3,039
mlflow
mlflow/entities/assessment.py
.py
from __future__ import annotations import json import time from dataclasses import dataclass from typing import Any from google.protobuf.json_format import MessageToDict, ParseDict from google.protobuf.struct_pb2 import Value from mlflow.entities._mlflow_object import _MlflowObject from mlflow.entities.assessment_er...
708
27,670
mlflow
mlflow/entities/dataset_record_source.py
.py
from __future__ import annotations import json from dataclasses import asdict, dataclass from enum import Enum from typing import Any from mlflow.entities._mlflow_object import _MlflowObject from mlflow.exceptions import MlflowException from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.prot...
127
4,181
mlflow
mlflow/entities/multipart_upload.py
.py
from dataclasses import dataclass from typing import Any from mlflow.protos.mlflow_artifacts_pb2 import ( CreateMultipartUpload as ProtoCreateMultipartUpload, ) from mlflow.protos.mlflow_artifacts_pb2 import ( MultipartUploadCredential as ProtoMultipartUploadCredential, ) @dataclass class MultipartUploadPart...
75
1,923
mlflow
mlflow/entities/source_type.py
.py
class SourceType: """Enum for originating source of a :py:class:`mlflow.entities.Run`.""" NOTEBOOK, JOB, PROJECT, LOCAL, UNKNOWN = range(1, 6) _STRING_TO_SOURCETYPE = { "NOTEBOOK": NOTEBOOK, "JOB": JOB, "PROJECT": PROJECT, "LOCAL": LOCAL, "UNKNOWN": UNKNOWN, } ...
32
1,168
mlflow
mlflow/entities/run_info.py
.py
from mlflow.entities._mlflow_object import _MlflowObject from mlflow.entities.lifecycle_stage import LifecycleStage from mlflow.entities.run_status import RunStatus from mlflow.exceptions import MlflowException from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.protos.service_pb2 import RunInf...
187
5,898
mlflow
mlflow/entities/presigned_download.py
.py
from __future__ import annotations from dataclasses import dataclass from typing import Any @dataclass class PresignedDownloadUrlResponse: """ Response containing a presigned URL for downloading an artifact directly from cloud storage. """ url: str headers: dict[str, str] file_size: int ...
34
830
mlflow
mlflow/entities/trace_info_v2.py
.py
from dataclasses import asdict, dataclass, field from typing import Any from mlflow.entities._mlflow_object import _MlflowObject from mlflow.entities.assessment import Assessment from mlflow.entities.trace_info import TraceInfo from mlflow.entities.trace_location import TraceLocation from mlflow.entities.trace_status ...
159
6,083
mlflow
mlflow/entities/span.py
.py
import ast import base64 import json import logging from functools import cached_property from typing import Any, Union from opentelemetry.proto.resource.v1.resource_pb2 import Resource as OTelProtoResource from opentelemetry.proto.trace.v1.trace_pb2 import Span as OTelProtoSpan from opentelemetry.proto.trace.v1.trace...
1,499
60,678
mlflow
mlflow/entities/lifecycle_stage.py
.py
from mlflow.entities.view_type import ViewType from mlflow.exceptions import MlflowException class LifecycleStage: ACTIVE = "active" DELETED = "deleted" _VALID_STAGES = {ACTIVE, DELETED} @classmethod def view_type_to_stages(cls, view_type=ViewType.ALL): stages = [] if view_type in...
36
1,202
mlflow
mlflow/entities/trace_metrics.py
.py
from dataclasses import dataclass from enum import Enum from mlflow.entities._mlflow_object import _MlflowObject from mlflow.protos import service_pb2 as pb class MetricViewType(str, Enum): TRACES = "TRACES" SPANS = "SPANS" ASSESSMENTS = "ASSESSMENTS" def __str__(self) -> str: return self.va...
98
2,979
mlflow
mlflow/entities/presigned_upload.py
.py
from __future__ import annotations from dataclasses import dataclass, field from typing import Any @dataclass class CreatePresignedUploadResponse: """Response from creating a presigned upload URL.""" presigned_url: str headers: dict[str, str] = field(default_factory=dict) def to_proto(self): ...
43
1,194
mlflow
mlflow/entities/experiment.py
.py
from __future__ import annotations from mlflow.entities._mlflow_object import _MlflowObject from mlflow.entities.experiment_tag import ExperimentTag from mlflow.entities.trace_location import UnityCatalog from mlflow.protos.service_pb2 import Experiment as ProtoExperiment from mlflow.protos.service_pb2 import Experime...
182
6,729
mlflow
mlflow/entities/run_inputs.py
.py
from typing import Any from mlflow.entities._mlflow_object import _MlflowObject from mlflow.entities.dataset_input import DatasetInput from mlflow.entities.logged_model_input import LoggedModelInput from mlflow.protos.service_pb2 import RunInputs as ProtoRunInputs class RunInputs(_MlflowObject): """RunInputs obj...
60
1,921
mlflow
mlflow/entities/_job_status.py
.py
from enum import Enum from mlflow.exceptions import MlflowException from mlflow.protos.jobs_pb2 import JobStatus as ProtoJobStatus class JobStatus(str, Enum): """Enum for status of a Job.""" PENDING = "PENDING" RUNNING = "RUNNING" SUCCEEDED = "SUCCEEDED" FAILED = "FAILED" TIMEOUT = "TIMEOUT"...
68
2,357
mlflow
mlflow/entities/input_tag.py
.py
from mlflow.entities._mlflow_object import _MlflowObject from mlflow.protos.service_pb2 import InputTag as ProtoInputTag class InputTag(_MlflowObject): """Input tag object associated with a dataset.""" def __init__(self, key: str, value: str) -> None: self._key = key self._value = value ...
36
928
mlflow
mlflow/entities/session.py
.py
from __future__ import annotations from typing import TYPE_CHECKING, Iterator from mlflow.tracing.constant import TraceMetadataKey if TYPE_CHECKING: from mlflow.entities import Trace class Session: """ A session object representing a group of traces that share the same session ID. Sessions typical...
47
1,233
mlflow
mlflow/entities/experiment_tag.py
.py
from mlflow.entities._mlflow_object import _MlflowObject from mlflow.protos.service_pb2 import ExperimentTag as ProtoExperimentTag class ExperimentTag(_MlflowObject): """Tag object associated with an experiment.""" def __init__(self, key, value): self._key = key self._value = value def _...
36
887
mlflow
mlflow/entities/logged_model_input.py
.py
from mlflow.entities._mlflow_object import _MlflowObject from mlflow.protos.service_pb2 import ModelInput as ProtoModelInput class LoggedModelInput(_MlflowObject): """ModelInput object associated with a Run.""" def __init__(self, model_id: str): self._model_id = model_id def __eq__(self, other: ...
27
720
mlflow
mlflow/entities/gateway_budget_policy.py
.py
from __future__ import annotations from dataclasses import dataclass from enum import Enum from mlflow.entities._mlflow_object import _MlflowObject from mlflow.protos.service_pb2 import BudgetAction as ProtoBudgetAction from mlflow.protos.service_pb2 import BudgetDuration as ProtoBudgetDuration from mlflow.protos.ser...
190
6,599
mlflow
mlflow/entities/trace_status.py
.py
from enum import Enum from opentelemetry import trace as trace_api from mlflow.entities.trace_state import TraceState from mlflow.protos.service_pb2 import TraceStatus as ProtoTraceStatus from mlflow.utils.annotations import deprecated @deprecated(alternative="mlflow.entities.trace_state.TraceState") class TraceSta...
69
2,218
mlflow
mlflow/entities/dataset_record.py
.py
from __future__ import annotations import json from dataclasses import dataclass from typing import Any from google.protobuf.json_format import MessageToDict from mlflow.entities._mlflow_object import _MlflowObject from mlflow.entities.dataset_record_source import DatasetRecordSource, DatasetRecordSourceType from ml...
180
7,104
mlflow
mlflow/entities/logged_model_status.py
.py
from enum import Enum from mlflow.exceptions import MlflowException from mlflow.protos import service_pb2 as pb2 class LoggedModelStatus(str, Enum): """Enum for status of an :py:class:`mlflow.entities.LoggedModel`.""" UNSPECIFIED = "UNSPECIFIED" PENDING = "PENDING" READY = "READY" FAILED = "FAIL...
75
2,664
mlflow
mlflow/entities/dataset.py
.py
from mlflow.entities._mlflow_object import _MlflowObject from mlflow.protos.service_pb2 import Dataset as ProtoDataset class Dataset(_MlflowObject): """Dataset object associated with an experiment.""" def __init__( self, name: str, digest: str, source_type: str, source...
91
2,432
mlflow
mlflow/entities/issue.py
.py
from __future__ import annotations from dataclasses import dataclass from enum import Enum from functools import cached_property from typing import Any from mlflow.entities._mlflow_object import _MlflowObject from mlflow.protos.issues_pb2 import Issue as ProtoIssue class IssueStatus(str, Enum): """Enum for stat...
188
6,308
mlflow
mlflow/entities/_mlflow_object.py
.py
import pprint from abc import abstractmethod from functools import cached_property class _MlflowObject: def __iter__(self): # Iterate through list of properties and yield as key -> value for prop in self._properties(): yield prop, self.__getattribute__(prop) @classmethod def _...
56
1,473
mlflow
mlflow/entities/logged_model.py
.py
from typing import Any import mlflow.protos.service_pb2 as pb2 from mlflow.entities._mlflow_object import _MlflowObject from mlflow.entities.logged_model_parameter import LoggedModelParameter from mlflow.entities.logged_model_status import LoggedModelStatus from mlflow.entities.logged_model_tag import LoggedModelTag f...
229
8,003
mlflow
mlflow/entities/document.py
.py
from copy import deepcopy from dataclasses import asdict, dataclass, field from typing import Any @dataclass class Document: """ An entity used in MLflow Tracing to represent retrieved documents in a RETRIEVER span. Args: page_content: The content of the document. metadata: A dictionary o...
49
1,372
mlflow
mlflow/entities/mcp_server.py
.py
from __future__ import annotations import re from dataclasses import dataclass, field from enum import Enum from typing import TYPE_CHECKING, Any from mlflow.exceptions import MlflowException from mlflow.utils.annotations import experimental from mlflow.utils.workspace_utils import resolve_entity_workspace_name if T...
195
6,909
mlflow
mlflow/entities/mcp_server_version.py
.py
from __future__ import annotations from dataclasses import dataclass, field from typing import Any from mlflow.entities.mcp_server import MCPStatus, MCPTool from mlflow.exceptions import MlflowException from mlflow.utils.annotations import experimental from mlflow.utils.workspace_utils import resolve_entity_workspace...
78
2,917
mlflow
mlflow/entities/span_log_level.py
.py
from __future__ import annotations from enum import IntEnum from mlflow.exceptions import MlflowException from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE class SpanLogLevel(IntEnum): """ Log level (severity) for an MLflow trace span. The public tracing API accepts a :class:`SpanLogLeve...
40
1,141
mlflow
mlflow/entities/param.py
.py
import sys from mlflow.entities._mlflow_object import _MlflowObject from mlflow.protos.service_pb2 import Param as ProtoParam class Param(_MlflowObject): """ Parameter object. """ def __init__(self, key, value): if "pyspark.ml" in sys.modules: import pyspark.ml.param ...
50
1,133
mlflow
mlflow/entities/span_status.py
.py
from __future__ import annotations from dataclasses import dataclass from enum import Enum from opentelemetry import trace as trace_api from opentelemetry.proto.trace.v1.trace_pb2 import Status as OtelStatus from mlflow.exceptions import MlflowException from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALU...
153
5,466
mlflow
mlflow/entities/webhook.py
.py
from enum import Enum from typing import Literal, TypeAlias from typing_extensions import Self from mlflow.exceptions import MlflowException from mlflow.protos.webhooks_pb2 import Webhook as ProtoWebhook from mlflow.protos.webhooks_pb2 import WebhookAction as ProtoWebhookAction from mlflow.protos.webhooks_pb2 import ...
453
13,969
mlflow
mlflow/entities/assessment_source.py
.py
import warnings from dataclasses import asdict, dataclass from typing import Any from mlflow.entities._mlflow_object import _MlflowObject from mlflow.exceptions import MlflowException from mlflow.protos.assessments_pb2 import AssessmentSource as ProtoAssessmentSource from mlflow.protos.databricks_pb2 import INVALID_PA...
195
6,770
mlflow
mlflow/entities/dataset_summary.py
.py
from mlflow.protos.service_pb2 import DatasetSummary class _DatasetSummary: """ DatasetSummary object. This is used to return a list of dataset summaries across one or more experiments in the UI. """ def __init__(self, experiment_id, name, digest, context): self._experiment_id = experime...
63
1,581
mlflow
mlflow/entities/run_outputs.py
.py
from typing import Any from mlflow.entities._mlflow_object import _MlflowObject from mlflow.entities.logged_model_output import LoggedModelOutput from mlflow.protos.service_pb2 import RunOutputs as ProtoRunOutputs class RunOutputs(_MlflowObject): """RunOutputs object.""" def __init__(self, model_outputs: li...
44
1,316
mlflow
mlflow/entities/model_registry/registered_model_deployment_job_state.py
.py
from mlflow.protos.databricks_uc_registry_messages_pb2 import DeploymentJobConnection class RegisteredModelDeploymentJobState: """Enum for registered model deployment state of an :py:class:`mlflow.entities.model_registry.RegisteredModel`. """ NOT_SET_UP = DeploymentJobConnection.State.Value("NOT_SET_...
40
1,757
mlflow
mlflow/entities/model_registry/model_version_deployment_job_state.py
.py
from mlflow.entities.model_registry._model_registry_entity import _ModelRegistryEntity from mlflow.entities.model_registry.model_version_deployment_job_run_state import ( ModelVersionDeploymentJobRunState, ) from mlflow.entities.model_registry.registered_model_deployment_job_state import ( RegisteredModelDeploy...
71
2,364
mlflow
mlflow/entities/model_registry/model_version_status.py
.py
from mlflow.protos.model_registry_pb2 import ModelVersionStatus as ProtoModelVersionStatus class ModelVersionStatus: """Enum for status of an :py:class:`mlflow.entities.model_registry.ModelVersion`.""" PENDING_REGISTRATION = ProtoModelVersionStatus.Value("PENDING_REGISTRATION") FAILED_REGISTRATION = Prot...
36
1,523
mlflow
mlflow/entities/model_registry/model_version.py
.py
from mlflow.entities.logged_model_parameter import LoggedModelParameter as ModelParam from mlflow.entities.metric import Metric from mlflow.entities.model_registry._model_registry_entity import _ModelRegistryEntity from mlflow.entities.model_registry.model_version_deployment_job_state import ( ModelVersionDeploymen...
254
9,548
mlflow
mlflow/entities/model_registry/prompt_version.py
.py
from __future__ import annotations import json import re from typing import Any from pydantic import BaseModel, Field, ValidationError from mlflow.entities.model_registry._model_registry_entity import _ModelRegistryEntity from mlflow.entities.model_registry.model_version_tag import ModelVersionTag from mlflow.except...
574
22,164
mlflow
mlflow/entities/model_registry/registered_model_alias.py
.py
from mlflow.entities.model_registry._model_registry_entity import _ModelRegistryEntity from mlflow.protos.model_registry_pb2 import RegisteredModelAlias as ProtoRegisteredModelAlias class RegisteredModelAlias(_ModelRegistryEntity): """Alias object associated with a registered model.""" def __init__(self, ali...
36
1,053
mlflow
mlflow/entities/model_registry/__init__.py
.py
from mlflow.entities.model_registry.model_version import ModelVersion from mlflow.entities.model_registry.model_version_deployment_job_state import ( ModelVersionDeploymentJobState, ) from mlflow.entities.model_registry.model_version_search import ModelVersionSearch from mlflow.entities.model_registry.model_version...
31
1,284
mlflow
mlflow/entities/model_registry/model_version_deployment_job_run_state.py
.py
from mlflow.protos.databricks_uc_registry_messages_pb2 import ( ModelVersionDeploymentJobState as ProtoModelVersionDeploymentJobState, ) class ModelVersionDeploymentJobRunState: """Enum for model version deployment state of an :py:class:`mlflow.entities.model_registry.ModelVersion`. """ NO_VALID_...
45
2,043