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

Names of models are not saved as settings #2601

Closed
janezd opened this issue Sep 19, 2017 · 1 comment
Closed

Names of models are not saved as settings #2601

janezd opened this issue Sep 19, 2017 · 1 comment
Assignees

Comments

@janezd
Copy link
Contributor

janezd commented Sep 19, 2017

  1. Put logistic regression on the canvas.
  2. Edit its name
  3. Save the schema
  4. Close canvas
  5. Open Orange and load the schema

The logistic regression name is reverted back to Logistic regression.


The base class for learners sets self.learner_name = self.name in __init__, where self.name is the widgets class attribute name, which is set later in the derived classes. So learner_name = Setting(name) or learner_name = Setting(OWWidget.name) won't work since the name is only defined later. Having learner_name = Setting("") would require some magic.

OWBaseLearner already has a meta class. This may be the point where the setting can be properly initialized since the name is already set then.

@astaric
Copy link
Member

astaric commented Sep 21, 2017

I opted for learner_name=Setting(None) to allow saving of empty names in workflows. See #2608 for details.

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

2 participants