causaltune icon indicating copy to clipboard operation
causaltune copied to clipboard

AttributeError("'NewDummy' object has no attribute 'causal_estimator'"),

Open TimoFlesch opened this issue 2 years ago • 1 comments

When running autocausality.fit with standard settings, the following error pops up on every trial:

[flaml.tune.tune: 09-14 15:16:33] {110} INFO - result: {'norm_erupt': -inf, 'estimator_name': 'backdoor.auto_causality.models.NewDummy', 'exception': AttributeError("'NewDummy' object has no attribute 'causal_estimator'"), 'traceback': 'Traceback (most recent call last):\n File "PATHTOPACKAGE\auto_causality\optimiser.py", line 463, in _estimate_effect\n scores = self._compute_metrics(estimate)\n File "PATHTOPACKAGE\auto_causality\optimiser.py", line 484, in _compute_metrics\n "train": self.scorer.make_scores(\n File "PATHTOPACKAGE\auto_causality\scoring.py", line 261, in make_scores\n cate_estimate = est.effect(df)\n File "PATHTOPACKAGE\auto_causality\models\dummy.py", line 79, in effect\n effect = super(NewDummy, self).effect(df, **kwargs)\n File "PATHTOPACKAGE\auto_causality\models\monkey_patches.py", line 39, in effect\n self.causal_estimator.update_input(self._treatment_value, self._control_value, df)\nAttributeError: 'NewDummy' object has no attribute 'causal_estimator'\n', 'training_iteration': 0, 'config': {'estimator': {'estimator_name': 'backdoor.auto_causality.models.NewDummy'}}, 'config/estimator': {'estimator_name': 'backdoor.auto_causality.models.NewDummy'}, 'experiment_tag': 'exp', 'time_total_s': 11.774611234664917}

The fitting seems to resume, though.

TimoFlesch avatar Sep 14 '22 14:09 TimoFlesch

I was seeing the same, it fixed itself when I installed latest DoWhy version

EgorKraevTransferwise avatar Sep 17 '22 09:09 EgorKraevTransferwise

NewDummy no longer used, replaced by the multi-treatment version written from scratch. So this is no longer relevant

EgorKraevTransferwise avatar Dec 06 '22 08:12 EgorKraevTransferwise