Defines the Bento class for packaging ML models with metadata and artifacts.
from __future__ import annotations import json import logging import os import shutil import tempfile import typing as t import weakref from datetime import datetime from datetime import timezone from functools import cached_property from pathlib import Path from typing import TYPE_CHECKING import attr import yaml from cattr.gen import make_dict_structure_fn from cattr.gen import make_dict_unstructure_fn from cattr.gen import override from simple_di import Provide from simple_di import inject from ...exceptions import BentoMLException from ...exceptions import InvalidArgument from ...exceptions import NotFound from ..configuration import BENTOML_VERSION from ..configuration.containers import BentoMLContainer from ..models import ModelStore from ..models import copy_model from ..runner i ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key