From e67e1c5fe612d2d127e4132ae5043a2474cebbf9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Apr 2023 21:58:45 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 22.12.0 → 23.3.0](https://github.com/psf/black/compare/22.12.0...23.3.0) - [github.com/pre-commit/mirrors-prettier: v3.0.0-alpha.4 → v3.0.0-alpha.6](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0-alpha.4...v3.0.0-alpha.6) - https://github.com/myint/autoflake → https://github.com/PyCQA/autoflake - [github.com/PyCQA/autoflake: v2.0.0 → v2.0.2](https://github.com/PyCQA/autoflake/compare/v2.0.0...v2.0.2) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1320e7f..1b76182 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,11 +7,11 @@ default_stages: minimum_pre_commit_version: 2.16.0 repos: - repo: https://github.com/psf/black - rev: 22.12.0 + rev: 23.3.0 hooks: - id: black - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.0-alpha.4 + rev: v3.0.0-alpha.6 hooks: - id: prettier - repo: https://github.com/asottile/blacken-docs @@ -43,8 +43,8 @@ repos: args: [--fix=lf] - id: trailing-whitespace - id: check-case-conflict - - repo: https://github.com/myint/autoflake - rev: v2.0.0 + - repo: https://github.com/PyCQA/autoflake + rev: v2.0.2 hooks: - id: autoflake args: From b10f041fd9df3f543a3f88bbb32eea3ddc16b2f0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Apr 2023 21:59:09 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- sobolev_alignment/scvi_model_search.py | 8 ++------ sobolev_alignment/sobolev_alignment.py | 2 -- tests/test_krr_approx.py | 2 -- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/sobolev_alignment/scvi_model_search.py b/sobolev_alignment/scvi_model_search.py index 007472b..d0ea227 100644 --- a/sobolev_alignment/scvi_model_search.py +++ b/sobolev_alignment/scvi_model_search.py @@ -194,10 +194,6 @@ def _objective_function(params): def split_dataset(data_an, test_size=0.1): """Split between training and testing""" train_data_df, test_data_df = train_test_split(data_an.to_df(), test_size=test_size) - train_data_an = data_an[ - train_data_df.index, - ] - test_data_an = data_an[ - test_data_df.index, - ] + train_data_an = data_an[train_data_df.index,] + test_data_an = data_an[test_data_df.index,] return train_data_an, test_data_an diff --git a/sobolev_alignment/sobolev_alignment.py b/sobolev_alignment/sobolev_alignment.py index e103174..85e01f3 100644 --- a/sobolev_alignment/sobolev_alignment.py +++ b/sobolev_alignment/sobolev_alignment.py @@ -329,7 +329,6 @@ def _train_krr( frob_norm_source: bool = False, lib_size_norm: bool = False, ): - if n_krr_clfs == 1: self.approximate_krr_regressions_[data_source] = self._train_one_krr( data_source=data_source, @@ -702,7 +701,6 @@ def _memmap_log_processing( unit_std: bool = False, frob_norm_source: bool = False, ): - # Save embedding if save_mmap is not None and type(save_mmap) == str: self._save_mmap = save_mmap diff --git a/tests/test_krr_approx.py b/tests/test_krr_approx.py index b499b9c..881c2e3 100644 --- a/tests/test_krr_approx.py +++ b/tests/test_krr_approx.py @@ -176,7 +176,6 @@ def test_laplacian_falkon_fit(self, fit_falkon_laplacian_ridge, valid_input, val assert pearson_corr[0] > pearson_threshold def test_ridge_coef_sklearn_fit(self, fit_sklearn_laplacian_ridge, input, valid_input): - pred_reconstruct = fit_sklearn_laplacian_ridge.kernel_( valid_input, input[fit_sklearn_laplacian_ridge.ridge_samples_idx_, :] ) @@ -186,7 +185,6 @@ def test_ridge_coef_sklearn_fit(self, fit_sklearn_laplacian_ridge, input, valid_ ) def test_ridge_coef_falkon_fit(self, fit_falkon_laplacian_ridge, input, valid_input): - pred_reconstruct = fit_falkon_laplacian_ridge.kernel_(valid_input, fit_falkon_laplacian_ridge.anchors()) pred_reconstruct = pred_reconstruct.matmul(fit_falkon_laplacian_ridge.sample_weights_) np.testing.assert_array_almost_equal(