Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes around cargo deny #1485

Merged
merged 6 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/beta-and-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
run: rustup update
- name: Install cargo-deny
run: |
curl -L https://github.com/EmbarkStudios/cargo-deny/releases/download/0.14.19/cargo-deny-0.14.19-x86_64-unknown-linux-musl.tar.gz \
| tar -zx --strip-components=1 "cargo-deny-0.14.19-x86_64-unknown-linux-musl/cargo-deny"
curl -L https://github.com/EmbarkStudios/cargo-deny/releases/download/0.14.24/cargo-deny-0.14.24-x86_64-unknown-linux-musl.tar.gz \
| tar -zx --strip-components=1 "cargo-deny-0.14.24-x86_64-unknown-linux-musl/cargo-deny"
- name: Run cargo-deny
run: .travis/cargo-deny-check.sh
5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ anstyle-query = "1.0.0"
anstyle = "1.0.2"
anyhow = "1.0.43"
approx = "0.5"
atty = "0.2.14"
bit-set= "0.5.2"
blis-src = { version = "0.2", features = ["static", "pthreads"] }
boow = "0.1.3"
Expand All @@ -71,7 +70,7 @@ cblas = "0.4"
cc = "1.0.69"
clap = { version = "~3.1", features = [ "cargo" ] }
colorous = "1.0.5"
criterion = "0.4"
criterion = "0.5.1"
derive-new = "0.5.9"
dinghy-test = "0.6"
downcast-rs = "1.2.0"
Expand All @@ -87,7 +86,7 @@ half = { version="2.4", features = [ "std", "num-traits" ] }
image = "0.24.1"
itertools = "0.12.1"
home = "0.5.5"
lazy_static = "1.4.0"
lazy_static = "1.5.0"
liquid = "0.26"
liquid-core = "0.26"
log = "0.4.14"
Expand Down
1 change: 0 additions & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ include = [ "Cargo.toml", "src/**/*.rs", "LICENSE*" ]
maintenance = { status = "actively-developed" }

[dependencies]
atty.workspace = true
box_drawing.workspace = true
clap.workspace = true
criterion.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ proptest.workspace = true

[target.'cfg(target_family = "wasm")'.dev-dependencies]
# Wasm doesn't support the `rayon` feature of criterion
criterion = { version = "0.4", default-features = false, features = ["plotters", "cargo_bench_support"] }
criterion = { version = "0.5", default-features = false, features = ["plotters", "cargo_bench_support"] }
# Wasm doesn't support the `fork` feature of proptest.
proptest = { version = "1.0.0", default-features = false, features = ["std", "bit-set"] }
2 changes: 1 addition & 1 deletion core/src/ops/change_axes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ pub fn wire_with_rank_broadcast(
) -> TractResult<TVec<OutletId>> {
let prefix = prefix.as_ref();
let wires = wire_rank_broadcast(prefix, target, inputs)?;
target.wire_node(prefix, &op.into(), &wires)
target.wire_node(prefix, op.into(), &wires)
}

#[derive(Clone, Debug, PartialEq, Eq, Hash)]
Expand Down
2 changes: 1 addition & 1 deletion data/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ proptest.workspace = true

[target.'cfg(target_family = "wasm")'.dev-dependencies]
# Wasm doesn't support the `rayon` feature of criterion
criterion = { version = "0.4", default-features = false, features = ["plotters", "cargo_bench_support"] }
criterion = { version = "0.5", default-features = false, features = ["plotters", "cargo_bench_support"] }
# Wasm doesn't support the `fork` feature of proptest.
proptest = { version = "1.0.0", default-features = false, features = ["std", "bit-set"] }

Expand Down
1 change: 1 addition & 0 deletions data/src/dim/sym.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ impl SymbolScope {
Ok(())
}

#[allow(clippy::mutable_key_type)]
pub fn prove_positive(&self, t: &TDim) -> bool {
if let TDim::Val(v) = t {
return *v >= 0;
Expand Down
3 changes: 0 additions & 3 deletions data/src/dim/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,6 @@ impl TDim {

pub fn gcd(&self) -> u64 {
use self::TDim::*;
use num_integer::Integer;
match self {
Val(v) => v.unsigned_abs(),
Sym(_) => 1,
Expand All @@ -555,7 +554,6 @@ impl TDim {

fn div(&self, d: u64) -> TDim {
use self::TDim::*;
use num_integer::Integer;
if d == 1 {
return self.clone();
}
Expand Down Expand Up @@ -638,7 +636,6 @@ impl TDim {
}

pub(super) fn reduce_ratio(mut p: i64, mut q: i64) -> (i64, u64) {
use num_integer::Integer;
let gcd = p.abs().gcd(&q.abs());
if gcd > 1 {
p /= gcd;
Expand Down
5 changes: 1 addition & 4 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,9 @@ targets = [
]

[advisories]
version = 2
git-fetch-with-cli = true
yanked = "deny"
ignore = [
"RUSTSEC-2021-0145", # in atty, only impacts benches (through criterion) or pytorch example
"RUSTSEC-2023-0080", # transpose has an unsafe method, but rustfst uses it a safe predictable manner
]

[bans]
Expand All @@ -35,7 +32,7 @@ deny = [

# Skip some multiple-versions checks, until they can be fixed.
skip = [
{ name = "itertools", version="<0.12.1" },
{ name = "itertools", version="<=0.12.1" },
{ name = "regex-syntax", version="<8" },
{ name = "syn", version="<2" },
]
Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch-albert-v2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ anstyle-query.workspace = true
ndarray.workspace = true
tokenizers.workspace = true
clap_builder = { version = "4.4" }
clap_lex = { version = "0.6" }
clap_lex = { version = "0.7" }
tract-onnx = { path = "../../onnx", version = "=0.21.7-pre" }
2 changes: 1 addition & 1 deletion examples/pytorch-resnet/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
torch==1.13.1
torch==2.2
torchvision==0.4.2
2 changes: 1 addition & 1 deletion linalg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ proptest.workspace = true

[target.'cfg(target_family = "wasm")'.dev-dependencies]
# Wasm doesn't support the `rayon` feature of criterion
criterion = { version = "0.4", default-features = false, features = ["plotters", "cargo_bench_support"] }
criterion = { version = "0.5", default-features = false, features = ["plotters", "cargo_bench_support"] }
# Wasm doesn't support the `fork` feature of proptest.
proptest = { version = "1.0.0", default-features = false, features = ["std", "bit-set"] }

Expand Down
1 change: 1 addition & 0 deletions linalg/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#![allow(clippy::excessive_precision)]
#![allow(clippy::approx_constant)]
#![allow(unexpected_cfgs)]
#![allow(unused_macros)]
#[macro_use]
extern crate derive_new;
extern crate lazy_static;
Expand Down
Loading