Skip to main content

//clika-runtime/io.clika.modelverse/StageEvent

StageEvent

[common]
data class StageEvent(val kind: StageEventKind, val stage: String, val slot: Int, val tStartNs: Long, val tEndNs: Long, val text: String = "", val isFinal: Boolean = false, val language: String = "", val mediaCount: Int = 0, val samples: FloatArray? = null, val sampleRate: Int = 0)

One event of a model's pipeline, reported to a StageObserver on the stage's own thread. stage names the stage (tokenize, prefill, decode and detokenize on a text model, vision when a tower runs); slot is the request's slot when the stage serves several at once, -1 otherwise; the times are the runtime's monotonic clock in nanoseconds. A payload field is empty, or null, when the kind carries none.

Constructors​

StageEvent[common]
constructor(kind: StageEventKind, stage: String, slot: Int, tStartNs: Long, tEndNs: Long, text: String = "", isFinal: Boolean = false, language: String = "", mediaCount: Int = 0, samples: FloatArray? = null, sampleRate: Int = 0)

Properties​

NameSummary
isFinal[common]
val isFinal: Boolean = false
kind[common]
val kind: StageEventKind
language[common]
val language: String
mediaCount[common]
val mediaCount: Int = 0
sampleRate[common]
val sampleRate: Int = 0
samples[common]
val samples: FloatArray? = null
slot[common]
val slot: Int
stage[common]
val stage: String
tEndNs[common]
val tEndNs: Long
text[common]
val text: String
tStartNs[common]
val tStartNs: Long