You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
base._parameter_inference should not copy code from _diagnostic_other #4905
Would a runtime import work? Temporary copy/pastes have a nasty way of become permanent (fit_constrained, tons of tests) and from there for small differences to creep in (get_robustcov_results, sandbox.tsa.garch) and then it's a giant pain to sort out (plus one version is likely buggy)
Looks like the copied version was then extended to return some more stuff. And the module where it was copied from is imported at the top of this module, so circular imports are clearly not an issue.
5772 is defined as MAINT to remove code duplication, it doesn't mention a bug. (I only skimmed the PR to see that I don't want this at the current time.)
a bugfix PR looks more like this #5762 (one word changed and 35 lines of unit tests added)
statsmodels.base should avoid importing from other parts as much as possible.
score_test will be attached to models e.g. PR for GLM and robust
Then the score_test can be used for diagnostic tests, e.g. I have an uncommitted version of a generic RESET test based on score.
module location of the various diagnostic functions and their helper functions is still unclear, e.g. I started a new private module to collect reset test tools.
The potential bug described in the thread in #5772.
Please stop treating me like The Enemy.
module location of the various diagnostic functions and their helper functions is still unclear, e.g. I started a new private module to collect reset test tools.
with the bug you mean the code in the elif cov_type.upper() == 'V' path?
both docstring and comments indicate that that path is not working yet.
The wrong number of arguments will be easy to fix. The singular matrix treatment in V is a serious problem that will require more thinking.
If you don't want me to get impatient and upset, then avoid PRs like this. It's wasting my time, and my first comment clearly says that there is a reason for the code duplication.
Sounds like it belongs in the sandbox.
Haven't you realized yet, that I am now using private modules like _parameter_inference instead of the sandbox?
And I usually indicate which parts are unit tested and which parts are experimental or not finished.
score_test, conditional moment tests and the associated diagnostic and specification tests will take maybe 5 or more additional PRs.
(but I think we will be the only package that supports generic HC, ..., robust score tests.)
Haven't you realized yet, that I am now using private modules like _parameter_inference instead of the sandbox?
I have. And to the casual observer it would appear that you are simultaneously
a) invalidating the idea behind the sandbox existing in the first place
b) applying a double-standard in preventing actually-tested code from leaving the sandbox
c) making it more difficult to identify what code is and is not "in good shape"
d) neglecting the fact that many readers are neither i) you nor ii) psychic
e) making things more difficult for those readers in the future when they have to maintain the half-finished code that will inevitably be left behind here
But its your project and you get to do what you want, so I've kept my head down and tried to help.
Seems like time for me to take my customary couple-months away. All the best.
Given all the complaints about sandbox, we have given up on its usage a long time ago. But the old code is still waiting for (substantive) review.
I don't see anyone working on score_tests and similar. So it will be at my pace. If there is someone like a GSOC student, then I would work with her/him.
And I also want to point out that very few people know about generic robust score tests and I have not seen anyone in the Python neighborhood. If you read the relevant articles, then the code is not difficult to understand. But without that background the code the meaning and intention of the code will be difficult to understand.
c) making it more difficult to identify what code is and is not "in good shape"
I started to add a Status comment to the docstrings, as we discussed last year. Also all our code is by default experimental after it has been newly added.
I think when my code goes for public consumption it is usually in good shape and needs relatively few backwards incompatible changes. As I mentioned in the PRs most of the current score_test, conditional moment tests and similar is foundation code and not user facing, unless the user is interested in code for some old econometric theory articles)
How about working on documentation notebooks and similar instead of taking time off.
I'm only getting impatient with pep-8, code reshuffling and similar.
Activity
josef-pkt commentedon Aug 15, 2018
It's to avoid circular imports.
I'm not sure yet what the final version/location will be.
jbrockmendel commentedon Aug 15, 2018
Would a runtime import work? Temporary copy/pastes have a nasty way of become permanent (fit_constrained, tons of tests) and from there for small differences to creep in (get_robustcov_results, sandbox.tsa.garch) and then it's a giant pain to sort out (plus one version is likely buggy)
jbrockmendel commentedon May 16, 2019
These two implementations have apparently drifted apart. Any idea if one is right and one is wrong?
jbrockmendel commentedon May 16, 2019
Looks like the copied version was then extended to return some more stuff. And the module where it was copied from is imported at the top of this module, so circular imports are clearly not an issue.
josef-pkt commentedon May 22, 2019
see PR #5772 (closed as too early to fix code duplication)
jbrockmendel commentedon May 22, 2019
Also too early to discuss the bug identified there?
josef-pkt commentedon May 22, 2019
which bug?
5772 is defined as MAINT to remove code duplication, it doesn't mention a bug. (I only skimmed the PR to see that I don't want this at the current time.)
a bugfix PR looks more like this #5762 (one word changed and 35 lines of unit tests added)
josef-pkt commentedon May 22, 2019
My first reply is still accurate and up-to-date
statsmodels.baseshould avoid importing from other parts as much as possible.score_testwill be attached to models e.g. PR for GLM and robustThen the
score_testcan be used fordiagnostictests, e.g. I have an uncommitted version of a generic RESET test based on score.module location of the various diagnostic functions and their helper functions is still unclear, e.g. I started a new private module to collect reset test tools.
jbrockmendel commentedon May 22, 2019
The potential bug described in the thread in #5772.
Please stop treating me like The Enemy.
Sounds like it belongs in the sandbox.
josef-pkt commentedon May 22, 2019
with the bug you mean the code in the
elif cov_type.upper() == 'V'path?both docstring and comments indicate that that path is not working yet.
The wrong number of arguments will be easy to fix. The singular matrix treatment in V is a serious problem that will require more thinking.
If you don't want me to get impatient and upset, then avoid PRs like this. It's wasting my time, and my first comment clearly says that there is a reason for the code duplication.
Haven't you realized yet, that I am now using private modules like
_parameter_inferenceinstead of the sandbox?And I usually indicate which parts are unit tested and which parts are experimental or not finished.
score_test, conditional moment tests and the associated diagnostic and specification tests will take maybe 5 or more additional PRs.
(but I think we will be the only package that supports generic HC, ..., robust score tests.)
jbrockmendel commentedon May 22, 2019
I have. And to the casual observer it would appear that you are simultaneously
a) invalidating the idea behind the sandbox existing in the first place
b) applying a double-standard in preventing actually-tested code from leaving the sandbox
c) making it more difficult to identify what code is and is not "in good shape"
d) neglecting the fact that many readers are neither i) you nor ii) psychic
e) making things more difficult for those readers in the future when they have to maintain the half-finished code that will inevitably be left behind here
But its your project and you get to do what you want, so I've kept my head down and tried to help.
Seems like time for me to take my customary couple-months away. All the best.
josef-pkt commentedon May 22, 2019
Given all the complaints about sandbox, we have given up on its usage a long time ago. But the old code is still waiting for (substantive) review.
I don't see anyone working on score_tests and similar. So it will be at my pace. If there is someone like a GSOC student, then I would work with her/him.
And I also want to point out that very few people know about generic robust score tests and I have not seen anyone in the Python neighborhood. If you read the relevant articles, then the code is not difficult to understand. But without that background the code the meaning and intention of the code will be difficult to understand.
I started to add a
Statuscomment to the docstrings, as we discussed last year. Also all our code is by default experimental after it has been newly added.I think when my code goes for public consumption it is usually in good shape and needs relatively few backwards incompatible changes. As I mentioned in the PRs most of the current score_test, conditional moment tests and similar is foundation code and not user facing, unless the user is interested in code for some old econometric theory articles)
How about working on documentation notebooks and similar instead of taking time off.
I'm only getting impatient with pep-8, code reshuffling and similar.