Skip to content

Commit

Permalink
fixup torch
Browse files Browse the repository at this point in the history
  • Loading branch information
fcharras committed Jan 18, 2024
1 parent d5bab3f commit d2ccf5b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions benchmarks/ridge/solvers/sklearn_torch_dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def warm_up(self):
n_warmup_features = 5
sample_weight = self.sample_weight
if sample_weight is not None:
sample_weight = sample_weight[:n_warmup_samples].copy()
sample_weight = sample_weight[:n_warmup_samples].clone()
with config_context(array_api_dispatch=True):
Ridge(
alpha=self.alpha,
Expand All @@ -99,8 +99,8 @@ def warm_up(self):
positive=True if (self.solver == "lbfgs") else False,
random_state=self.random_state,
).fit(
self.X[:n_warmup_samples, :n_warmup_features].copy(),
self.y[:n_warmup_samples].copy(),
self.X[:n_warmup_samples, :n_warmup_features].clone(),
self.y[:n_warmup_samples].clone(),
sample_weight,
)

Expand Down

0 comments on commit d2ccf5b

Please sign in to comment.