Skip to content

Commit

Permalink
Conditional and Error Pipelines (#143)
Browse files Browse the repository at this point in the history
* update output inputs name to steps, check for cycles, add batch, add left join to APIs

* add outer joins

* error topic handling

* lint
  • Loading branch information
ukclivecox authored Apr 10, 2022
1 parent c89ae5a commit 6f83767
Show file tree
Hide file tree
Showing 44 changed files with 2,605 additions and 972 deletions.
250 changes: 170 additions & 80 deletions apis/mlops/chainer/chainer.pb.go

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions apis/mlops/chainer/chainer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ message PipelineStepUpdate {
enum PipelineJoinType {
Unknown = 0;
Inner = 1;
Outer = 2;
}
// https://docs.google.com/document/d/1tX-uaOvngx1RpEyWEZ4EbEcU8D0OgYuRWVb2UAi85n4/edit
// Pipeline Resource example, e.g. transform.outputs.traffic
Expand All @@ -35,8 +36,14 @@ message PipelineStepUpdate {
PipelineJoinType ty = 3;
bool passEmptyResponses = 4; // Forward empty response to following steps, default false
optional uint32 joinWindowMs = 5; // Join window millisecs, some nozero default (TBD)
repeated string tensorNames = 6; // optional list of output tensors - must be same cardinality as tensors in inputs
map<string,string> tensorMap = 7; // optional map of tensor name mappings
map<string,string> tensorMap = 6; // optional map of tensor name mappings
Batch batch = 7; // Batch settings
}

message Batch {
optional uint32 size = 1;
optional uint32 windowMs = 2;
bool rolling = 3;
}

message PipelineUpdateStatusMessage {
Expand Down
93 changes: 93 additions & 0 deletions apis/mlops/chainer/kotlin/io/seldon/mlops/chainer/BatchKt.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
//Generated by the protocol buffer compiler. DO NOT EDIT!
// source: chainer.proto

package io.seldon.mlops.chainer;

@kotlin.jvm.JvmSynthetic
inline fun batch(block: io.seldon.mlops.chainer.BatchKt.Dsl.() -> kotlin.Unit): io.seldon.mlops.chainer.ChainerOuterClass.Batch =
io.seldon.mlops.chainer.BatchKt.Dsl._create(io.seldon.mlops.chainer.ChainerOuterClass.Batch.newBuilder()).apply { block() }._build()
object BatchKt {
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
@com.google.protobuf.kotlin.ProtoDslMarker
class Dsl private constructor(
private val _builder: io.seldon.mlops.chainer.ChainerOuterClass.Batch.Builder
) {
companion object {
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _create(builder: io.seldon.mlops.chainer.ChainerOuterClass.Batch.Builder): Dsl = Dsl(builder)
}

@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _build(): io.seldon.mlops.chainer.ChainerOuterClass.Batch = _builder.build()

/**
* <code>optional uint32 size = 1;</code>
*/
var size: kotlin.Int
@JvmName("getSize")
get() = _builder.getSize()
@JvmName("setSize")
set(value) {
_builder.setSize(value)
}
/**
* <code>optional uint32 size = 1;</code>
*/
fun clearSize() {
_builder.clearSize()
}
/**
* <code>optional uint32 size = 1;</code>
* @return Whether the size field is set.
*/
fun hasSize(): kotlin.Boolean {
return _builder.hasSize()
}

/**
* <code>optional uint32 windowMs = 2;</code>
*/
var windowMs: kotlin.Int
@JvmName("getWindowMs")
get() = _builder.getWindowMs()
@JvmName("setWindowMs")
set(value) {
_builder.setWindowMs(value)
}
/**
* <code>optional uint32 windowMs = 2;</code>
*/
fun clearWindowMs() {
_builder.clearWindowMs()
}
/**
* <code>optional uint32 windowMs = 2;</code>
* @return Whether the windowMs field is set.
*/
fun hasWindowMs(): kotlin.Boolean {
return _builder.hasWindowMs()
}

/**
* <code>bool rolling = 3;</code>
*/
var rolling: kotlin.Boolean
@JvmName("getRolling")
get() = _builder.getRolling()
@JvmName("setRolling")
set(value) {
_builder.setRolling(value)
}
/**
* <code>bool rolling = 3;</code>
*/
fun clearRolling() {
_builder.clearRolling()
}
}
}
@kotlin.jvm.JvmSynthetic
inline fun io.seldon.mlops.chainer.ChainerOuterClass.Batch.copy(block: io.seldon.mlops.chainer.BatchKt.Dsl.() -> kotlin.Unit): io.seldon.mlops.chainer.ChainerOuterClass.Batch =
io.seldon.mlops.chainer.BatchKt.Dsl._create(this.toBuilder()).apply { block() }._build()
Loading

0 comments on commit 6f83767

Please sign in to comment.