Skip to content

Commit

Permalink
remove code from DashboardOutputs
Browse files Browse the repository at this point in the history
  • Loading branch information
lingyielia committed Aug 2, 2024
1 parent dfd3a85 commit 1941993
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
6 changes: 3 additions & 3 deletions vizro-ai/src/vizro_ai/_vizro_ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from vizro_ai._llm_models import _get_llm_model, _get_model_name
from vizro_ai.dashboard._graph.dashboard_creation import _create_and_compile_graph
from vizro_ai.dashboard.utils import DashboardOutputs, _dashboard_code, _register_data
from vizro_ai.dashboard.utils import DashboardOutputs, _register_data
from vizro_ai.plot.components import GetCodeExplanation, GetDebugger
from vizro_ai.plot.task_pipeline._pipeline_manager import PipelineManager
from vizro_ai.utils.helper import (
Expand Down Expand Up @@ -195,8 +195,8 @@ def dashboard(
_register_data(all_df_metadata=message_res["all_df_metadata"])

if return_elements:
code = _dashboard_code(dashboard) # TODO: `_dashboard_code` to be implemented
dashboard_output = DashboardOutputs(dashboard=dashboard, code=code)
# code = _dashboard_code(dashboard) # TODO: `_dashboard_code` to be implemented
dashboard_output = DashboardOutputs(dashboard=dashboard)
return dashboard_output
else:
return dashboard
9 changes: 0 additions & 9 deletions vizro-ai/src/vizro_ai/dashboard/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ def get_df_schema(self, name: str) -> Dict[str, str]:
class DashboardOutputs:
"""Dataclass containing all possible `VizroAI.dashboard()` output."""

code: str
dashboard: vm.Dashboard


Expand All @@ -62,11 +61,3 @@ def _register_data(all_df_metadata: AllDfMetadata) -> vm.Dashboard:

for name, metadata in all_df_metadata.all_df_metadata.items():
data_manager[name] = metadata.df


def _dashboard_code(dashboard: vm.Dashboard) -> str:
"""Generate dashboard code from dashboard object."""
try:
return dashboard.to_python()
except AttributeError:
return "Dashboard code generation is coming soon!"

0 comments on commit 1941993

Please sign in to comment.