ml.combust.bundle.dsl

Shape

case class Shape(_shape: bundle.Shape.Shape = ...) extends WritableShape with Product with Serializable

Class for holding the input fields and output fields of a Node. The shape also holds information for connecting the input/output fields to the underlying ML model.

A Shape contains input and output sockets. Sockets map field data to certain functionality within a Model. For instance, say we want to run a "label" field through a string indexer and have the result output to the field "label_name". We could wire up the node like so:

scala> import ml.bundle.dsl._
scala> Shape().withInput("label", "input"). // connect the "label" field to the model input
         withOutput("label_name", "output") // connect the model output to the "label_name" field

Or more concisely:

scala> import ml.bundle.dsl._
scala> Shape().withStandardIO("label", "label_name") // shorthand for the above code
_shape

protobuf shape object containing the shape information

Linear Supertypes
Serializable, Serializable, Product, Equals, WritableShape, ReadableShape, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Shape
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. WritableShape
  7. ReadableShape
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Shape(_shape: bundle.Shape.Shape = ...)

    _shape

    protobuf shape object containing the shape information

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def bundleShape: bundle.Shape.Shape

    Create a protobuf shape.

    Create a protobuf shape.

    returns

    protobuf shape

    Definition Classes
    ShapeReadableShape
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  12. def getInput(port: String): Option[Socket]

    Get an optional input by the port name.

    Get an optional input by the port name.

    port

    name of the port

    returns

    optional socket for the named port

    Definition Classes
    ShapeReadableShape
  13. def getOutput(port: String): Option[Socket]

    Get an optional input by the port name.

    Get an optional input by the port name.

    port

    name of the port

    returns

    optional socket for the named port

    Definition Classes
    ShapeReadableShape
  14. def input(port: String): Socket

    Get an input by the port name.

    Get an input by the port name.

    port

    name of port

    returns

    socket for named port

    Definition Classes
    ShapeReadableShape
  15. def inputs: Seq[Socket]

    Get list of all inputs.

    Get list of all inputs.

    returns

    list of inputs

    Definition Classes
    ShapeReadableShape
  16. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  20. def output(port: String): Socket

    Get an output by the port name.

    Get an output by the port name.

    port

    name of port

    returns

    socket for named port

    Definition Classes
    ShapeReadableShape
  21. def outputs: Seq[Socket]

    Get list of all outputs.

    Get list of all outputs.

    returns

    list of all outputs

    Definition Classes
    ShapeReadableShape
  22. def standardInput: Socket

    Get the standard input socket.

    Get the standard input socket.

    The standard input socket is on port "input".

    returns

    standard input socket

    Definition Classes
    ReadableShape
  23. def standardOutput: Socket

    Get the standard output socket.

    Get the standard output socket.

    The standard output socket is on port "output".

    returns

    standard output socket

    Definition Classes
    ReadableShape
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  25. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. def withInput(name: String, port: String): Shape.this.type

    Add an input socket to the shape.

    Add an input socket to the shape.

    name

    name of input socket

    port

    port of input socket

    returns

    copy of the shape with input socket added

    Definition Classes
    ShapeWritableShape
  29. def withOutput(name: String, port: String): Shape.this.type

    Add an output socket to the shape.

    Add an output socket to the shape.

    name

    name of output socket

    port

    port of output socket

    returns

    copy of the shape with output socket added

    Definition Classes
    ShapeWritableShape
  30. def withStandardIO(nameInput: String, nameOutput: String): Shape.this.type

    Add standard input/output sockets to the shape.

    Add standard input/output sockets to the shape.

    This is the same as calling WritableShape#withStandardInput and WritableShape#withStandardOutput.

    nameInput

    name of the input socket

    nameOutput

    name of the output socket

    returns

    copy of the shape with standard input/output sockets added

    Definition Classes
    WritableShape
  31. def withStandardInput(name: String): Shape.this.type

    Add standard input socket to the shape.

    Add standard input socket to the shape.

    name

    name of standard input socket

    returns

    copy of the shape with standard input socket added

    Definition Classes
    WritableShape
  32. def withStandardOutput(name: String): Shape.this.type

    Add standard output socket to the shape.

    Add standard output socket to the shape.

    name

    name of standard output socket

    returns

    copy of the shape with standard output socket added

    Definition Classes
    WritableShape

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from WritableShape

Inherited from ReadableShape

Inherited from AnyRef

Inherited from Any

Ungrouped