Metadata-Version: 2.1
Name: furiosa-registry
Version: 0.9.0rc3
Summary: FuriosaAI model registry
Author-email: "FurioaAI, Inc." <pkg@furiosa.ai>
Requires-Python: ~=3.8
Description-Content-Type: text/markdown
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Dist: PyYAML
Requires-Dist: aiofiles
Requires-Dist: aiohttp ~= 3.8.3
Requires-Dist: multipledispatch
Requires-Dist: pydantic
Requires-Dist: toml
Requires-Dist: tqdm
Requires-Dist: boto3 ; extra == "s3"
Requires-Dist: aioboto3 ; extra == "s3"
Requires-Dist: moto[s3] ; extra == "s3"
Requires-Dist: botocore ; extra == "s3"
Requires-Dist: pytest ; extra == "test"
Requires-Dist: pytest-aiohttp ; extra == "test"
Requires-Dist: pytest-asyncio ~= 0.17.2 ; extra == "test"
Requires-Dist: types-aiofiles ; extra == "test"
Requires-Dist: types-toml ; extra == "test"
Requires-Dist: types-PyYAML ; extra == "test"
Project-URL: Bug Tracker, https://github.com/furiosa-ai/furiosa-sdk/issues
Project-URL: Documentation, https://furiosa-ai.github.io/docs
Project-URL: Home, https://furiosa.ai
Project-URL: Source Code, https://github.com/furiosa-ai/furiosa-sdk
Provides-Extra: s3
Provides-Extra: test

Furiosa Registry
----------------

Furiosa Registry defines `Model` which allows client to communicate with several types of registries.

## Getting started

**Install**

```sh
pip install furiosa-registry
```

**List up available models**

```python
import furiosa.common.thread as synchronous
import furiosa.registry as registry


# Repository where to load models from.
repository = "https://github.com/furiosa-ai/furiosa-artifacts"

# List up the available artifacts.
models: List[registry.Model] = synchronous(registry.list)(repository)

for model in models:
    print(model.name)
```

**Load models**

```python
import furiosa.common.thread as synchronous
import furiosa.registry as registry


# Repository where to load models from.
repository = "https://github.com/furiosa-ai/furiosa-artifacts"

models: registry.Model = synchronous(registry.load)(uri=repository, name="MLCommonsResNet50")

# Access the model
print(model.name)
print(model.version)
print(model.metadata.description)
```

**Print documentation about a model**

```python
import furiosa.common.thread as synchronous
import furiosa.registry as registry


# Repository where to load models from.
repository = "https://github.com/furiosa-ai/furiosa-artifacts"

print(synchronous(registry.help)(repository, "MLCommonsResNet50"))
```

## Development

**Generate artfiact JSON schema from pydantic model definition.**

When you changed model schema, you can generate modified schema via

```sh
python -c 'from furiosa.registry import Model;\
            print(Model.schema_json(indent=2), file=open("model_schema.json", "w"))'
```

See `model_schema.json`

