[INFO] cloning repository https://github.com/ulloacastillo/wasm-decision-tree [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/ulloacastillo/wasm-decision-tree" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fulloacastillo%2Fwasm-decision-tree", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fulloacastillo%2Fwasm-decision-tree'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] c218f526ad4ebfd2b28dde09554450598eddcb7a [INFO] testing ulloacastillo/wasm-decision-tree against 1.85.0 for beta-1.86-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fulloacastillo%2Fwasm-decision-tree" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/ulloacastillo/wasm-decision-tree on toolchain 1.85.0 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+1.85.0" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/ulloacastillo/wasm-decision-tree [INFO] finished tweaking git repo https://github.com/ulloacastillo/wasm-decision-tree [INFO] tweaked toml for git repo https://github.com/ulloacastillo/wasm-decision-tree written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/ulloacastillo/wasm-decision-tree already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+1.85.0" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:3959728d45483eb673ba100a951a6b9f5012970368db2a9e08e0ac9b67c8a5ad" "/opt/rustwide/cargo-home/bin/cargo" "+1.85.0" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] f9976e86a5d7df8e685263198afb9ca94df9a694a0595ead043bebb29e1d47a9 [INFO] running `Command { std: "docker" "start" "-a" "f9976e86a5d7df8e685263198afb9ca94df9a694a0595ead043bebb29e1d47a9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "f9976e86a5d7df8e685263198afb9ca94df9a694a0595ead043bebb29e1d47a9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f9976e86a5d7df8e685263198afb9ca94df9a694a0595ead043bebb29e1d47a9", kill_on_drop: false }` [INFO] [stdout] f9976e86a5d7df8e685263198afb9ca94df9a694a0595ead043bebb29e1d47a9 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:3959728d45483eb673ba100a951a6b9f5012970368db2a9e08e0ac9b67c8a5ad" "/opt/rustwide/cargo-home/bin/cargo" "+1.85.0" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 792de6af24db78f2ccd18958b83aa4234eb3577bff323a934632e249840ce91b [INFO] running `Command { std: "docker" "start" "-a" "792de6af24db78f2ccd18958b83aa4234eb3577bff323a934632e249840ce91b", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.39 [INFO] [stderr] Compiling unicode-ident v1.0.1 [INFO] [stderr] Compiling syn v1.0.96 [INFO] [stderr] Compiling cfg-if v1.0.0 [INFO] [stderr] Compiling serde_derive v1.0.137 [INFO] [stderr] Compiling lazy_static v1.4.0 [INFO] [stderr] Compiling wasm-bindgen-shared v0.2.81 [INFO] [stderr] Compiling log v0.4.17 [INFO] [stderr] Compiling serde v1.0.137 [INFO] [stderr] Compiling libc v0.2.126 [INFO] [stderr] Compiling memchr v2.5.0 [INFO] [stderr] Compiling bumpalo v3.10.0 [INFO] [stderr] Compiling serde_json v1.0.81 [INFO] [stderr] Compiling ryu v1.0.10 [INFO] [stderr] Compiling ppv-lite86 v0.2.16 [INFO] [stderr] Compiling wasm-bindgen v0.2.81 [INFO] [stderr] Compiling itoa v1.0.2 [INFO] [stderr] Compiling regex-automata v0.1.10 [INFO] [stderr] Compiling itoa v0.4.8 [INFO] [stderr] Compiling csv-core v0.1.10 [INFO] [stderr] Compiling quote v1.0.18 [INFO] [stderr] Compiling getrandom v0.2.7 [INFO] [stderr] Compiling rand_core v0.6.3 [INFO] [stderr] Compiling rand_chacha v0.3.1 [INFO] [stderr] Compiling rand v0.8.5 [INFO] [stderr] Compiling wasm-bindgen-backend v0.2.81 [INFO] [stderr] Compiling wasm-bindgen-macro-support v0.2.81 [INFO] [stderr] Compiling wasm-bindgen-macro v0.2.81 [INFO] [stderr] Compiling bstr v0.2.17 [INFO] [stderr] Compiling csv v1.1.6 [INFO] [stderr] Compiling wasm-dtree v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/lib.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `csv::Error` [INFO] [stdout] --> src/lib.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use csv::Error; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `console_error_panic_hook` [INFO] [stdout] --> src/utils.rs:8:11 [INFO] [stdout] | [INFO] [stdout] 8 | #[cfg(feature = "console_error_panic_hook")] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the condition [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = help: consider adding `console_error_panic_hook` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude` [INFO] [stdout] --> src/lib.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `num_samples` [INFO] [stdout] --> src/lib.rs:113:75 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_num_samples` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n_test` [INFO] [stdout] --> src/lib.rs:282:9 [INFO] [stdout] | [INFO] [stdout] 282 | let n_test = X.len() - n_train; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_n_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `X_test` [INFO] [stdout] --> src/lib.rs:394:9 [INFO] [stdout] | [INFO] [stdout] 394 | let X_test: Vec> = vec![vec![5.0,3.4,1.5,0.2], vec![4.4,2.9,1.4,0.2], vec![4.9,3.1,1.5,0.1], vec![5.6,2.9,3.6,1.3], vec![6.2... [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_X_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BestSplitStruct` is never constructed [INFO] [stdout] --> src/lib.rs:28:8 [INFO] [stdout] | [INFO] [stdout] 28 | struct BestSplitStruct { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/lib.rs:49:12 [INFO] [stdout] | [INFO] [stdout] 48 | impl Node{ [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 49 | pub fn new(fi: usize, th: f32, v: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/lib.rs:71:12 [INFO] [stdout] | [INFO] [stdout] 70 | impl DecisionTreeClassifier { [INFO] [stdout] | ---------------------------- associated items in this implementation [INFO] [stdout] 71 | pub fn new(mss: usize, md: usize) -> Self{ [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 79 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 113 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 158 | pub fn gini_index(&mut self, Y: &Vec) -> f32 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 174 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 199 | pub fn information_gain(&mut self, parent: &Vec, l_child: &Vec, r_child: &Vec) -> f32{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 209 | pub fn calculate_leaf_value(&mut self, Y: &Vec ) -> String{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 233 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 237 | pub fn make_prediction(&self, X: &Vec, tree: &Option>) -> String{ [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 259 | pub fn predict(&self, X: &Vec>) -> Vec { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `split_dataset` is never used [INFO] [stdout] --> src/lib.rs:280:4 [INFO] [stdout] | [INFO] [stdout] 280 | fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `accuracy_per_label` is never used [INFO] [stdout] --> src/lib.rs:315:4 [INFO] [stdout] | [INFO] [stdout] 315 | fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `set_panic_hook` is never used [INFO] [stdout] --> src/utils.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn set_panic_hook() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unique_vals` is never used [INFO] [stdout] --> src/utils.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn unique_vals(arr: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unique_vals_f32` is never used [INFO] [stdout] --> src/utils.rs:22:8 [INFO] [stdout] | [INFO] [stdout] 22 | pub fn unique_vals_f32(arr: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_vals` is never used [INFO] [stdout] --> src/utils.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn count_vals(arr: &Vec, label: String) -> usize { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_column` is never used [INFO] [stdout] --> src/utils.rs:43:8 [INFO] [stdout] | [INFO] [stdout] 43 | pub fn get_column(matrix: &Vec>, col: usize) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:79:34 [INFO] [stdout] | [INFO] [stdout] 79 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:79:53 [INFO] [stdout] | [INFO] [stdout] 79 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:113:38 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:113:57 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:158:34 [INFO] [stdout] | [INFO] [stdout] 158 | pub fn gini_index(&mut self, Y: &Vec) -> f32 { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:174:29 [INFO] [stdout] | [INFO] [stdout] 174 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:174:48 [INFO] [stdout] | [INFO] [stdout] 174 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:209:44 [INFO] [stdout] | [INFO] [stdout] 209 | pub fn calculate_leaf_value(&mut self, Y: &Vec ) -> String{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:233:27 [INFO] [stdout] | [INFO] [stdout] 233 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:233:46 [INFO] [stdout] | [INFO] [stdout] 233 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:237:35 [INFO] [stdout] | [INFO] [stdout] 237 | pub fn make_prediction(&self, X: &Vec, tree: &Option>) -> String{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:259:27 [INFO] [stdout] | [INFO] [stdout] 259 | pub fn predict(&self, X: &Vec>) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:280:18 [INFO] [stdout] | [INFO] [stdout] 280 | fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:280:41 [INFO] [stdout] | [INFO] [stdout] 280 | fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_test` should have a snake case name [INFO] [stdout] --> src/lib.rs:284:13 [INFO] [stdout] | [INFO] [stdout] 284 | let mut X_test: Vec> = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_train` should have a snake case name [INFO] [stdout] --> src/lib.rs:285:13 [INFO] [stdout] | [INFO] [stdout] 285 | let mut X_train: Vec> = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_test` should have a snake case name [INFO] [stdout] --> src/lib.rs:286:13 [INFO] [stdout] | [INFO] [stdout] 286 | let mut Y_test: Vec = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_train` should have a snake case name [INFO] [stdout] --> src/lib.rs:287:13 [INFO] [stdout] | [INFO] [stdout] 287 | let mut Y_train: Vec = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:315:23 [INFO] [stdout] | [INFO] [stdout] 315 | fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_hat` should have a snake case name [INFO] [stdout] --> src/lib.rs:315:40 [INFO] [stdout] | [INFO] [stdout] 315 | fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_hat` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_test` should have a snake case name [INFO] [stdout] --> src/lib.rs:394:9 [INFO] [stdout] | [INFO] [stdout] 394 | let X_test: Vec> = vec![vec![5.0,3.4,1.5,0.2], vec![4.4,2.9,1.4,0.2], vec![4.9,3.1,1.5,0.1], vec![5.6,2.9,3.6,1.3], vec![6.2... [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 17.36s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: wasm-bindgen v0.2.81 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1` [INFO] running `Command { std: "docker" "inspect" "792de6af24db78f2ccd18958b83aa4234eb3577bff323a934632e249840ce91b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "792de6af24db78f2ccd18958b83aa4234eb3577bff323a934632e249840ce91b", kill_on_drop: false }` [INFO] [stdout] 792de6af24db78f2ccd18958b83aa4234eb3577bff323a934632e249840ce91b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:3959728d45483eb673ba100a951a6b9f5012970368db2a9e08e0ac9b67c8a5ad" "/opt/rustwide/cargo-home/bin/cargo" "+1.85.0" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] bbb205b8529a6330a77fd0e7d98ecabec056bb0415805bf297eed53bb82d2783 [INFO] running `Command { std: "docker" "start" "-a" "bbb205b8529a6330a77fd0e7d98ecabec056bb0415805bf297eed53bb82d2783", kill_on_drop: false }` [INFO] [stderr] Compiling wasm-dtree v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/lib.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `csv::Error` [INFO] [stdout] --> src/lib.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use csv::Error; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `console_error_panic_hook` [INFO] [stdout] --> src/utils.rs:8:11 [INFO] [stdout] | [INFO] [stdout] 8 | #[cfg(feature = "console_error_panic_hook")] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the condition [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = help: consider adding `console_error_panic_hook` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude` [INFO] [stdout] --> src/lib.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `num_samples` [INFO] [stdout] --> src/lib.rs:113:75 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_num_samples` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n_test` [INFO] [stdout] --> src/lib.rs:282:9 [INFO] [stdout] | [INFO] [stdout] 282 | let n_test = X.len() - n_train; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_n_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `X_test` [INFO] [stdout] --> src/lib.rs:394:9 [INFO] [stdout] | [INFO] [stdout] 394 | let X_test: Vec> = vec![vec![5.0,3.4,1.5,0.2], vec![4.4,2.9,1.4,0.2], vec![4.9,3.1,1.5,0.1], vec![5.6,2.9,3.6,1.3], vec![6.2... [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_X_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BestSplitStruct` is never constructed [INFO] [stdout] --> src/lib.rs:28:8 [INFO] [stdout] | [INFO] [stdout] 28 | struct BestSplitStruct { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/lib.rs:49:12 [INFO] [stdout] | [INFO] [stdout] 48 | impl Node{ [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 49 | pub fn new(fi: usize, th: f32, v: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/lib.rs:71:12 [INFO] [stdout] | [INFO] [stdout] 70 | impl DecisionTreeClassifier { [INFO] [stdout] | ---------------------------- associated items in this implementation [INFO] [stdout] 71 | pub fn new(mss: usize, md: usize) -> Self{ [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 79 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 113 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 158 | pub fn gini_index(&mut self, Y: &Vec) -> f32 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 174 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 199 | pub fn information_gain(&mut self, parent: &Vec, l_child: &Vec, r_child: &Vec) -> f32{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 209 | pub fn calculate_leaf_value(&mut self, Y: &Vec ) -> String{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 233 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 237 | pub fn make_prediction(&self, X: &Vec, tree: &Option>) -> String{ [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 259 | pub fn predict(&self, X: &Vec>) -> Vec { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `split_dataset` is never used [INFO] [stdout] --> src/lib.rs:280:4 [INFO] [stdout] | [INFO] [stdout] 280 | fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `accuracy_per_label` is never used [INFO] [stdout] --> src/lib.rs:315:4 [INFO] [stdout] | [INFO] [stdout] 315 | fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `set_panic_hook` is never used [INFO] [stdout] --> src/utils.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn set_panic_hook() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unique_vals` is never used [INFO] [stdout] --> src/utils.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn unique_vals(arr: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unique_vals_f32` is never used [INFO] [stdout] --> src/utils.rs:22:8 [INFO] [stdout] | [INFO] [stdout] 22 | pub fn unique_vals_f32(arr: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_vals` is never used [INFO] [stdout] --> src/utils.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn count_vals(arr: &Vec, label: String) -> usize { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_column` is never used [INFO] [stdout] --> src/utils.rs:43:8 [INFO] [stdout] | [INFO] [stdout] 43 | pub fn get_column(matrix: &Vec>, col: usize) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:79:34 [INFO] [stdout] | [INFO] [stdout] 79 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:79:53 [INFO] [stdout] | [INFO] [stdout] 79 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:113:38 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:113:57 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:158:34 [INFO] [stdout] | [INFO] [stdout] 158 | pub fn gini_index(&mut self, Y: &Vec) -> f32 { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:174:29 [INFO] [stdout] | [INFO] [stdout] 174 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:174:48 [INFO] [stdout] | [INFO] [stdout] 174 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:209:44 [INFO] [stdout] | [INFO] [stdout] 209 | pub fn calculate_leaf_value(&mut self, Y: &Vec ) -> String{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:233:27 [INFO] [stdout] | [INFO] [stdout] 233 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:233:46 [INFO] [stdout] | [INFO] [stdout] 233 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:237:35 [INFO] [stdout] | [INFO] [stdout] 237 | pub fn make_prediction(&self, X: &Vec, tree: &Option>) -> String{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:259:27 [INFO] [stdout] | [INFO] [stdout] 259 | pub fn predict(&self, X: &Vec>) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:280:18 [INFO] [stdout] | [INFO] [stdout] 280 | fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:280:41 [INFO] [stdout] | [INFO] [stdout] 280 | fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_test` should have a snake case name [INFO] [stdout] --> src/lib.rs:284:13 [INFO] [stdout] | [INFO] [stdout] 284 | let mut X_test: Vec> = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_train` should have a snake case name [INFO] [stdout] --> src/lib.rs:285:13 [INFO] [stdout] | [INFO] [stdout] 285 | let mut X_train: Vec> = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_test` should have a snake case name [INFO] [stdout] --> src/lib.rs:286:13 [INFO] [stdout] | [INFO] [stdout] 286 | let mut Y_test: Vec = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_train` should have a snake case name [INFO] [stdout] --> src/lib.rs:287:13 [INFO] [stdout] | [INFO] [stdout] 287 | let mut Y_train: Vec = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:315:23 [INFO] [stdout] | [INFO] [stdout] 315 | fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_hat` should have a snake case name [INFO] [stdout] --> src/lib.rs:315:40 [INFO] [stdout] | [INFO] [stdout] 315 | fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_hat` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_test` should have a snake case name [INFO] [stdout] --> src/lib.rs:394:9 [INFO] [stdout] | [INFO] [stdout] 394 | let X_test: Vec> = vec![vec![5.0,3.4,1.5,0.2], vec![4.4,2.9,1.4,0.2], vec![4.9,3.1,1.5,0.1], vec![5.6,2.9,3.6,1.3], vec![6.2... [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.61s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: wasm-bindgen v0.2.81 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1` [INFO] running `Command { std: "docker" "inspect" "bbb205b8529a6330a77fd0e7d98ecabec056bb0415805bf297eed53bb82d2783", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "bbb205b8529a6330a77fd0e7d98ecabec056bb0415805bf297eed53bb82d2783", kill_on_drop: false }` [INFO] [stdout] bbb205b8529a6330a77fd0e7d98ecabec056bb0415805bf297eed53bb82d2783 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:3959728d45483eb673ba100a951a6b9f5012970368db2a9e08e0ac9b67c8a5ad" "/opt/rustwide/cargo-home/bin/cargo" "+1.85.0" "test" "--frozen", kill_on_drop: false }` [INFO] [stdout] 3019e8fa70fe717a643eb6c10e7186af342cdaa34c14b4e58fd30763242008be [INFO] running `Command { std: "docker" "start" "-a" "3019e8fa70fe717a643eb6c10e7186af342cdaa34c14b4e58fd30763242008be", kill_on_drop: false }` [INFO] [stderr] warning: unused import: `std::fs::File` [INFO] [stdout] [INFO] [stderr] --> src/lib.rs:1:5 [INFO] [stdout] running 0 tests [INFO] [stderr] | [INFO] [stdout] [INFO] [stderr] 1 | use std::fs::File; [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_imports)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused import: `csv::Error` [INFO] [stderr] --> src/lib.rs:4:5 [INFO] [stderr] | [INFO] [stderr] 4 | use csv::Error; [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unexpected `cfg` condition value: `console_error_panic_hook` [INFO] [stderr] --> src/utils.rs:8:11 [INFO] [stderr] | [INFO] [stderr] 8 | #[cfg(feature = "console_error_panic_hook")] [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the condition [INFO] [stderr] | [INFO] [stderr] = note: no expected values for `feature` [INFO] [stderr] = help: consider adding `console_error_panic_hook` as a feature in `Cargo.toml` [INFO] [stderr] = note: see for more information about checking conditional configuration [INFO] [stderr] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused import: `std::io::prelude` [INFO] [stderr] --> src/lib.rs:2:5 [INFO] [stderr] | [INFO] [stderr] 2 | use std::io::prelude::*; [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused variable: `num_samples` [INFO] [stderr] --> src/lib.rs:113:75 [INFO] [stderr] | [INFO] [stderr] 113 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stderr] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_num_samples` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_variables)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused variable: `n_test` [INFO] [stderr] --> src/lib.rs:282:9 [INFO] [stderr] | [INFO] [stderr] 282 | let n_test = X.len() - n_train; [INFO] [stderr] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_n_test` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `X_test` [INFO] [stderr] --> src/lib.rs:394:9 [INFO] [stderr] | [INFO] [stderr] 394 | let X_test: Vec> = vec![vec![5.0,3.4,1.5,0.2], vec![4.4,2.9,1.4,0.2], vec![4.9,3.1,1.5,0.1], vec![5.6,2.9,3.6,1.3], vec![6.2... [INFO] [stderr] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_X_test` [INFO] [stderr] [INFO] [stderr] warning: struct `BestSplitStruct` is never constructed [INFO] [stderr] --> src/lib.rs:28:8 [INFO] [stderr] | [INFO] [stderr] 28 | struct BestSplitStruct { [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(dead_code)]` on by default [INFO] [stderr] [INFO] [stderr] warning: associated function `new` is never used [INFO] [stderr] --> src/lib.rs:49:12 [INFO] [stderr] | [INFO] [stderr] 48 | impl Node{ [INFO] [stderr] | --------- associated function in this implementation [INFO] [stderr] 49 | pub fn new(fi: usize, th: f32, v: String) -> Self { [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: multiple associated items are never used [INFO] [stderr] --> src/lib.rs:71:12 [INFO] [stderr] | [INFO] [stderr] 70 | impl DecisionTreeClassifier { [INFO] [stderr] | ---------------------------- associated items in this implementation [INFO] [stderr] 71 | pub fn new(mss: usize, md: usize) -> Self{ [INFO] [stderr] | ^^^ [INFO] [stderr] ... [INFO] [stderr] 79 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 113 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stderr] | ^^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 158 | pub fn gini_index(&mut self, Y: &Vec) -> f32 { [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 174 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stderr] | ^^^^^ [INFO] [stderr] ... [INFO] [stderr] 199 | pub fn information_gain(&mut self, parent: &Vec, l_child: &Vec, r_child: &Vec) -> f32{ [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 209 | pub fn calculate_leaf_value(&mut self, Y: &Vec ) -> String{ [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 233 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stderr] | ^^^ [INFO] [stderr] ... [INFO] [stderr] 237 | pub fn make_prediction(&self, X: &Vec, tree: &Option>) -> String{ [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] ... [INFO] [stderr] 259 | pub fn predict(&self, X: &Vec>) -> Vec { [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function `split_dataset` is never used [INFO] [stderr] --> src/lib.rs:280:4 [INFO] [stderr] | [INFO] [stderr] 280 | fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec) { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function `accuracy_per_label` is never used [INFO] [stderr] --> src/lib.rs:315:4 [INFO] [stderr] | [INFO] [stderr] 315 | fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function `set_panic_hook` is never used [INFO] [stderr] --> src/utils.rs:1:8 [INFO] [stderr] | [INFO] [stderr] 1 | pub fn set_panic_hook() { [INFO] [stderr] | ^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function `unique_vals` is never used [INFO] [stderr] --> src/utils.rs:12:8 [INFO] [stderr] | [INFO] [stderr] 12 | pub fn unique_vals(arr: &Vec) -> Vec { [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function `unique_vals_f32` is never used [INFO] [stderr] --> src/utils.rs:22:8 [INFO] [stderr] | [INFO] [stderr] 22 | pub fn unique_vals_f32(arr: &Vec) -> Vec { [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function `count_vals` is never used [INFO] [stderr] --> src/utils.rs:32:8 [INFO] [stderr] | [INFO] [stderr] 32 | pub fn count_vals(arr: &Vec, label: String) -> usize { [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function `get_column` is never used [INFO] [stderr] --> src/utils.rs:43:8 [INFO] [stderr] | [INFO] [stderr] 43 | pub fn get_column(matrix: &Vec>, col: usize) -> Vec{ [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: variable `X` should have a snake case name [INFO] [stderr] --> src/lib.rs:79:34 [INFO] [stderr] | [INFO] [stderr] 79 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(non_snake_case)]` on by default [INFO] [stderr] [INFO] [stderr] warning: variable `Y` should have a snake case name [INFO] [stderr] --> src/lib.rs:79:53 [INFO] [stderr] | [INFO] [stderr] 79 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stderr] [INFO] [stderr] warning: variable `X` should have a snake case name [INFO] [stderr] --> src/lib.rs:113:38 [INFO] [stderr] | [INFO] [stderr] 113 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stderr] [INFO] [stderr] warning: variable `Y` should have a snake case name [INFO] [stderr] --> src/lib.rs:113:57 [INFO] [stderr] | [INFO] [stderr] 113 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stderr] [INFO] [stderr] warning: variable `Y` should have a snake case name [INFO] [stderr] --> src/lib.rs:158:34 [INFO] [stderr] | [INFO] [stderr] 158 | pub fn gini_index(&mut self, Y: &Vec) -> f32 { [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stderr] [INFO] [stderr] warning: variable `X` should have a snake case name [INFO] [stderr] --> src/lib.rs:174:29 [INFO] [stderr] | [INFO] [stderr] 174 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stderr] [INFO] [stderr] warning: variable `Y` should have a snake case name [INFO] [stderr] --> src/lib.rs:174:48 [INFO] [stderr] | [INFO] [stderr] 174 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stderr] [INFO] [stderr] warning: variable `Y` should have a snake case name [INFO] [stderr] --> src/lib.rs:209:44 [INFO] [stderr] | [INFO] [stderr] 209 | pub fn calculate_leaf_value(&mut self, Y: &Vec ) -> String{ [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stderr] [INFO] [stderr] warning: variable `X` should have a snake case name [INFO] [stderr] --> src/lib.rs:233:27 [INFO] [stderr] | [INFO] [stderr] 233 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stderr] [INFO] [stderr] warning: variable `Y` should have a snake case name [INFO] [stderr] --> src/lib.rs:233:46 [INFO] [stderr] | [INFO] [stderr] 233 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stderr] [INFO] [stderr] warning: variable `X` should have a snake case name [INFO] [stderr] --> src/lib.rs:237:35 [INFO] [stderr] | [INFO] [stderr] 237 | pub fn make_prediction(&self, X: &Vec, tree: &Option>) -> String{ [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stderr] [INFO] [stderr] warning: variable `X` should have a snake case name [INFO] [stderr] --> src/lib.rs:259:27 [INFO] [stderr] | [INFO] [stderr] 259 | pub fn predict(&self, X: &Vec>) -> Vec { [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stderr] [INFO] [stderr] warning: variable `X` should have a snake case name [INFO] [stderr] --> src/lib.rs:280:18 [INFO] [stderr] | [INFO] [stderr] 280 | fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec) { [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stderr] [INFO] [stderr] warning: variable `Y` should have a snake case name [INFO] [stderr] --> src/lib.rs:280:41 [INFO] [stderr] | [INFO] [stderr] 280 | fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec) { [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stderr] [INFO] [stderr] warning: variable `X_test` should have a snake case name [INFO] [stderr] --> src/lib.rs:284:13 [INFO] [stderr] | [INFO] [stderr] 284 | let mut X_test: Vec> = vec![]; [INFO] [stderr] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stderr] [INFO] [stderr] warning: variable `X_train` should have a snake case name [INFO] [stderr] --> src/lib.rs:285:13 [INFO] [stderr] | [INFO] [stderr] 285 | let mut X_train: Vec> = vec![]; [INFO] [stderr] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_train` [INFO] [stderr] [INFO] [stderr] warning: variable `Y_test` should have a snake case name [INFO] [stderr] --> src/lib.rs:286:13 [INFO] [stderr] | [INFO] [stderr] 286 | let mut Y_test: Vec = vec![]; [INFO] [stderr] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_test` [INFO] [stderr] [INFO] [stderr] warning: variable `Y_train` should have a snake case name [INFO] [stderr] --> src/lib.rs:287:13 [INFO] [stderr] | [INFO] [stderr] 287 | let mut Y_train: Vec = vec![]; [INFO] [stderr] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_train` [INFO] [stderr] [INFO] [stderr] warning: variable `Y` should have a snake case name [INFO] [stderr] --> src/lib.rs:315:23 [INFO] [stderr] | [INFO] [stderr] 315 | fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stderr] [INFO] [stderr] warning: variable `Y_hat` should have a snake case name [INFO] [stderr] --> src/lib.rs:315:40 [INFO] [stderr] | [INFO] [stderr] 315 | fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stderr] | ^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_hat` [INFO] [stderr] [INFO] [stderr] warning: variable `X_test` should have a snake case name [INFO] [stderr] --> src/lib.rs:394:9 [INFO] [stderr] | [INFO] [stderr] 394 | let X_test: Vec> = vec![vec![5.0,3.4,1.5,0.2], vec![4.4,2.9,1.4,0.2], vec![4.9,3.1,1.5,0.1], vec![5.6,2.9,3.6,1.3], vec![6.2... [INFO] [stderr] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stderr] [INFO] [stderr] warning: `wasm-dtree` (lib test) generated 38 warnings (run `cargo fix --lib -p wasm-dtree --tests` to apply 2 suggestions) [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.05s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: wasm-bindgen v0.2.81 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1` [INFO] [stderr] Running unittests src/lib.rs (/opt/rustwide/target/debug/deps/wasm_dtree-7c7c0fab28db855b) [INFO] running `Command { std: "docker" "inspect" "3019e8fa70fe717a643eb6c10e7186af342cdaa34c14b4e58fd30763242008be", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3019e8fa70fe717a643eb6c10e7186af342cdaa34c14b4e58fd30763242008be", kill_on_drop: false }` [INFO] [stdout] 3019e8fa70fe717a643eb6c10e7186af342cdaa34c14b4e58fd30763242008be