Properties

Link copied to clipboard
open val coroutineContext: CoroutineDispatcher

Functions

Link copied to clipboard
abstract suspend fun calculate(module: Module<T, V>, inputValue: I, executionContext: ExecutionContext, reportProgress: suspend (current: Int, total: Int, message: String?) -> Unit): O

Implement this in your models. Call reportProgress whenever you want to emit a progress update.

Link copied to clipboard
abstract fun create(executionContext: ExecutionContext): Module<T, V>
Link copied to clipboard
open fun fit(module: Module<T, V>, inputValue: I, executionContext: ExecutionContext): Flow<ModelExecutionResult<O>>

Default implementation that wraps calculate into a Flow and emits Processing / Progress / Done / Error.

Link copied to clipboard
abstract fun modelCard(): ModelCard