[MRG] Replace absolute imports with relative ones#13653
[MRG] Replace absolute imports with relative ones#13653NicolasHug merged 9 commits intoscikit-learn:masterfrom
Conversation
|
I will squash commits once this passes |
|
you don't need to squash commits, and it's nice if you would avoid a force push. We squash the commits before merge anyway. |
|
Tests are failing @aditya1702. let us know if you need help. |
agramfort
left a comment
There was a problem hiding this comment.
Be careful with the diff. You should not change in docstrings for example
| NotFittedError('This LinearSVC instance is not fitted yet'...) | ||
|
|
||
| .. versionchanged:: 0.18 | ||
| Moved from sklearn.utils.validation. |
sklearn/exceptions.py
Outdated
|
|
||
| .. versionchanged:: 0.18 | ||
| Moved from sklearn.base. | ||
| Moved from .base. |
@adrinjalali Got it. I dont force push commits :) |
sklearn/externals/copy_joblib.sh
Outdated
| # Note: BSD sed -i needs an argument unders OSX | ||
| # so first renaming to .bak and then deleting backup files | ||
| find joblib -name "*.py" | xargs sed -i.bak "s/from joblib/from sklearn.externals.joblib/" | ||
| find joblib -name "*.py" | xargs sed -i.bak "s/from joblib/from .joblib/" |
There was a problem hiding this comment.
I think this should be okay, and despite @NicolasHug's comment, the changes in sklearn/externals/joblib are consistent with this
|
|
||
| try: | ||
| from sklearn.externals.joblib.externals.cloudpickle import dumps, loads | ||
| from ..cloudpickle import dumps, loads |
There was a problem hiding this comment.
anything joblib related can be ignored since we're unvendoring #13531
sklearn/linear_model/logistic.py
Outdated
| Note that 'sag' and 'saga' fast convergence is only guaranteed on | ||
| features with approximately the same scale. You can | ||
| preprocess the data with a scaler from sklearn.preprocessing. | ||
| .preprocess the data with a scaler from sklearn.preprocessing. |
sklearn/linear_model/logistic.py
Outdated
| Note that 'sag' and 'saga' fast convergence is only guaranteed on | ||
| features with approximately the same scale. You can preprocess the data | ||
| with a scaler from sklearn.preprocessing. | ||
| with a scaler from ..preprocessing. |
sklearn/model_selection/_split.py
Outdated
| if not isinstance(cv, Iterable) or isinstance(cv, str): | ||
| raise ValueError("Expected cv as an integer, cross-validation " | ||
| "object (from sklearn.model_selection) " | ||
| "object (from .) " |
sklearn/setup.py
Outdated
| import os | ||
|
|
||
| from sklearn._build_utils import maybe_cythonize_extensions | ||
| from _build_utils import maybe_cythonize_extensions |
sklearn/utils/estimator_checks.py
Outdated
| Additional tests for classifiers, regressors, clustering or transformers | ||
| will be run if the Estimator class inherits from the corresponding mixin | ||
| from sklearn.base. | ||
| from ..base. |
|
That looks good for the most part, but please revert the changes related to
(also please merge master to sort out the merge conflict with |
sklearn/externals/copy_joblib.sh
Outdated
| # Note: BSD sed -i needs an argument unders OSX | ||
| # so first renaming to .bak and then deleting backup files | ||
| find joblib -name "*.py" | xargs sed -i.bak "s/from joblib/from sklearn.externals.joblib/" | ||
| find joblib -name "*.py" | xargs sed -i.bak "s/from joblib/from .joblib/" |
There was a problem hiding this comment.
I think this should be okay, and despite @NicolasHug's comment, the changes in sklearn/externals/joblib are consistent with this
|
@NicolasHug Resolved the conflicts |
|
Thanks @aditya1702 ! |
…learn#13653)" This reverts commit 348aa65.
…learn#13653)" This reverts commit 348aa65.
Reference Issues/PRs
Fixes #13629
What does this implement/fix? Explain your changes.
Replaces absolute imports with relative imports
Any other comments?