service

class pydsef.service.Registry[source]

Class for registering experiment funcionts.

static connect(fun)[source]

Decoration for registering ‘connect’ functions. These functions are run when the Jupyter server connects to the master node over RPyC.

static disconnect(fun)[source]

Decoration for registering ‘disconnect’ functions. These functions are run when the Jupyter server disconnects from the RPyC server running on the master node.

static experiment(port=18861)[source]

Class decoration for registering an experiment service. This automatically adds an archive function to the class as well as starting a ThreadedServer RPyC instance.

static launch(fun)[source]

Decoration for registering ‘launch’ functions. These functions are run during the launch phase of each trial in an experiment.

static run(fun)[source]

Deocration for registering a ‘run’ function. You can only register one of these. This function is executed during the run phase of each trial in an experiment.

static setup(fun)[source]

Decoration for registering ‘setup’ functions. These functions are run during the setup phase of each trial in an experiment.

static teardown(fun)[source]

Decoration for registering ‘teardown’ functions. These functions are run during the teardown phase of each trial in an experiment.

class pydsef.service.Service(conn)[source]

Base class for the experimental run object. None of these methods are meant to be called by a user. They are called at the appropiate time during an experiment.

exposed_launch(*args, **kwargs)[source]

This exposes a ‘launch’ function on the RPyC service. During an experiment this is connected to from Jupyter and executed on the master node. All registered ‘launch’ functions will be called when this function is called.

exposed_run(*args, **kwargs)[source]

This exposes a ‘run’ function on the RPyC service. During an experiment this is connected to from Jupyter and executed on the master node. The registered ‘run’ function will be called when this function is called.

exposed_setup(exp_dict, conf)[source]

This exposes a ‘setup’ function on the RPyC service. During an experiment this is connected to from Jupyter and executed on the master node. All registered ‘setup’ functions will be called when this function is called. This function additionally defines member variables using the passed in exp_dict.

exposed_teardown(*args, **kwargs)[source]

This exposes a ‘teardown’ function on the RPyC service. During an experiment this is connected to from Jupyter and executed on the master node. All registered ‘teardown’ functions will be called when this function is called.

on_connect(*args, **kwargs)[source]

Needed by rpyc.Service superclass. This calls all registered ‘connect’ functions at the appropiate time.

on_disconnect(*args, **kwargs)[source]

Needed by rpyc.Service superclass. This calls all registered ‘disconnect’ functions at the appropiate time.