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

Add checkboxes to control distributions in roulette #318

Merged
merged 2 commits into from
Feb 14, 2024

Conversation

rohanbabbar04
Copy link
Contributor

@rohanbabbar04 rohanbabbar04 commented Feb 14, 2024

Solves #127

Description

Added checkboxes to control the roulette function

  • Added three checkboxes Continuous, Discrete, and None.
  • Added handle_checkbox_change as a handler function.

An image
image

Checklist

  • Code style is correct (follows pylint and black guidelines)
  • Includes a sample plot to visually illustrate the changes (only for plot-related functions)
  • Widget states have been properly saved (only for notebooks with widgets) see for details.

minor: Solved return statement

minor: Pylint disable list comprehension
@codecov-commenter
Copy link

Codecov Report

Attention: 14 lines in your changes are missing coverage. Please review.

Comparison is base (93c141a) 80.15% compared to head (a29a5d7) 83.92%.
Report is 1 commits behind head on main.

Files Patch % Lines
preliz/unidimensional/roulette.py 48.14% 14 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #318      +/-   ##
==========================================
+ Coverage   80.15%   83.92%   +3.76%     
==========================================
  Files          34       35       +1     
  Lines        4178     4205      +27     
==========================================
+ Hits         3349     3529     +180     
+ Misses        829      676     -153     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rohanbabbar04
Copy link
Contributor Author

  • Have kept the control of checkboxes separated
  • At times, it is a tad too slow
  • Once this is approved, we may also have to change roulette.gif

@aloctavodia
Copy link
Contributor

aloctavodia commented Feb 14, 2024

Do you mean that roulette is overall slow, or the checkboxes. roulette can be slow if all (or many) distributions are active. Because it has to fit all of them to find the best fit.

@aloctavodia aloctavodia merged commit 7c784e0 into arviz-devs:main Feb 14, 2024
4 checks passed
@rohanbabbar04
Copy link
Contributor Author

Maybe....
I think ipywidgets in interactive mode are also sometimes slow...

@rohanbabbar04 rohanbabbar04 mentioned this pull request Feb 18, 2024
2 tasks
@rohanbabbar04 rohanbabbar04 deleted the roulette branch February 19, 2024 03:41
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

Successfully merging this pull request may close these issues.

None yet

3 participants