Open clami66 opened 1 month ago
Hi @clami66,
Thank you for reporting the issue. I would try to split widgets code into separate cells. At least I would put prediction code in the separate cell:
if run_pred.clicked:
preds = predict(model_type.value, n_predictions.value, n_recycles.value, use_dropout.value)
I'm glad that switching Numeric
to Select
is solving the issue for now. I would need more time to dig into this issue.
BTW, are you happy with your web app created in Mercury? :)
Hi @pplonski
Thanks for the quick response! I probably over-simplified the code, the "prediction" code is already in its own cell. So in the example above it would be on its own in cell 2, then cell 3 with the plots. So that unfortunately doesn't fix it.
The current draft of the notebook is already public, so you can also take a look at it yourself here if you'd like.
BTW, are you happy with your web app created in Mercury? :)
I'm very happy with the app, thanks! I think it's a good alternative to a colab notebook, especially if you want to host it on your own server and don't want people to be able to edit the code.
I am building an application on mercury v.2.4.3. A simplified version of the interface is as follows:
Cell 1:
Cell 2:
My understanding is that, after getting the results from Cell 1, changing the selection on Cell 2 should only update the plots.
This is fine if I don't change any of the settings in Cell 1 before launching the prediction.
However, if I have changed
n_predictions
orn_recycles
from, e.g. 1 to 2, before running the predictor, then both cells are re-executed, even when I just select a different plot in Cell 2 (i.e. the menu refreshes back to a stage where I should click on therun_pred
button). This doesn't happen for widgets of other kinds (checkboxes or dropdown menus).I have run the server with
mercury run --verbose
and in the logs I can see:What I think is happening is that changing from the default values in
mr.Numeric
widgets will permanently cause them tho show as updated (updated=True
as per the logs), even when they are not.So far, I have fixed this by replacing al
mr.Numeric
widgets tomr.Select
, which fixes the issue. But it would be great to know if this is an expected behavior, or if I'm using the numeric widgets incorrectly.Thanks!