Skip to content

Commit

Permalink
fixed error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaquinIglesiasTurina committed Jul 28, 2024
1 parent 348e171 commit 0546cb3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/scholar/linear/bayesian_ridge_regression_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ defmodule Scholar.Linear.BayesianRidgeRegressionTest do
y = Nx.concatenate([y, y], axis: 1)

message =
"Elixir.#{inspect(BayesianRidgeRegression)} expected y to have shape {n_samples}, got tensor with shape: #{inspect(Nx.shape(y))}"
"Scholar.Linear.BayesianRidgeRegression expected y to have shape {n_samples}, got tensor with shape: #{inspect(Nx.shape(y))}"

assert_raise ArgumentError,
message,
Expand Down
2 changes: 1 addition & 1 deletion test/scholar/linear/isotonic_regression_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ defmodule Scholar.Linear.IsotonicRegressionTest do
sample_weights = Nx.tensor([1, 3, 2, 7, 4])

message =
"Elixir.#{inspect(IsotonicRegression)} expected y to have shape {n_samples}, got tensor with shape: #{inspect(Nx.shape(y))}"
"Scholar.Linear.IsotonicRegression expected y to have shape {n_samples}, got tensor with shape: #{inspect(Nx.shape(y))}"

assert_raise ArgumentError,
message,
Expand Down
2 changes: 1 addition & 1 deletion test/scholar/linear/logistic_regression_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ defmodule Scholar.Linear.LogisticRegressionTest do
y = Nx.tensor([[0, 1], [1, 0]])

assert_raise ArgumentError,
"Elixir.#{inspect(LogisticRegression)} expected y to have shape {n_samples}, got tensor with shape: {2, 2}",
"Scholar.Linear.LogisticRegression expected y to have shape {n_samples}, got tensor with shape: {2, 2}",
fn -> LogisticRegression.fit(x, y, num_classes: 2) end
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/scholar/linear/svm_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ defmodule Scholar.Linear.SVMTest do
Nx.concatenate([y_train, y_train], axis: 1)

message =
"Elixir.#{inspect(SVM)} expected y to have shape {n_samples}, got tensor with shape: #{inspect(Nx.shape(y_train))}"
"Scholar.Linear.SVM expected y to have shape {n_samples}, got tensor with shape: #{inspect(Nx.shape(y_train))}"

assert_raise ArgumentError,
message,
Expand Down

0 comments on commit 0546cb3

Please sign in to comment.