checkpoint#

class aiearth.predict.checkpoint.AcceleratorType(value)[源代码]#

基类:Enum

An enumeration.

t4 = 't4'#
class aiearth.predict.checkpoint.BuildType(value)[源代码]#

基类:Enum

An enumeration.

hugging_face = 'hugging_face'#
local_path = 'local_path'#
model_scope = 'model_scope'#
class aiearth.predict.checkpoint.ModelAttachedFile(*, path: str, accelerator_type: AcceleratorType | None = None, params: Dict | None = None)[源代码]#

基类:BaseModel

class Config[源代码]#

基类:object

use_enum_values = True#
accelerator_type: AcceleratorType | None#
params: Dict | None#
path: str#
class aiearth.predict.checkpoint.ModelCheckpoint(local_path: str | PathLike | None = None, data_dict: dict | None = None, uri: str | None = None)[源代码]#

基类:Checkpoint

classmethod from_hugging_face(path: str, image_size: int = 1024, bound: int = 128, **kwargs)[源代码]#
classmethod from_local_path(path: str, image_size: int = 1024, bound: int = 128, use_quant: bool = False, attached_files: Dict[str, ModelAttachedFile] | None = None, **kwargs)[源代码]#
classmethod from_model_scope(path: str, image_size: int = 1024, bound: int = 128, **kwargs)[源代码]#
classmethod from_remote_tag(tag, model_cache_dir=None)[源代码]#
get_cfg()[源代码]#
class aiearth.predict.checkpoint.ModelConfig(*, name: str | None = None, path: str, build_type: BuildType, attached_files: Dict[str, ModelAttachedFile] | None = None, params: ModelParams)[源代码]#

基类:BaseModel

class Config[源代码]#

基类:object

use_enum_values = True#
attached_files: Dict[str, ModelAttachedFile] | None#
build_type: BuildType#
name: str | None#
params: ModelParams#
path: str#
class aiearth.predict.checkpoint.ModelParams(*, image_size: int | None = None, bound: int | None = None, use_quant: bool | None = None, additional_args: dict | None = None)[源代码]#

基类:BaseModel

additional_args: dict | None#
bound: int | None#
image_size: int | None#
use_quant: bool | None#