furiosa.registry package

Submodules

furiosa.registry.errors module

exception furiosa.registry.errors.RegistryError(msg)

Bases: Exception

exception furiosa.registry.errors.TransportNotFound(uri: str, transports: List[Transport])

Bases: furiosa.registry.errors.RegistryError

furiosa.registry.model module

class furiosa.registry.model.Config

Bases: pydantic.config.BaseConfig

extra: pydantic.config.Extra = 'forbid'
class furiosa.registry.model.Format(value)

Bases: str, enum.Enum

Model binary format to represent the binary specified.

ONNX = 'onnx'
TFLite = 'tflite'
class furiosa.registry.model.Metadata(*, description: Optional[str] = None, publication: Optional[furiosa.registry.model.Publication] = None)

Bases: pydantic.main.BaseModel

Model metadata to understand a model.

description: Optional[str]
publication: Optional[furiosa.registry.model.Publication]
class furiosa.registry.model.Model(*, name: str, source: bytes, format: furiosa.registry.model.Format, dfg: Optional[bytes] = None, enf: Optional[bytes] = None, family: Optional[str] = None, version: Optional[str] = None, metadata: Optional[furiosa.registry.model.Metadata] = None, inputs: Optional[List[furiosa.registry.model.ModelTensor]] = [], outputs: Optional[List[furiosa.registry.model.ModelTensor]] = [], compiler_config: Optional[Dict] = None)

Bases: pydantic.main.BaseModel

Represent the artifacts and metadata of a neural network model

name

a name of this model

format

the binary format type of model source; e.g., ONNX, tflite

source

a source binary in ONNX or tflite. It can be used for compiling this model with a custom compiler configuration.

dfg

an intermediate representation of furiosa-compiler. Native post processor implementation uses dfg binary. Users don’t need to use dfg directly.

enf

the executable binary for furiosa runtime and NPU

version

model version

inputs

data type and shape of input tensors

outputs

data type and shape of output tensors

compiler_config

a pre-defined compiler option

compiler_config: Optional[Dict]
dfg: Optional[bytes]
enf: Optional[bytes]
family: Optional[str]
format: furiosa.registry.model.Format
inputs: Optional[List[furiosa.registry.model.ModelTensor]]
metadata: Optional[furiosa.registry.model.Metadata]
name: str
outputs: Optional[List[furiosa.registry.model.ModelTensor]]
source: bytes
version: Optional[str]
class furiosa.registry.model.ModelTensor(*, name: str, datatype: str, shape: List[int], tags: Optional[furiosa.registry.model.Tags] = None)

Bases: pydantic.main.BaseModel

datatype: str
name: str
shape: List[int]
tags: Optional[furiosa.registry.model.Tags]
class furiosa.registry.model.Publication(*, authors: Optional[List[str]] = None, title: Optional[str] = None, publisher: Optional[str] = None, date: Optional[datetime.date] = None, url: Optional[str] = None)

Bases: pydantic.main.BaseModel

Model publication information.

authors: Optional[List[str]]
date: Optional[datetime.date]
publisher: Optional[str]
title: Optional[str]
url: Optional[str]
class furiosa.registry.model.Tags(*, content_type: Optional[str] = None, **extra_data: Any)

Bases: pydantic.main.BaseModel

class Config

Bases: object

extra = 'allow'
content_type: Optional[str]

furiosa.registry.utils module

furiosa.registry.utils.import_module(directory: str, path: str) module

Import module via specified path from the local directory.

furiosa.registry.utils.python_path(directory: str) Iterator[None]

Context adding the directory into PYTHONPATH.

furiosa.registry.utils.removeprefix(word: str, prefix: str) str

Python 3.9 removeprefix().

See https://docs.python.org/3/library/stdtypes.html#str.removeprefix

furiosa.registry.utils.working_directory(directory: str) Iterator[None]

Context replacing current working directory.

Module contents

FuriosaAI model registry