File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
cebra/integrations/sklearn Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 2828import numpy as np
2929import numpy .typing as npt
3030import pkg_resources
31+ import sklearn
3132import sklearn .utils .validation as sklearn_utils_validation
3233import torch
33- import sklearn
3434from sklearn .base import BaseEstimator
3535from sklearn .base import TransformerMixin
3636from sklearn .utils .metaestimators import available_if
4343import cebra .models
4444import cebra .solver
4545
46+
4647def check_version (estimator ):
4748 # NOTE(stes): required as a check for the old way of specifying tags
4849 # https://github.com/scikit-learn/scikit-learn/pull/29677#issuecomment-2334229165
4950 from packaging import version
5051 return version .parse (sklearn .__version__ ) < version .parse ("1.6.dev" )
5152
53+
5254def _init_loader (
5355 is_cont : bool ,
5456 is_disc : bool ,
Original file line number Diff line number Diff line change 2828
2929# -- Path setup --------------------------------------------------------------
3030
31- # If extensions (or modules to document with autodoc) are in another directory,
32- # add these directories to sys.path here. If the directory is relative to the
33- # documentation root, use os.path.abspath to make it absolute, like shown here.
34- #
31+ import datetime
3532import os
3633import sys
3734
3835sys .path .insert (0 , os .path .abspath ("." ))
3936
40- import datetime
41-
42- import cebra
37+ import cebra # noqa: E402
4338
4439
4540def get_years (start_year = 2021 ):
@@ -247,6 +242,9 @@ def get_years(start_year=2021):
247242
248243# Download link for the notebook, see
249244# https://nbsphinx.readthedocs.io/en/0.3.0/prolog-and-epilog.html
245+
246+ # fmt: off
247+ # flake8: noqa: E501
250248nbsphinx_prolog = r"""
251249
252250.. only:: html
@@ -269,3 +267,5 @@ def get_years(start_year=2021):
269267
270268----
271269"""
270+ # fmt: on
271+ # flake8: enable=E501
You can’t perform that action at this time.
0 commit comments