-
Notifications
You must be signed in to change notification settings - Fork 15
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
Refactor analysis vii #372
Conversation
@@ -41,7 +41,7 @@ | |||
# TODO show more info about the preprocessing steps | |||
display_preprocessing_info(dataset.preprocessing_info) | |||
|
|||
if c12.button("Reset all Preprocessing steps", key="_reset_preprocessing"): | |||
if c12.button("❌ Reset all Preprocessing steps", key="_reset_preprocessing"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯 👌
elif "plotly" in str(type(artifact)): | ||
elif "plotly" in str( | ||
type(artifact) | ||
): # TODO can there be non-plotly types here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for now i don't think so
@@ -88,9 +88,9 @@ def llm_config(): | |||
st.info("Create a Volcano plot first using the 'Analysis' page.") | |||
st.stop() | |||
|
|||
volcano_plot, parameter_dict = st.session_state[StateKeys.LLM_INPUT] | |||
volcano_plot, plot_parameters = st.session_state[StateKeys.LLM_INPUT] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't this be analysis parameters, if we ever generalize to all analyses being interpretable by LLM?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes but for now it's tied to the volcano, that's we I chose to name it like so
def display_figure(plot: PlotlyObject) -> None: | ||
"""Display plotly or seaborn figure.""" | ||
try: | ||
st.plotly_chart(plot.update_layout(plot_bgcolor="white")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not set the bgcolor. Having transparent backgrounds by default is a good thing from my point of view. If this is just to select the correct st function, no update_layout is needed.
except AttributeError: | ||
plot.savefig(buffer, format=format) | ||
plot.write_image(file=buffer, format=file_format) | ||
except AttributeError: # TODO figure out what else "plot" can be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seaborn apparently
Feature drop:
allow to save also statistical analysis, allow to download the resulting data.
Some frontend eye candy, and a refactoring of the frontend methods to be more DRY