Skip to content

Commit b8ab048

Browse files
committed
temporary report creator install
1 parent acfa224 commit b8ab048

File tree

8 files changed

+25
-15
lines changed

8 files changed

+25
-15
lines changed

ads/opctl/operator/lowcode/anomaly/model/base_model.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def generate_report(self):
7979
anomaly_output, test_data, elapsed_time
8080
)
8181
table_blocks = [
82-
rc.DataTable(df, label=col)
82+
rc.DataTable(df, label=col, index=True)
8383
for col, df in self.datasets.full_data_dict.items()
8484
]
8585
data_table = (
@@ -132,18 +132,18 @@ def generate_report(self):
132132
]
133133
)
134134
sec_text = rc.Heading("Train Evaluation Metrics", level=2)
135-
sec = rc.DataTable(self._evaluation_metrics(anomaly_output))
135+
sec = rc.DataTable(self._evaluation_metrics(anomaly_output), index=True)
136136
evaluation_metrics_sec = [sec_text, sec]
137137

138138
test_metrics_sections = []
139139
if total_metrics is not None and not total_metrics.empty:
140140
sec_text = rc.Heading("Test Data Evaluation Metrics", level=2)
141-
sec = rc.DataTable(total_metrics)
141+
sec = rc.DataTable(total_metrics, index=True)
142142
test_metrics_sections = test_metrics_sections + [sec_text, sec]
143143

144144
if summary_metrics is not None and not summary_metrics.empty:
145145
sec_text = rc.Heading("Test Data Summary Metrics", level=2)
146-
sec = rc.DataTable(summary_metrics)
146+
sec = rc.DataTable(summary_metrics, index=True)
147147
test_metrics_sections = test_metrics_sections + [sec_text, sec]
148148

149149
report_sections = (

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def _generate_report(self):
186186
rc.Text(
187187
"The following tables provide the feature attribution for the global explainability."
188188
),
189-
rc.DataTable(self.formatted_global_explanation),
189+
rc.DataTable(self.formatted_global_explanation, index=True),
190190
)
191191

192192
aggregate_local_explanations = pd.DataFrame()
@@ -202,6 +202,7 @@ def _generate_report(self):
202202
rc.DataTable(
203203
local_ex_df.div(local_ex_df.abs().sum(axis=1), axis=0) * 100,
204204
label=s_id,
205+
index=True,
205206
)
206207
for s_id, local_ex_df in self.local_explanation.items()
207208
]

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def _generate_report(self):
219219
"The following tables provide information regarding the "
220220
"chosen model for each series and the corresponding parameters of the models."
221221
),
222-
rc.DataTable(selected_df),
222+
rc.DataTable(selected_df, index=True),
223223
)
224224

225225
other_sections = [selected_models_section]
@@ -248,7 +248,7 @@ def _generate_report(self):
248248
rc.Text(
249249
"The following tables provide the feature attribution for the global explainability."
250250
),
251-
rc.DataTable(self.formatted_global_explanation),
251+
rc.DataTable(self.formatted_global_explanation, index=True),
252252
)
253253

254254
aggregate_local_explanations = pd.DataFrame()
@@ -264,6 +264,7 @@ def _generate_report(self):
264264
rc.DataTable(
265265
local_ex_df.div(local_ex_df.abs().sum(axis=1), axis=0) * 100,
266266
label=s_id,
267+
index=True,
267268
)
268269
for s_id, local_ex_df in self.local_explanation.items()
269270
]

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ def generate_report(self):
175175
rc.DataTable(
176176
df.head(5),
177177
label=s_id,
178+
index=True,
178179
)
179180
for s_id, df in self.full_data_dict.items()
180181
]
@@ -183,6 +184,7 @@ def generate_report(self):
183184
rc.DataTable(
184185
df.tail(5),
185186
label=s_id,
187+
index=True,
186188
)
187189
for s_id, df in self.full_data_dict.items()
188190
]
@@ -234,18 +236,18 @@ def generate_report(self):
234236
and not self.test_eval_metrics.empty
235237
):
236238
sec7_text = rc.Heading("Test Data Evaluation Metrics", level=2)
237-
sec7 = rc.DataTable(self.test_eval_metrics)
239+
sec7 = rc.DataTable(self.test_eval_metrics, index=True)
238240
test_metrics_sections = test_metrics_sections + [sec7_text, sec7]
239241

