Skip to content
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

[pre-commit.ci] pre-commit autoupdate #3

Merged
merged 2 commits into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
8 changes: 2 additions & 6 deletions sobolev_alignment/scvi_model_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions sobolev_alignment/sobolev_alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions tests/test_krr_approx.py
Original file line number Diff line number Diff line change
Expand Up @@ -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_, :]
)
Expand All @@ -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(
Expand Down