Skip to content

Commit 40cdd3f

Browse files
codeloopahosler
authored andcommitted
move from datapane to report_creator
1 parent 478f2c2 commit 40cdd3f

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

ads/opctl/operator/lowcode/forecast/model/ml_forecast.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,13 @@ def _generate_report(self):
160160
"""
161161
Generates the report for the model
162162
"""
163-
import datapane as dp
163+
import report_creator as rc
164164
from utilsforecast.plotting import plot_series
165165

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

184184
# Section 2: MlForecast Model Parameters
185-
sec2_text = dp.Text(
186-
"## MlForecast Model Parameters \n"
187-
"These are the parameters used for the MlForecast model."
185+
sec2_text = rc.Block(
186+
rc.Heading("MlForecast Model Parameters", level=2),
187+
rc.Text("These are the parameters used for the MlForecast model.")
188188
)
189+
189190
blocks = [
190-
dp.HTML(
191-
s_id[1],
191+
rc.Html(
192+
str(s_id[1]),
192193
label=s_id[0],
193194
)
194195
for _, s_id in enumerate(self.model_parameters.items())
195196
]
196-
sec_2 = dp.Select(blocks=blocks) if len(blocks) > 1 else blocks[0]
197+
sec_2 = rc.Select(blocks=blocks)
197198

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

0 commit comments

Comments
 (0)