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

Some Orange tests fail when the add-on is installed #1

Open
markotoplak opened this issue Sep 25, 2023 · 0 comments
Open

Some Orange tests fail when the add-on is installed #1

markotoplak opened this issue Sep 25, 2023 · 0 comments

Comments

@markotoplak
Copy link
Member

Orange.widgets.evaluate.tests.test_owtestandscore and Orange.widgets.evaluate.tests.test_owpredictions fail because they also use Fairness metrics. Metrics should me made more robust so that they cause no failures. Examples:

======================================================================
ERROR: test_multi_target_input (Orange.widgets.evaluate.tests.test_owtestandscore.TestOWTestAndScore)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/marko/dev/orange3/Orange/widgets/evaluate/tests/test_owtestandscore.py", line 764, in test_multi_target_input
    self.send_signal(widget.Inputs.train_data, data)
  File "/home/marko/dev/orange-widget-base/orangewidget/tests/base.py", line 445, in send_signal
    return self.send_signals([(input, value)], *args,
  File "/home/marko/dev/orange-widget-base/orangewidget/tests/base.py", line 471, in send_signals
    self._send_signal(widget, input, value, *args)
  File "/home/marko/dev/orange-widget-base/orangewidget/tests/base.py", line 490, in _send_signal
    notify_input_helper(input, widget, value, *args, **kwargs)
  File "/usr/lib/python3.10/functools.py", line 889, in wrapper
    return dispatch(args[0].__class__)(*args, **kw)
  File "/home/marko/dev/orange-widget-base/orangewidget/utils/signals.py", line 735, in set_input_helper
    handler(*args)
  File "/home/marko/dev/orange-widget-base/orangewidget/utils/signals.py", line 208, in summarize_wrapper
    method(widget, value)
  File "/home/marko/dev/orange3/Orange/widgets/evaluate/owtestandscore.py", line 451, in set_train_data
    self._update_scorers()
  File "/home/marko/dev/orange3/Orange/widgets/evaluate/owtestandscore.py", line 518, in _update_scorers
    new_scorers = usable_scorers(self.data.domain)
  File "/home/marko/dev/orange3/Orange/widgets/evaluate/utils.py", line 84, in usable_scorers
    candidates = [
  File "/home/marko/dev/orange3/Orange/widgets/evaluate/utils.py", line 87, in <listcomp>
    and scorer.is_compatible(domain_or_var) and scorer.class_types]
  File "/home/marko/venv310/lib/python3.10/site-packages/orangecontrib/fairness/evaluation/scoring.py", line 33, in is_compatible
    return contains_fairness_attributes(domain)
  File "/home/marko/venv310/lib/python3.10/site-packages/orangecontrib/fairness/widgets/utils.py", line 105, in contains_fairness_attributes
    if "favorable_class_value" not in domain.class_var.attributes:
AttributeError: 'NoneType' object has no attribute 'attributes'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant