Skip to content

Commit

Permalink
Replaces def metric(): with def metric_plot(): across apps to naming …
Browse files Browse the repository at this point in the history
…conflict
  • Loading branch information
garrettgman committed Jul 8, 2024
1 parent 5c8419d commit 53e8033
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
ui.card_header("Model Metrics")

@render_plotly
def metric():
def metric_plot():
account_subset = df[df["account"] == input.account()]
if input.metric() == "ROC Curve":
return plot_auc_curve(account_subset, "is_electronics", "training_score")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
ui.card_header("Model Metrics")

@render_plotly
def metric():
def metric_plot():
account_subset = df[df["account"] == input.account()]
if input.metric() == "ROC Curve":
return plot_auc_curve(
Expand Down
2 changes: 1 addition & 1 deletion apps/problem-sets/2-basic-ui/2.4-layout-columns/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
ui.card_header("Model Metrics")

@render_plotly
def metric():
def metric_plot():
account_subset = df[df["account"] == input.account()]
if input.metric() == "ROC Curve":
return plot_auc_curve(account_subset, "is_electronics", "training_score")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def account_data():
ui.card_header("Model Metrics")

@render_plotly
def metric():
def metric_plot():
# `account_data` is called similar to an input.
if input.metric() == "ROC Curve":
return plot_auc_curve(
Expand Down
2 changes: 1 addition & 1 deletion apps/problem-sets/3-reactivity/3.1-reactive-calc/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
ui.card_header("Model Metrics")

@render_plotly
def metric():
def metric_plot():
account_subset = df[df["account"] == input.account()]
if input.metric() == "ROC Curve":
return plot_auc_curve(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def character_filter():
ui.card_header("Model Metrics")

@render_plotly
def metric():
def metric_plot():
if input.metric() == "ROC Curve":
return plot_auc_curve(
character_filter(), "is_electronics", "training_score"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def account_data():
ui.card_header("Model Metrics")

@render_plotly
def metric():
def metric_plot():
if input.metric() == "ROC Curve":
return plot_auc_curve(account_data, "is_electronics", "training_score")
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def sub_selector():
ui.card_header("Model Metrics")

@render_plotly
def metric():
def metric_plot():
if input.metric() == "ROC Curve":
return plot_auc_curve(
character_filter(), "is_electronics", "training_score"
Expand Down
2 changes: 1 addition & 1 deletion apps/problem-sets/4-dynamic-ui/4.1-render-express/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def character_filter():
ui.card_header("Model Metrics")

@render_plotly
def metric():
def metric_plot():
if input.metric() == "ROC Curve":
return plot_auc_curve(
character_filter(), "is_electronics", "training_score"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def sub_selector():
ui.card_header("Model Metrics")

@render_plotly
def metric():
def metric_plot():
if input.metric() == "ROC Curve":
return plot_auc_curve(
character_filter(), "is_electronics", "training_score"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ def sub_selector():
with ui.card():
ui.card_header("Model Metrics")

@render_plotly
def metric():
def metric_plot():
if input.metric() == "ROC Curve":
return plot_auc_curve(
character_filter(), "is_electronics", "training_score"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def sub_selector():
ui.card_header("Model Metrics")

@render_plotly
def metric():
def metric_plot():
if input.metric() == "ROC Curve":
return plot_auc_curve(
character_filter(), "is_electronics", "training_score"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def sub_selector():
ui.card_header("Model Metrics")

@render_plotly
def metric():
def metric_plot():
if input.metric() == "ROC Curve":
return plot_auc_curve(
character_filter(), "is_electronics", "training_score"
Expand Down
2 changes: 1 addition & 1 deletion apps/target-app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def sub_selector():
ui.card_header("Model Metrics")

@render_plotly
def metric():
def metric_plot():
if input.metric() == "ROC Curve":
return plot_auc_curve(
character_filter(), "is_electronics", "training_score"
Expand Down

0 comments on commit 53e8033

Please sign in to comment.