Module: types
StorageId
Bases: StrEnum
Enum for the different types of storage capabilities within ritual's
services. Models/Artifacts can be stored in different storage backends.
Attributes:
Name | Type | Description |
---|---|---|
Local |
str
|
Local storage |
Huggingface |
str
|
Huggingface model hub |
Arweave |
str
|
Arewave storage |
Source code in src/infernet_ml/resource/types.py
to_storage_id_int()
Convert the StorageId to StorageIdInt
Returns:
Name | Type | Description |
---|---|---|
StorageIdInt |
StorageIdInt
|
The StorageIdInt equivalent of the StorageId |
Source code in src/infernet_ml/resource/types.py
StorageIdInt
Bases: IntEnum
Enum for the different types of storage capabilities within infernet.
The int version of this model is simply used for serialization purposes on web3.py. It's more gas-optimized to send an int over the wire.
Attributes:
Name | Type | Description |
---|---|---|
Local |
int
|
Local storage |
Huggingface |
int
|
Huggingface model hub |
Arweave |
int
|
Arewave storage |
Source code in src/infernet_ml/resource/types.py
to_storage_id()
Convert the StorageIdInt to StorageId, this is the inverse of the to_storage_id_int method, and is used in deserialization of on-chain data.
Returns:
Name | Type | Description |
---|---|---|
StorageId |
StorageId
|
The StorageId equivalent of the StorageIdInt |