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
[DOC] Programmatically fix (all) typos #5424
Conversation
This PR fixes typos found via: - `codespell -S docs,./sktime/datasets -L bu,fpr,binay,afer,nd,methodd,strat,mape,lik,mapp,ser,te,ot,ue,fof,fwe,oen,vie,yur,ned,ths,als,mor,foor,reasy,dum,fo,yhe,mke,bui,som,caf,wqs,slq,veiw,yse` - `typos --format brief`
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@@ -181,7 +181,7 @@ See docstring of ``AggrDist`` and ``FlatDist``. | |||
AggrDist | |||
FlatDist | |||
|
|||
Advanced time series kernels that cannot be expressed as aggrgates or flat applicates: |
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.
not a typo
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.
aggrgates
is
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.
no, applicates
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 mean, it is correcting applicates to applicants which is a false positive.
It is not correcting aggrgates to aggregates, which a false negative.
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 mean on the same line "aggrgates" is a typo, "aggregates" is the correct spelling
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.
yes, that's what I try to say in my last comment.
"applicates" -> "applicants", should not be corrected. "applicates" was correct.
So this is a false positive, because the spellchecker detects it but should not.
In my initial comment I was referring to this one.
"aggrgates" -> "aggregates" should be corrected, "aggrgates" is incorrect.
So this is a false negative, because the spellchecker does not detect it but should.
In my initial comment I overlooked this one, thank you for pointing this out, @szepeviktor!
Having said that, this is a very very specialized PR and a very peculiar location to help out at, but thanks nonetheless. Might I convince you to contribute to sktime
in the future?
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.
Might I convince you to contribute to
sktime
in the future?
I am highly blind to business features - what is the most important for you.
All software is the same cake to me, they just have different (thin) icing on top.
What I can do is
- care about every byte in the repo
- listen to what the (Python) ecosystem says
- be in contact with dependency authors
- run never before seen tests
- find design errors
- find implementation errors
- invent end-to-end tests
All my thoughts and tools are public here on GitHub.
The submerged part of your ice berg is my territory.
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.
🥊 cakes vs. ice bergs
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.
all of these sound very nice - everyone wants to eat the cake but not enough iceberg miners...
the largest impact is perhaps bugfixes?
https://github.com/sktime/sktime/projects/18
There are also some larger projects and design questions if interested - we can chat at one of the meetups.
sktime/base/_meta.py
Outdated
@@ -783,7 +783,7 @@ def is_flat(obj): | |||
|
|||
|
|||
class _ColumnEstimator: | |||
"""Mixin class with utilities for by-column applicates.""" | |||
"""Mixin class with utilities for by-column applicants.""" |
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.
not a typo
sktime/benchmarking/benchmarks.py
Outdated
@@ -10,7 +10,7 @@ | |||
from sktime.utils.validation._dependencies import _check_soft_dependencies | |||
|
|||
|
|||
def is_initalised_estimator(estimator: BaseEstimator) -> bool: | |||
def is_initialised_estimator(estimator: BaseEstimator) -> bool: |
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.
public function names should not be changed, even if they contain a typo
@@ -39,7 +39,7 @@ | |||
"EditDist", | |||
"CNNClassifier", | |||
"FCNClassifier", | |||
"InceptionTimeClassifer", | |||
"InceptionTimeClassifier", |
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.
this has an impact on testing, but it is fine (the estimator should be excluded but was not)
@@ -79,7 +79,7 @@ def _make_series( | |||
index = _make_index(n_timepoints, index_type) | |||
if n_columns == 1 and return_mtype is None or return_mtype == "pd.Series": | |||
return pd.Series(data.ravel(), index) | |||
elif return_mtype is None or return_mtype == "pd.DataFrane": | |||
elif return_mtype is None or return_mtype == "pd.DataFrame": |
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.
oh, this changes the logic. I hope it does not break the test...
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.
Thanks a lot, very useful!
Blocking:
- a small number of suggested changes are small positives, I marked them
- small number of instances: we must not change names of public functions or variables without deprecation, that's perhaps something for a separate PR where we respect the deprecation procedure: https://www.sktime.net/en/stable/developer_guide/deprecation.html
- but just to reinforce, changes to private function and variable names, including tests that do not appear in public checker modules, are fine.
Non-blocking, but perhaps an idea for another PR:
it would be nice to have this as an automated pre-commit action or regular PR opened automatically! Where we would of course have to think about protecting function names, known false positives, etc.
@kianmeng, I'd say you can get both the |
@kianmeng There is a mistake in the last commit. |
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.
Approved, thanks a lot!
Would be nice to have this as a regular CI element.
FYI @yarnabrina, I updated this PR with the new CI workflow, and (as expected) it triggers tests for all modules. However, there are a number of timeout failures which I cannot diagnose - any idea what is going on here? |
@fkiraly, as far as I can see, these are the errors in the new CI workflow: https://github.com/sktime/sktime/actions/runs/6599294180 There are two clear patterns:
Regarding failures in old CI workflow, one seems to be coming from occasional pytest-xdist parallelisation problem, the other from classification looks like proper error. But given it didn't occur in new CI or in any other job even in old CI, it also suggests may be something of sporadic nature? I'm not sure, so cannot comment really. Also, I do note few other things:
|
@yarnabrina Unfortunately, nothing I can think off, perhaps @szepeviktor have a better approach? |
hm, since the "other things" discussion is off-topic for this PR, should we move to #5101 ? I'll reply there to the discussion that is not specific to failures in CI of this PR. |
Yes.
Hm, yes. So either it is an error with the new CI or at least two errors, as it does not error out on the old CI. I.e., it is either:
A third scenario, where the trafo is used as component, is unlikely as the error message is not from the constructor.
The Mid-term, clearly, we want to have systematic tests for the network module, too.
Sorry, confusion on my side - I did not interpret the error logs correctly. |
FYI @kianmeng, most of the above does not have to do with your PR, so there is no action needed on your side - we are just using it to test new CI elements. |
I was aware, @yarnabrina - my idea was, we first use this PR to test the full CI - like you were doing in the two other PR, and then merge the "typo fixing" PRs in this sequence:
In particular, I would not close yours. Why: the fixes may not be identical, and in merging any conflicts have a good chance to indicate actual errors in the typo fixes. |
Re SignatureTransformer, this check works as it should: from sktime.utils.validation._dependencies import _check_estimator_deps
from sktime.transformations.panel.signature_based import SignatureTransformer
_check_estimator_deps(SignatureTransformer) so I now find it more likely that there's something in collection in the new CI? |
That's correct. The network module is an abstraction of the Tensorflow / pytorch implementation of various estimators that are used by the classifier/regressor modules. They contain the model implementation which will be the same for both kinds of estimators, minus the head. Therefore, there are no tests for this module. |
Well, there could be...
|
Wouldn't we end up testing the same module twice during a single run? Once directly via |
I am biased for sure, so if you don't mind, can you please share your python version and operating system? And, whether My reasoning of why old CI do not fail is this:
This is from Based on my understanding, this should not be the general solution as same soft dependency may be required for other estimators. I was thinking that python version support in extras should not be affected by specific estimators, and it should be handled based on tags only, which does not seem to be working. Let me know if I am making sense. |
heres my
I do not have esig installed. The error message I get is this, as expected: (there seems to be an issue with the print, it should be estimator name, but logic seems ok) |
I agree. The new CI fails with same as well, so I assumed the logic in test collection is okay.
My interpretation is this needs to be changed:
Since |
Yes, it should use My explanation though would be, can the python bound on Fix is here: #5474 |
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.
Failures are due to new CI, and we have now understood them - so, merging.
@kianmeng, you could get the |
🥳 🥳 🥳 🥳 🥳 |
…heck * origin/main: [ENH] Add tecator dataset for time series regression as `sktime` onboard dataset (sktime#5428) [MNT] fix typos in `forecasting` module (sktime#5314) [MNT] fix typos in `base` module (sktime#5313) [DOC] Programmatically fix (all) typos (sktime#5424)
This PR fixes a minor issue in one of the error messages in `_check_python_version`. Example failure here: #5424 (comment)
Reference Issues/PRs
What does this implement/fix? Explain your changes.
This PR fixes typos found via:
codespell -S docs,./sktime/datasets -L bu,fpr,binay,afer,nd,methodd,strat,mape,lik,mapp,ser,te,ot,ue,fof,fwe,oen,vie,yur,ned,ths,als,mor,foor,reasy,dum,fo,yhe,mke,bui,som,caf,wqs,slq,veiw,yse
typos --format brief
Does your contribution introduce a new dependency? If yes, which one?
What should a reviewer concentrate their feedback on?
Did you add any tests for the change?
Any other comments?
PR checklist
For all contributions
How to: add yourself to the all-contributors file in the
sktime
root directory (not theCONTRIBUTORS.md
). Common badges:code
- fixing a bug, or adding code logic.doc
- writing or improving documentation or docstrings.bug
- reporting or diagnosing a bug (get this pluscode
if you also fixed the bug in the PR).maintenance
- CI, test framework, release.See here for full badge reference
See here for further details on the algorithm maintainer role.
For new estimators
docs/source/api_reference/taskname.rst
, follow the pattern.Examples
section.python_dependencies
tag and ensureddependency isolation, see the estimator dependencies guide.