-
Notifications
You must be signed in to change notification settings - Fork 5
Ruff #141
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
Ruff #141
Changes from 1 commit
ede1d3b
60a9829
7d52a16
e2da78e
1ffe8c7
d427707
c19b420
b457405
86973a5
690c152
5ae0456
87ad521
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -139,10 +139,12 @@ def fit(self): | |
ui.set_method(self.method) | ||
ui.get_method().config.update(sherpa_configs.get(self.method, {})) | ||
ui.load_user_model(CalcModel(self.model), "xijamod") # sets global xijamod | ||
xijamod = globals()["xijamod"] | ||
ui.add_user_pars("xijamod", self.model.parnames) | ||
ui.set_model(1, "xijamod") | ||
calc_stat = CalcStat(self.model, self.child_pipe, self.maxiter) | ||
ui.load_user_stat("xijastat", calc_stat, lambda x: np.ones_like(x)) | ||
xijastat = globals()["xijastat"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would ui.set_state("xijastat") make as much sense if we're sticking with the ui versions? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see this was changed again in a later commit, though I think my question is still valid. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I don't understand the question. Make as much as sense as what, and what is the context about sticking with ui versions? I think these are mostly OBE, in that messing with this code was more trouble than its worth and probably out of scope for ruff (despite my earlier effort). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Regarding "I don't understand the question. Make as much as sense as what, " Sorry I was hoping that was clear in context and I had a typo. I meant - would With regard to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I'm guessing you trusted the documentation instead of trying it. I've been down that road...
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah. Does set_state(str) only work for the built-in statistics? I did not see that advertised. Thanks! |
||
ui.set_stat(xijastat) | ||
|
||
# Set frozen, min, and max attributes for each xijamod parameter | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this one used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved I think in a later commit though still a little confusing with ui .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't understand how these sherpa functions inject into the namespace. It is really unfortunate that
ui.load_user_model
doesn't return the model, but there you go.