aepsych.server¶
Submodules¶
aepsych.server.server module¶
- aepsych.server.server.get_next_filename(folder, fname, ext)[source]¶
Generates appropriate filename for logging purposes.
- class aepsych.server.server.AEPsychServer(socket=None, database_path=None)[source]¶
Bases:
object
Server for doing black box optimization using gaussian processes. :keyword socket – socket object that implements send and receive for json: :keyword messages (default: DummySocket()). :keyword TODO actually make an abstract interface to subclass from here:
- serve()[source]¶
Run the server. Note that all configuration outside of socket type and port happens via messages from the client. The server simply forwards messages from the client to its setup, ask and tell methods, and responds with either acknowledgment or other response as needed. To understand the server API, see the docs on the methods in this class.
- Returns:
None
- Raises:
RuntimeError – if a request from a client has no request type
RuntimeError – if a request from a client has no known request type
TODO make things a little more robust to bad messages from client; this – requires resetting the req/rep queue status.
- Return type:
None
- property strat¶
- property config¶
- property parnames¶
- property n_strats¶
- property can_pregen_ask¶
aepsych.server.sockets module¶
Module contents¶
- class aepsych.server.AEPsychServer(socket=None, database_path=None)[source]¶
Bases:
object
Server for doing black box optimization using gaussian processes. :keyword socket – socket object that implements send and receive for json: :keyword messages (default: DummySocket()). :keyword TODO actually make an abstract interface to subclass from here:
- serve()[source]¶
Run the server. Note that all configuration outside of socket type and port happens via messages from the client. The server simply forwards messages from the client to its setup, ask and tell methods, and responds with either acknowledgment or other response as needed. To understand the server API, see the docs on the methods in this class.
- Returns:
None
- Raises:
RuntimeError – if a request from a client has no request type
RuntimeError – if a request from a client has no known request type
TODO make things a little more robust to bad messages from client; this – requires resetting the req/rep queue status.
- Return type:
None
- property strat¶
- property config¶
- property parnames¶
- property n_strats¶
- property can_pregen_ask¶