Open
Description
Ran into another error when running robyn.evaluate_models
. Full stack trace is below, issue is in the prophet decomp plot. My guess is that because my model doesn't have any factor_vars
it is throwing the concatenation error.
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[11], line 10
1 # %% Evaluate Models
2 configs = ClusteringConfig(
3 dep_var_type=DependentVarType(mmm_data.mmmdata_spec.dep_var_type),
4 cluster_by=ClusterBy.HYPERPARAMETERS,
(...) 7 weights=[1.0, 1.0, 1.0],
8 )
---> 10 robyn.evaluate_models(cluster_config=configs)
File /opt/miniconda3/envs/robyn_mmm/lib/python3.12/site-packages/robyn/robyn.py:283, in Robyn.evaluate_models(self, pareto_config, cluster_config, display_plots, export_plots)
273 if display_plots or export_plots:
274 pareto_visualizer = ParetoVisualizer(
275 pareto_result=self.pareto_result,
276 mmm_data=self.mmm_data,
(...) 281 model_outputs=self.model_outputs,
282 )
--> 283 pareto_visualizer.plot_all(display_plots, self.working_dir)
284 if self.cluster_result:
285 cluster_visualizer = ClusterVisualizer(
286 self.pareto_result,
287 self.cluster_result,
288 self.mmm_data,
289 )
File /opt/miniconda3/envs/robyn_mmm/lib/python3.12/site-packages/robyn/visualization/pareto_visualizer.py:991, in ParetoVisualizer.plot_all(self, display_plots, export_location)
988 break # TODO: This will generate too many plots. Only generate plots for the first solution. we can export all plots to a folder if too many to display
990 if not self.model_outputs.hyper_fixed:
--> 991 prophet_decomp_plot = self.create_prophet_decomposition_plot()
992 if prophet_decomp_plot:
993 figures["prophet_decomp"] = prophet_decomp_plot
File /opt/miniconda3/envs/robyn_mmm/lib/python3.12/site-packages/robyn/visualization/pareto_visualizer.py:737, in ParetoVisualizer.create_prophet_decomposition_plot(self)
734 prophet_vars_str = [variable.value for variable in prophet_vars]
735 prophet_vars_str.sort(reverse=True)
736 value_variables = (
--> 737 [
738 (
739 "dep_var"
740 if hasattr(df, "dep_var")
741 else self.mmm_data.mmmdata_spec.dep_var
742 )
743 ]
744 + factor_vars
745 + prophet_vars_str
746 )
747 df_long = df.melt(
748 id_vars=["ds"],
749 value_vars=value_variables,
750 var_name="variable",
751 value_name="value",
752 )
753 df_long["ds"] = pd.to_datetime(df_long["ds"])
TypeError: can only concatenate list (not "NoneType") to list
Metadata
Metadata
Assignees
Labels
No labels