Packages

case class NodeShape extends 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 NodeShape 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
Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NodeShape
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def asBundle: bundle.NodeShape

    Convert to bundle shape.

    Convert to bundle shape.

    returns

    bundle shape

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def bundleShape: bundle.NodeShape

    Get the bundle protobuf shape.

    Get the bundle protobuf shape.

    returns

    bundle protobuf shape

  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. def getInput(port: String): Option[Socket]

    * Get an optional input by the port name.


    * Get an optional input by the port name.


    * @param port name of the port
 * @return optional socket for the named port


  11. def getOutput(port: String): Option[Socket]

    * Get an optional output by the port name.


    * Get an optional output by the port name.


    * @param port name of the port
 * @return optional socket for the named port


  12. def input(port: String): Socket

    * Get an input by the port name.


    * Get an input by the port name.


    * @param port name of port
 * @return socket for named port


  13. val inputLookup: Map[String, Socket]
  14. val inputs: Seq[Socket]
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. def output(port: String): Socket

    * Get an output by the port name.


    * Get an output by the port name.


    * @param port name of port
 * @return socket for named port


  20. val outputLookup: Map[String, Socket]
  21. val outputs: Seq[Socket]
  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

  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

  24. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. def withInput(port: String, name: String): NodeShape

    * Add an input socket to the shape.


    * Add an input socket to the shape.


    * @param port port of input socket
 * @param name name of input socket
 * @return copy of the shape with input socket added


  29. def withOutput(port: String, name: String): NodeShape

    * Add an output socket to the shape.


    * Add an output socket to the shape.


    * @param port port of output socket
 * @param name name of output socket
 * @return copy of the shape with output socket added


  30. def withStandardIO(inputName: String, outputName: String): NodeShape

    Add standard input/output sockets to the shape.

    Add standard input/output sockets to the shape.

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

    inputName

    name of the input socket

    outputName

    name of the output socket

    returns

    copy of the shape with standard input/output sockets added

  31. def withStandardInput(name: String): NodeShape

    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

  32. def withStandardOutput(name: String): NodeShape

    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

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped