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

UI: excluding output variables not working #170

Open
Rykath opened this issue Jul 12, 2022 · 0 comments
Open

UI: excluding output variables not working #170

Rykath opened this issue Jul 12, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@Rykath
Copy link
Collaborator

Rykath commented Jul 12, 2022

When excluding (extra) output variables, the UI throws the error:

The relevant encoder is: Exclude(Constant, b, steps, time)

Traceback (most recent call last):
  File "/home/oswell/ThreeSidedDie/venv/lib/python3.9/site-packages/flask/app.py", line 2077, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/oswell/ThreeSidedDie/venv/lib/python3.9/site-packages/flask/app.py", line 1525, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/oswell/ThreeSidedDie/venv/lib/python3.9/site-packages/flask/app.py", line 1523, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/oswell/ThreeSidedDie/venv/lib/python3.9/site-packages/flask/app.py", line 1509, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/home/oswell/ThreeSidedDie/venv/lib/python3.9/site-packages/dash/dash.py", line 1472, in dispatch
    response.set_data(func(*args, outputs_list=outputs_list))
  File "/home/oswell/ThreeSidedDie/venv/lib/python3.9/site-packages/dash/_callback.py", line 151, in add_context
    output_value = func(*func_args, **func_kwargs)  # %% callback invoked %%
  File "/home/oswell/profit/profit/ui/app.py", line 572, in update_figure
    mesh_in, mesh_out, mesh_out_std, fit_dd_values = mesh_fit(param_slider, id_type, fit_dd, fit_num,
  File "/home/oswell/profit/profit/ui/app.py", line 857, in mesh_fit
    fit_data, fit_var = sur.predict(x_pred, add_noise_var == ['add']) # generate fit data and variance
  File "/home/oswell/profit/profit/sur/gp/gpy_surrogate.py", line 57, in predict
    ymean, yvar = self.decode_predict_data(ymean, yvar)
  File "/home/oswell/profit/profit/sur/sur.py", line 105, in decode_predict_data
    ym = enc.decode(ym)
  File "/home/oswell/profit/profit/sur/encoders.py", line 112, in decode
    x = np.insert(x, col, insert_x, axis=1)
  File "<__array_function__ internals>", line 180, in insert
  File "/home/oswell/ThreeSidedDie/venv/lib/python3.9/site-packages/numpy/lib/function_base.py", line 5351, in insert
    new[tuple(slobj)] = values
ValueError: could not broadcast input array from shape (13,1) into shape (50,1)

if the fit is run on the same data without the extra encoder (and all four outputs are fitted individually), everything works as expected.

@Rykath Rykath added the bug Something isn't working label Jul 12, 2022
@Rykath Rykath changed the title excluding output variables not working UI: excluding output variables not working Nov 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant