Skip to content

Commit 37197dd

Browse files
authored
Update CI (#317)
1 parent 227858f commit 37197dd

File tree

3 files changed

+39
-6
lines changed

3 files changed

+39
-6
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
fail-fast: false
1212
matrix:
1313
include:
14-
- elixir: "1.15.6"
15-
otp: "26.1"
14+
- elixir: "1.18.1"
15+
otp: "27.1"
1616
lint: true
17-
- elixir: "1.14.5"
17+
- elixir: "1.15.8"
1818
otp: "26.1"
1919
steps:
2020
- uses: actions/checkout@v2

test/scholar/neighbors/knn_regressor_test.exs

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,18 @@ defmodule Scholar.Neighbors.KNNRegressorTest do
9393

9494
test "predict with 2D labels" do
9595
y =
96-
Nx.tensor([[1, 4], [0, 3], [2, 5], [0, 3], [0, 3], [1, 4], [2, 5], [0, 3], [1, 4], [2, 5]])
96+
Nx.tensor([
97+
[1, 4],
98+
[0, 3],
99+
[2, 5],
100+
[0, 3],
101+
[0, 3],
102+
[1, 4],
103+
[2, 5],
104+
[0, 3],
105+
[1, 4],
106+
[2, 5]
107+
])
97108

98109
model = KNNRegressor.fit(x_train(), y, num_neighbors: 3)
99110
y_pred = KNNRegressor.predict(model, x())
@@ -111,7 +122,18 @@ defmodule Scholar.Neighbors.KNNRegressorTest do
111122

112123
test "predict with 2D labels, cosine metric and weights set to :distance" do
113124
y =
114-
Nx.tensor([[1, 4], [0, 3], [2, 5], [0, 3], [0, 3], [1, 4], [2, 5], [0, 3], [1, 4], [2, 5]])
125+
Nx.tensor([
126+
[1, 4],
127+
[0, 3],
128+
[2, 5],
129+
[0, 3],
130+
[0, 3],
131+
[1, 4],
132+
[2, 5],
133+
[0, 3],
134+
[1, 4],
135+
[2, 5]
136+
])
115137

116138
model =
117139
KNNRegressor.fit(x_train(), y, num_neighbors: 3, metric: :cosine, weights: :distance)

test/scholar/neighbors/rnn_regressor_test.exs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,18 @@ defmodule Scholar.Neighbors.RadiusNNRegressorTest do
5454

5555
test "predict with weights set to :distance and with specific metric and 2d labels" do
5656
y =
57-
Nx.tensor([[1, 4], [0, 3], [2, 5], [0, 3], [0, 3], [1, 4], [2, 5], [0, 3], [1, 4], [2, 5]])
57+
Nx.tensor([
58+
[1, 4],
59+
[0, 3],
60+
[2, 5],
61+
[0, 3],
62+
[0, 3],
63+
[1, 4],
64+
[2, 5],
65+
[0, 3],
66+
[1, 4],
67+
[2, 5]
68+
])
5869

5970
model =
6071
RadiusNNRegressor.fit(x(), y,

0 commit comments

Comments
 (0)