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

Dashboard is not updating the Select value changes when the sidebar does #383

Open
ranggakd opened this issue Oct 26, 2023 · 2 comments
Open

Comments

@ranggakd
Copy link
Contributor

I'm having a problem with the Select widget value that is not updating in the dashboard but it's updated in the sidebar.

I'm working with I believe Tex or KeTeX syntax. For example, take a look at these choices:

# dataset branching
dataset_mapping = {
    'Number Nature': {
        'Non-zero Real Numbers':{
            '$10 \cdot \cos(x) + 1$':{
                ('AutoReg', 'OffsetModel 1%'): 1
            },
            '$10 \cdot \sin(x) + 1$':{
                ('AutoReg', 'OffsetModel 1%'): 2
            }
        },
        'Real Numbers with Zeros':{ #TODO
            '$\\text{ int }(10 \cdot \cos(x))$':{
                ('AutoReg', 'OffsetModel 1%'): 1
            },
            '$\\text{ int }(10 \cdot \sin(x))$':{
                ('AutoReg', 'OffsetModel 1%'): 2
            }
        }
    }
}

When we navigate to Number Nature->Non-zero Real Numbers->$10 \cdot \cos(x) + 1$ or $10 \cdot \sin(x) + 1$ it will update both the sidebar and the dashboard but it is a different outcome when it comes to Number Nature->Real Numbers with Zeros->$\\text{ int }(10 \cdot \cos(x))$ or $\\text{ int }(10 \cdot \sin(x))$

The problem only occurred when I encountered \\ in the string of choices like Real Numbers with Zeros, Very Small Numbers, Very Large Numbers, Magnitude and Sigmoidal/Logistic Trend. Other than that it will work out just fine.

I provide my Notebook Gist for reproducible bugs. Go to the dataset_mapping for inquiry and look at how the same syntax is working just fine in the native markdown below it (summary part).

mercury_select_bugs

@pplonski
Copy link
Contributor

Hi @ranggakd,

Thank you for reporting the issue. Your bug description is very good, we rarely get such good descriptions with steps and code for bug reproduction 👍 🥇

I will try to look into it in the next week, we are between conferences and presentations are still not ready ...

@ranggakd
Copy link
Contributor Author

I'm letting you know now the other way to make it work as I did was to prevent the Python reserved characters like \t and \f. I escaped them by prefixing them with another \ so they turn to be \\t or \\f for \\times, \\text and \\frac.

The best I can do right now that worked are:

  1. Change \\times into \cdot when it actually means the same thing which is multiplication.
  2. Reduce \\text as many as possible.
  3. Change \\frac with the old syntax of \over for creating fractions.

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

2 participants