To upload a custom model to RagaAI Prism, follow these steps:
from raga import*import datetime# Generate a unique run namerun_name ="run_name"# Initialize a test sessiontest_session =TestSession( project_name="project_name", run_name=run_name, access_key="", # Add your access key secret_key="", # Add your secret key host="host_name")# Define infrastructure parametersinfra_params ={"minReplicas":"1","maxReplicas":"1","workGroup":"cpu","maxMemoryLimit":"3000Mi","maxCpuLimit":"3000m","minMemoryLimit":"3000Mi","minCpuLimit":"3000m",}# Define input and output functionsdefinput_function():return""defoutput_function():return""# Create and load the modelmodel =Model( test_session=test_session, name="model-name", version="v1", description="model-description", docker_image="model-image", infra_params=infra_params, config_params={}, input_func=input_function, output_func=output_function)model.load()
This script sets up and uploads a custom model using the RagaAI Prism platform, allowing you to specify model details, infrastructure, and I/O functions.
Note: Currently, model upload requires the model code to be present and built locally. An upcoming feature will allow you to upload a model directly using a Docker Hub path.