240242
if summary_metrics is not None and not summary_metrics.empty:
241243
sec8_text = rc.Heading("Test Data Summary Metrics", level=2)
242-
sec8 = rc.DataTable(summary_metrics)
244+
sec8 = rc.DataTable(summary_metrics, index=True)
243245
test_metrics_sections = test_metrics_sections + [sec8_text, sec8]
244246

245247
train_metrics_sections = []
246248
if self.eval_metrics is not None and not self.eval_metrics.empty:
247249
sec9_text = rc.Heading("Training Data Metrics", level=2)
248-
sec9 = rc.DataTable(self.eval_metrics)
250+
sec9 = rc.DataTable(self.eval_metrics, index=True)
249251
train_metrics_sections = [sec9_text, sec9]
250252

251253
forecast_plots = []

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ def _generate_report(self):
367367
)
368368
)
369369
all_model_states = pd.concat(model_states, axis=1)
370-
sec5 = rc.DataTable(all_model_states)
370+
sec5 = rc.DataTable(all_model_states, index=True)
371371

372372
all_sections = all_sections + [sec5_text, sec5]
373373

@@ -382,13 +382,14 @@ def _generate_report(self):
382382
rc.Text(
383383
"The following tables provide the feature attribution for the global explainability."
384384
),
385-
rc.DataTable(self.formatted_global_explanation),
385+
rc.DataTable(self.formatted_global_explanation, index=True),
386386
)
387387

388388
blocks = [
389389
rc.DataTable(
390390
local_ex_df.drop("Series", axis=1),
391391
label=s_id,
392+
index=True,
392393
)
393394
for s_id, local_ex_df in self.local_explanation.items()
394395
]

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def _generate_report(self):
299299
)
300300
all_model_states = pd.concat(model_states, axis=1)
301301
if not all_model_states.empty:
302-
sec5 = rc.DataTable(all_model_states)
302+
sec5 = rc.DataTable(all_model_states, index=True)
303303
all_sections = all_sections + [sec5_text, sec5]
304304

305305
if self.spec.generate_explanations:
@@ -320,7 +320,7 @@ def _generate_report(self):
320320
rc.Text(
321321
"The following tables provide the feature attribution for the global explainability."
322322
),
323-
rc.DataTable(self.formatted_global_explanation),
323+
rc.DataTable(self.formatted_global_explanation, index=True),
324324
)
325325

326326
aggregate_local_explanations = pd.DataFrame()
@@ -336,6 +336,7 @@ def _generate_report(self):
336336
rc.DataTable(
337337
local_ex_df.div(local_ex_df.abs().sum(axis=1), axis=0) * 100,
338338
label=s_id,
339+
index=True,
339340
)
340341
for s_id, local_ex_df in self.local_explanation.items()
341342
]

ads/opctl/operator/lowcode/pii/model/report.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ def _make_stats_card(self):
251251
rc.DataTable(
252252
build_entity_df(self.spec.entities, id=self.spec.id),
253253
label="Resolved Entities",
254+
index=True,
254255
)
255256
)
256257
return rc.Group(blocks=stats, label="STATS")
@@ -418,7 +419,7 @@ def _make_summary_stats_card(self) -> rc.Group:
418419
if self.report_spec.run_summary.show_sensitive_info:
419420
entites_df = self._build_total_entity_df()
420421
summary_stats.append(rc.Heading("Resolved Entities", level=3))
421-
summary_stats.append(rc.DataTable(entites_df))
422+
summary_stats.append(rc.DataTable(entites_df, index=True))
422423
return rc.Group(blocks=summary_stats, label="STATS")
423424

424425
def _make_yaml_card(self) -> rc.Group:

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ forecast = [
154154
"statsmodels",
155155
"plotly",
156156
"oracledb",
157+
"report-creator @ https://github.com/darenr/report_creator.git",
157158
]
158159
anomaly = [
159160
"oracle_ads[opctl]",
@@ -162,6 +163,7 @@ anomaly = [
162163
"oracle-automlx[classic]==23.4.1",
163164
"oracledb",
164165
"datapane",
166+
"report-creator @ https://github.com/darenr/report_creator.git",
165167
]
166168
feature-store-marketplace = [
167169
"oracle-ads[opctl]",
@@ -178,6 +180,7 @@ pii = [
178180
"scrubadub_spacy",
179181
"spacy-transformers==1.2.5",
180182
"spacy==3.6.1",
183+
"report-creator @ https://github.com/darenr/report_creator.git",
181184
]
182185
llm = ["langchain-community<0.0.32", "langchain>=0.1.10,<0.1.14", "evaluate>=0.4.0"]
183186
aqua = ["jupyter_server"]

0 commit comments

Comments
 (0)