moe.writer package

moe.writer.echoer module

The echoer module contains an implementation of Writer which prints strings to stdout.

class moe.writer.echoer.Echoer(stream=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)[source]

Bases: object

Writer that prints strings to a given stream.

Parameters:stream (object, optional) – Defaults to sys.stdout. Stream to which to write.
set_stream(stream)[source]

Define the stream to which to write the strings.

Parameters:stream (object) – Stream to which to write to.
Returns:The Echoer instance
Return type:object
write(string)[source]

Write the string to a given stream

Parameters:string (str) – string to write.
Return type:None