Skip to main content

PretrainedModel

The Opni system has the ability to make use of pretrained nulog models. Currently we provide a pretrained model for the Kubernetes control plane. The configuration for pretrained models is controlled by the PretrainedModel resource. This resource is then referenced by the OpniCluster resource to deploy the model

example.yaml

apiVersion: opni.io/v1beta1
kind: PretrainedModel
metadata:
name: control-plane
namespace: opni
spec:
source:
http:
url: "https://opni-public.s3.us-east-2.amazonaws.com/pretrain-models/control-plane-model-v0.1.2.zip"
hyperparameters:
modelThreshold: "0.6"
minLogTokens: 4
isControlPlane: "true"

Custom Resource Specs

PretrainedModelSpec

FieldRequiredTypeDescription
sourceyesModelSourceA reference to the location of the pretrained model files
hyperparametersyesmapAn optional map of hyperparameters to pass to the model. Values must be integers or strings. Keys must be strings

ModelSource

FieldRequiredTypeDescription
httpNoHTTPSourceA reference to a http location service the model tarball. If this is not provided a container source must be.
containerNoContainerSourceA reference to a CRI image containing a pretrained model at /model/model.tar.gz. If this is not provided a http source must be

HTTPSource

FieldRequiredTypeDescription
urlYesstringThe URL to download the pretrained model from

ContainerSource

FieldRequiredTypeDescription
imageYesstringThe CRI image to use
imagePullSecretsNoLocalObjectReference arrayList of secrets in the same namespace to use for pulling the image