Skip to content

Commit 5545015

Browse files
relfladezai
authored andcommitted
CI actions maintenance: pin ndarray 0.16 (#420)
* Patch actions to use ndarray 0.16 * Add forgotten patch * Linting * Fix doc broken link * Fix "Attempting to handle tarpaulin being signaled" error cf. xd009642/tarpaulin#1056
1 parent a974e5a commit 5545015

7 files changed

Lines changed: 28 additions & 4 deletions

File tree

.github/workflows/benching.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,8 @@ jobs:
1414
- name: Install toolchain
1515
uses: dtolnay/rust-toolchain@stable
1616

17+
- name: Update ndarray to 0.16.1 (temporary workaround to avoid pulling ndarray 0.17.1)
18+
run: cargo update -p ndarray:0.17.1 --precise 0.16.1
19+
1720
- name: Run cargo bench iai
1821
run: cargo bench iai --all

.github/workflows/checking.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ jobs:
3131
- name: Log active toolchain
3232
run: rustup show
3333

34+
- name: Update ndarray to 0.16.1 (temporary workaround to avoid pulling ndarray 0.17.1)
35+
run: cargo update -p ndarray:0.17.1 --precise 0.16.1
36+
3437
# Check if linfa compiles by itself without uniting dependency features with other crates
3538
- name: Run cargo check on linfa
3639
run: cargo check

.github/workflows/codequality.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ jobs:
2222
toolchain: ${{ matrix.toolchain }}
2323
components: rustfmt, clippy
2424

25+
- name: Update ndarray to 0.16.1 (temporary workaround to avoid pulling ndarray 0.17.1)
26+
run: cargo update -p ndarray:0.17.1 --precise 0.16.1
27+
2528
- name: Run cargo fmt
2629
run: cargo fmt --all -- --check
2730

@@ -41,6 +44,9 @@ jobs:
4144
- name: Install toolchain
4245
uses: dtolnay/rust-toolchain@stable
4346

47+
- name: Update ndarray to 0.16.1 (temporary workaround to avoid pulling ndarray 0.17.1)
48+
run: cargo update -p ndarray:0.17.1 --precise 0.16.1
49+
4450
- name: Get rustc version
4551
id: rustc-version
4652
run: echo "::set-output name=version::$(cargo --version | cut -d ' ' -f 2)"
@@ -59,7 +65,7 @@ jobs:
5965

6066
- name: Generate code coverage
6167
run: |
62-
cargo tarpaulin --verbose --timeout 120 --out Xml --all --release
68+
cargo tarpaulin --verbose --timeout 120 --out Xml --all --release --engine llvm
6369
- name: Upload to codecov.io
6470
uses: codecov/codecov-action@v5
6571
with:

.github/workflows/docs.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ jobs:
1515
- name: 'Checkout'
1616
uses: actions/checkout@master
1717

18+
- name: Update ndarray to 0.16.1 (temporary workaround to avoid pulling ndarray 0.17.1)
19+
run: cargo update -p ndarray:0.17.1 --precise 0.16.1
20+
1821
- name: 'Build only'
1922
uses: shalzz/zola-deploy-action@master
2023
env:
@@ -39,6 +42,9 @@ jobs:
3942
with:
4043
components: rustfmt, rust-src
4144

45+
- name: Update ndarray to 0.16.1 (temporary workaround to avoid pulling ndarray 0.17.1)
46+
run: cargo update -p ndarray:0.17.1 --precise 0.16.1
47+
4248
- name: Build Documentation
4349
run: cargo doc --workspace --no-deps
4450
env:

.github/workflows/testing.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ jobs:
2525
with:
2626
toolchain: ${{ matrix.toolchain }}
2727

28+
- name: Update ndarray to 0.16.1 (temporary workaround to avoid pulling ndarray 0.17.1)
29+
run: cargo update -p ndarray:0.17.1 --precise 0.16.1
30+
2831
- name: Run cargo test
2932
run: cargo test --release --workspace
3033

@@ -50,5 +53,8 @@ jobs:
5053
with:
5154
toolchain: ${{ matrix.toolchain }}
5255

56+
- name: Update ndarray to 0.16.1 (temporary workaround to avoid pulling ndarray 0.17.1)
57+
run: cargo update -p ndarray:0.17.1 --precise 0.16.1
58+
5359
- name: Run cargo test with BLAS enabled
5460
run: cargo test --release --workspace --features intel-mkl-static,linfa-ica/blas,linfa-reduction/blas,linfa-linear/blas,linfa-preprocessing/blas,linfa-pls/blas,linfa-elasticnet/blas

algorithms/linfa-logistic/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ mod test {
876876
[9.0]
877877
];
878878
let y = array![0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0];
879-
let ws = vec![
879+
let ws = [
880880
array![0.0, 0.0],
881881
array![0.0, 1.0],
882882
array![1.0, 0.0],
@@ -937,7 +937,7 @@ mod test {
937937
[9.0]
938938
];
939939
let y = array![0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0];
940-
let ws = vec![
940+
let ws = [
941941
array![0.0, 0.0],
942942
array![0.0, 1.0],
943943
array![1.0, 0.0],

src/dataset/impl_dataset.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ where
10501050
S: DataMut<Elem = E>,
10511051
{
10521052
/// Specialized version of `cross_validate` for single-target datasets. Allows the evaluation
1053-
/// closure to return a float without wrapping it in `arr0`. See [`Dataset.cross_validate`] for
1053+
/// closure to return a float without wrapping it in `arr0`. See [`Dataset::cross_validate`] for
10541054
/// more details.
10551055
pub fn cross_validate_single<O, ER, M, FACC, C>(
10561056
&'a mut self,

0 commit comments

Comments
 (0)