Skip to content

Commit

Permalink
move from datapane to report_creator
Browse files Browse the repository at this point in the history
  • Loading branch information
codeloop committed Apr 29, 2024
1 parent bb5d879 commit 86d5790
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions ads/opctl/operator/lowcode/forecast/model/ml_forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ def _generate_report(self):
"""
Generates the report for the model
"""
import datapane as dp
import report_creator as rc
from utilsforecast.plotting import plot_series

# Section 1: Forecast Overview
sec1_text = dp.Text(
"## Forecast Overview \n"
"These plots show your forecast in the context of historical data."
sec1_text = rc.Block(
rc.Heading("Forecast Overview", level=2),
rc.Text("These plots show your forecast in the context of historical data.")
)
sec_1 = _select_plot_list(
lambda s_id: plot_series(
Expand All @@ -182,21 +182,22 @@ def _generate_report(self):
)

# Section 2: MlForecast Model Parameters
sec2_text = dp.Text(
"## MlForecast Model Parameters \n"
"These are the parameters used for the MlForecast model."
sec2_text = rc.Block(
rc.Heading("MlForecast Model Parameters", level=2),
rc.Text("These are the parameters used for the MlForecast model.")
)

blocks = [
dp.HTML(
s_id[1],
rc.Html(
str(s_id[1]),
label=s_id[0],
)
for _, s_id in enumerate(self.model_parameters.items())
]
sec_2 = dp.Select(blocks=blocks) if len(blocks) > 1 else blocks[0]
sec_2 = rc.Select(blocks=blocks)

all_sections = [sec1_text, sec_1, sec2_text, sec_2]
model_description = dp.Text("mlforecast is a framework to perform time series forecasting using machine learning models"
model_description = rc.Text("mlforecast is a framework to perform time series forecasting using machine learning models"
"with the option to scale to massive amounts of data using remote clusters."
"Fastest implementations of feature engineering for time series forecasting in Python."
"Support for exogenous variables and static covariates.")
Expand Down

0 comments on commit 86d5790

Please sign in to comment.