maintian user privacy by keeping plotly offline
This commit is contained in:
parent
68f7a31504
commit
1ef875901a
@ -191,5 +191,4 @@ def plot_feature_importance(model: Any, pair: str, dk: FreqaiDataKitchen,
|
|||||||
fig = add_feature_trace(fig, fi_df_worst, 2)
|
fig = add_feature_trace(fig, fi_df_worst, 2)
|
||||||
fig.update_layout(title_text=f"Best and worst features by importance {pair}")
|
fig.update_layout(title_text=f"Best and worst features by importance {pair}")
|
||||||
|
|
||||||
store_plot_file(fig, f"{dk.model_filename}-{label}.html", dk.data_path,
|
store_plot_file(fig, f"{dk.model_filename}-{label}.html", dk.data_path)
|
||||||
include_plotlyjs="cdn")
|
|
||||||
|
@ -602,7 +602,7 @@ def generate_plot_filename(pair: str, timeframe: str) -> str:
|
|||||||
|
|
||||||
|
|
||||||
def store_plot_file(fig, filename: str, directory: Path,
|
def store_plot_file(fig, filename: str, directory: Path,
|
||||||
auto_open: bool = False, include_plotlyjs=True) -> None:
|
auto_open: bool = False) -> None:
|
||||||
"""
|
"""
|
||||||
Generate a plot html file from pre populated fig plotly object
|
Generate a plot html file from pre populated fig plotly object
|
||||||
:param fig: Plotly Figure to plot
|
:param fig: Plotly Figure to plot
|
||||||
@ -615,7 +615,7 @@ def store_plot_file(fig, filename: str, directory: Path,
|
|||||||
|
|
||||||
_filename = directory.joinpath(filename)
|
_filename = directory.joinpath(filename)
|
||||||
plot(fig, filename=str(_filename),
|
plot(fig, filename=str(_filename),
|
||||||
auto_open=auto_open, include_plotlyjs=include_plotlyjs)
|
auto_open=auto_open)
|
||||||
logger.info(f"Stored plot as {_filename}")
|
logger.info(f"Stored plot as {_filename}")
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user