Run:AI Model Streamer for Azure
raw JSON → 0.15.9 verified Fri May 01 auth: no python
A library for streaming AI model artifacts from Azure Blob Storage to GPU nodes in Run:AI environments. Supports asynchronous prefetching, caching, and direct loading into PyTorch/TensorFlow. Current version 0.15.9 with weekly releases.
pip install runai-model-streamer-azure Common errors
error ModuleNotFoundError: No module named 'runai_model_streamer' ↓
cause Missing dependency: runai-model-streamer must be installed separately.
fix
pip install runai-model-streamer
error AttributeError: 'StreamConfig' object has no attribute 'block_size' ↓
cause block_size renamed to read_chunk_size in 0.14.0.
fix
Use 'read_chunk_size' instead of 'block_size' in StreamConfig.
error azure.core.exceptions.ClientAuthenticationError: No connection string supplied. ↓
cause Missing or empty AZURE_STORAGE_CONNECTION_STRING environment variable.
fix
Set AZURE_STORAGE_CONNECTION_STRING to a valid Azure Blob Storage connection string.
Warnings
breaking Version 0.13.0 changed the base class of AzureModelStreamer; custom subclasses must inherit from the new base or override fetch() explicitly. ↓
fix Update subclasses: inherit from runai_model_streamer._base.BaseStreamer instead.
deprecated The 'StreamConfig.block_size' parameter will be removed in 0.16.0; use 'StreamConfig.read_chunk_size' instead. ↓
fix Replace block_size with read_chunk_size in StreamConfig.
gotcha Connection string authentication (AZURE_STORAGE_CONNECTION_STRING) is required; using DefaultAzureCredential silently fails if no connection string is set. ↓
fix Set environment variable AZURE_STORAGE_CONNECTION_STRING or pass connection_string explicitly.
Imports
- AzureModelStreamer wrong
from runai.model_streamer.azure import ...correctfrom runai_model_streamer_azure import AzureModelStreamer - StreamConfig
from runai_model_streamer_azure import StreamConfig
Quickstart
from runai_model_streamer_azure import AzureModelStreamer, StreamConfig
config = StreamConfig(
container="my-models",
blob_prefix="models/resnet50/",
connection_string=os.environ.get("AZURE_STORAGE_CONNECTION_STRING", "")
)
streamer = AzureModelStreamer(config)
local_path = streamer.fetch("model.pt")
print(local_path)