Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support named outcomes #187

Open
crasanders opened this issue Nov 7, 2022 · 0 comments
Open

Support named outcomes #187

crasanders opened this issue Nov 7, 2022 · 0 comments

Comments

@crasanders
Copy link
Contributor

crasanders commented Nov 7, 2022

Currently tell messages have the following format:

{'type': 'tell', 
'message': {'config': {'par1': [123], 'par2': [456]}, 
            'outcome': 789, 
            'model_data': True}, 
'extra_info': {}}

This format only allows for a single, unnamed outcome, and while you can specify multiple outcome types in configs, there is no way to name them. We would like to support multiple named outcomes, with the parameter and outcome names being indicated by the config. For example, we could specify named outcomes in a config like so:

[common]
parnames = [par1, par2]
lb = [0, 1]
ub = [2, 3]
outcome_names = [out1, out2]
outcome_types = [binary, continuous]

And specify named outcomes in tell messages like so:

{'type': 'tell', 
'message': {'config': {'par1': [123], 'par2': [456]}, 
            'outcome': {'out1': [0], 'out2': [789]},
            'model_data': True}, 
'extra_info': {}}

(The server should check whether outcome is a dictionary or a list/scalar to determine if it should use the new or old functionality.)

This would require changes to server.configure, server.tell, and server._config_to_tensor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant