Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update colab notebooks #1182

Merged
merged 10 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion python/src/robyn/modeling/convergence/convergence.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from typing import List, Dict, Any
from robyn.modeling.entities.modeloutputs import Trial
from robyn.visualization.model_convergence_visualizer import ModelConvergenceVisualizer
import matplotlib.pyplot as plt


class Convergence:
Expand Down Expand Up @@ -67,7 +68,7 @@ def calculate_convergence(self, trials: List[Trial]) -> Dict[str, Any]:
conv_msg = self._generate_convergence_messages(errors)

# Create visualization plots
self.logger.info("Creating visualization plots")

moo_distrb_plot = self.visualizer.create_moo_distrb_plot(
dt_objfunc_cvg, conv_msg
)
Expand Down
4 changes: 0 additions & 4 deletions python/src/robyn/reporting/onepager_reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,6 @@ def generate_one_pager(
self.clustered_result, "top_solutions"
):
raise ValueError("No clustered results or top solutions available")

try:
# Try accessing 'sol_id' column if it's a DataFrame
if isinstance(self.clustered_result.top_solutions, pd.DataFrame):
Expand All @@ -438,16 +437,13 @@ def generate_one_pager(
raise ValueError(
f"Unexpected type for top_solutions: {type(self.clustered_result.top_solutions)}"
)

solution_ids = [
str(sid)
for sid in solution_ids
if sid is not None and pd.notna(sid)
]

if not solution_ids:
raise ValueError("No valid solution IDs found in top solutions")

logger.debug(f"Loading {len(solution_ids)} top solutions")

except Exception as e:
Expand Down
3 changes: 1 addition & 2 deletions python/src/robyn/robyn.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,7 @@ def generate_one_pager(self, solution_id: Optional[str] = None) -> None:
solution_ids=solution_id if solution_id else "all",
top_pareto=top_pareto,
)
# return None instead of figures
return None
return figures

except Exception as e:
logging.error("One-pager generation failed: %s", str(e))
Expand Down
Loading
Loading