Ticket #1157 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

Fix min_instances bug.

Reported by: miha Owned by: marko
Milestone: 2.5 Component: library
Severity: minor Keywords:
Cc: Blocking:
Blocked By:

Description

Fix AttributeWarning: 'min_instances' is an (obsolete) alias for 'min_examples'

stop.min_instances = self.min_instances

The following tests fail:

unit.tests.test_regression.TestRegression.unit.tests.test_regression.TestRegression.test_regression_on_reference_ensemble_forest  http://ci.biolab.si/job/orange_test/280/testReport/unit.tests.test_regression/TestRegression/unit_tests_test_regression_TestRegression_test_regression_on_reference_ensemble_forest2/  http://ci.biolab.si/job/orange_test/280/testReport/unit.tests.test_regression/TestRegression/unit_tests_test_regression_TestRegression_test_regression_on_tests_20_modules_statExamples_regression/  http://ci.biolab.si/job/orange_test/280/testReport/unit.tests.test_regression/TestRegression/unit_tests_test_regression_TestRegression_test_regression_on_tests_20_modules_ensemble2/  http://ci.biolab.si/job/orange_test/280/testReport/unit.tests.test_regression/TestRegression/unit_tests_test_regression_TestRegression_test_regression_on_tests_20_modules_ensemble3/  http://ci.biolab.si/job/orange_test/280/testReport/unit.tests.test_regression/TestRegression/unit_tests_test_regression_TestRegression_test_regression_on_tutorial_accuracy6/  http://ci.biolab.si/job/orange_test/280/testReport/unit.tests.test_regression/TestRegression/unit_tests_test_regression_TestRegression_test_regression_on_tutorial_bagging_test/  http://ci.biolab.si/job/orange_test/280/testReport/unit.tests.test_regression/TestRegression/unit_tests_test_regression_TestRegression_test_regression_on_tutorial_regression1/  http://ci.biolab.si/job/orange_test/280/testReport/unit.tests.test_regression/TestRegression/unit_tests_test_regression_TestRegression_test_regression_on_tutorial_regression2/  http://ci.biolab.si/job/orange_test/280/testReport/unit.tests.test_regression/TestRegression/unit_tests_test_regression_TestRegression_test_regression_on_tutorial_regression3/  http://ci.biolab.si/job/orange_test/280/testReport/unit.tests.test_regression/TestRegression/unit_tests_test_regression_TestRegression_test_regression_on_tutorial_regression4/

Change History

comment:1 Changed 2 years ago by Janez Demšar <janez.demsar@…>

  • Status changed from new to closed
  • Resolution set to fixed

In [a6f1ccf21f6380f3c609d6b276d8ebb515773995/orange]:

Renamed TreeStopCriteria_common.min_examples to min_instances, fixed alias (fixes #1157)

comment:2 Changed 2 years ago by miha

  • Status changed from closed to reopened
  • Resolution fixed deleted

Is it possible to throw the DeprecationWarning instead of the AttributeWarning in this case?

/srv/jenkins/jobs/orange_test/workspace/Orange/testing/regression/xtest_one.py:41: AttributeWarning: 'min_examples' is an (obsolete) alias for 'min_instances'

comment:3 Changed 2 years ago by miha

This bug still fails in the docs/reference/rst/code/treelearner.py. In this line:

learner.stop = Orange.classification.tree.StopCriteria_common() print learner.stop.max_majority, learner.stop.min_instances

print "\n\nTree with minExamples = 5.0" learner.stop.min_instances = 5.0

Last edited 2 years ago by miha (previous) (diff)

comment:4 Changed 2 years ago by Janez Demšar <janez.demsar@…>

  • Status changed from reopened to closed
  • Resolution set to fixed

In [587b5c331cb6996ec0f236c3ebfa724707562eb5/orange]:

Changed the warning type for obsolete attributes to DeprecationWarning (fixes #1157)

comment:5 Changed 2 years ago by janez

  • Status changed from closed to reopened
  • Resolution fixed deleted

comment:6 Changed 2 years ago by janez

Jenkins said OK. Is it OK now? (It should be, I don't see how could it still report the bug the wrong way - did you run pyxtract?)

comment:7 Changed 2 years ago by miha

It is OK.

comment:8 Changed 2 years ago by miha

  • Status changed from reopened to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.