Skip to content

Commit b4ec12d

Browse files
committed
Update onnx links from master -> main
the onnx/models repo has changed thier default branch to main
1 parent be2b29d commit b4ec12d

File tree

12 files changed

+101
-101
lines changed

12 files changed

+101
-101
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ To run this example ([`onnxruntime-sys/examples/c_api_sample.rs`](onnxruntime-sy
9898

9999
```sh
100100
# Download the model (SqueezeNet 1.0, ONNX version: 1.3, Opset version: 8)
101-
❯ curl -LO "https://github.com/onnx/models/raw/master/vision/classification/squeezenet/model/squeezenet1.0-8.onnx"
101+
❯ curl -LO "https://github.com/onnx/models/raw/main/vision/classification/squeezenet/model/squeezenet1.0-8.onnx"
102102
❯ cargo run --example c_api_sample
103103
[...]
104104
Finished dev [unoptimized + debuginfo] target(s) in 1.88s
@@ -150,7 +150,7 @@ To run this example ([`onnxruntime/examples/sample.rs`](onnxruntime/examples/sam
150150

151151
```sh
152152
# Download the model (SqueezeNet 1.0, ONNX version: 1.3, Opset version: 8)
153-
❯ curl -LO "https://github.com/onnx/models/raw/master/vision/classification/squeezenet/model/squeezenet1.0-8.onnx"
153+
❯ curl -LO "https://github.com/onnx/models/raw/main/vision/classification/squeezenet/model/squeezenet1.0-8.onnx"
154154
❯ cargo run --example sample
155155
[...]
156156
Finished dev [unoptimized + debuginfo] target(s) in 13.62s

onnxruntime-sys/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ fn extract_zip(filename: &Path, outpath: &Path) {
178178
let mut file = archive.by_index(i).unwrap();
179179
#[allow(deprecated)]
180180
let outpath = outpath.join(file.sanitized_name());
181-
if !(&*file.name()).ends_with('/') {
181+
if !file.name().ends_with('/') {
182182
println!(
183183
"File {} extracted to \"{}\" ({} bytes)",
184184
i,

onnxruntime-sys/examples/c_api_sample.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ fn main() {
5555
//*************************************************************************
5656
// create session and load model into memory
5757
// NOTE: Original C version loaded SqueezeNet 1.0 (ONNX version: 1.3, Opset version: 8,
58-
// https://github.com/onnx/models/blob/master/vision/classification/squeezenet/model/squeezenet1.0-8.onnx)
58+
// https://github.com/onnx/models/blob/main/vision/classification/squeezenet/model/squeezenet1.0-8.onnx)
5959
// Download it:
60-
// curl -LO "https://github.com/onnx/models/raw/master/vision/classification/squeezenet/model/squeezenet1.0-8.onnx"
61-
// Reference: https://github.com/onnx/models/tree/master/vision/classification/squeezenet#model
60+
// curl -LO "https://github.com/onnx/models/raw/main/vision/classification/squeezenet/model/squeezenet1.0-8.onnx"
61+
// Reference: https://github.com/onnx/models/tree/main/vision/classification/squeezenet#model
6262
let model_path = std::ffi::OsString::from("squeezenet1.0-8.onnx");
6363

6464
#[cfg(target_family = "windows")]

onnxruntime/examples/sample.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fn run() -> Result<(), Error> {
3838
// NOTE: The example uses SqueezeNet 1.0 (ONNX version: 1.3, Opset version: 8),
3939
// _not_ SqueezeNet 1.1 as downloaded by '.with_model_downloaded(ImageClassification::SqueezeNet)'
4040
// Obtain it with:
41-
// curl -LO "https://github.com/onnx/models/raw/master/vision/classification/squeezenet/model/squeezenet1.0-8.onnx"
41+
// curl -LO "https://github.com/onnx/models/raw/main/vision/classification/squeezenet/model/squeezenet1.0-8.onnx"
4242
.with_model_from_file("squeezenet1.0-8.onnx")?;
4343

4444
let input0_shape: Vec<usize> = session.inputs[0].dimensions().map(|d| d.unwrap()).collect();

onnxruntime/src/download/language/machine_comprehension.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,33 @@ pub enum MachineComprehension {
1818
///
1919
/// > This model is a neural network for answering a query about a given context paragraph.
2020
///
21-
/// Source: [https://github.com/onnx/models/tree/master/text/machine_comprehension/bidirectional_attention_flow](https://github.com/onnx/models/tree/master/text/machine_comprehension/bidirectional_attention_flow)
21+
/// Source: [https://github.com/onnx/models/tree/main/text/machine_comprehension/bidirectional_attention_flow](https://github.com/onnx/models/tree/main/text/machine_comprehension/bidirectional_attention_flow)
2222
///
2323
/// Variant downloaded: ONNX Version 1.4 with Opset Version 9.
2424
BiDAF,
2525
/// Answers questions based on the context of the given input paragraph.
2626
///
27-
/// Source: [https://github.com/onnx/models/tree/master/text/machine_comprehension/bert-squad](https://github.com/onnx/models/tree/master/text/machine_comprehension/bert-squad)
27+
/// Source: [https://github.com/onnx/models/tree/main/text/machine_comprehension/bert-squad](https://github.com/onnx/models/tree/main/text/machine_comprehension/bert-squad)
2828
///
2929
/// Variant downloaded: ONNX Version 1.5 with Opset Version 10.
3030
BERTSquad,
3131
/// Large transformer-based model that predicts sentiment based on given input text.
3232
///
3333
/// > Transformer-based language model for text generation.
3434
///
35-
/// Source: [https://github.com/onnx/models/tree/master/text/machine_comprehension/roberta](https://github.com/onnx/models/tree/master/text/machine_comprehension/roberta)
35+
/// Source: [https://github.com/onnx/models/tree/main/text/machine_comprehension/roberta](https://github.com/onnx/models/tree/main/text/machine_comprehension/roberta)
3636
RoBERTa(RoBERTa),
3737
/// Large transformer-based language model that given a sequence of words within some text, predicts the next word.
3838
///
39-
/// Source: [https://github.com/onnx/models/tree/master/text/machine_comprehension/gpt-2](https://github.com/onnx/models/tree/master/text/machine_comprehension/gpt-2)
39+
/// Source: [https://github.com/onnx/models/tree/main/text/machine_comprehension/gpt-2](https://github.com/onnx/models/tree/main/text/machine_comprehension/gpt-2)
4040
GPT2(GPT2),
4141
}
4242

4343
/// Large transformer-based model that predicts sentiment based on given input text.
4444
///
4545
/// > Transformer-based language model for text generation.
4646
///
47-
/// Source: [https://github.com/onnx/models/tree/master/text/machine_comprehension/roberta](https://github.com/onnx/models/tree/master/text/machine_comprehension/roberta)
47+
/// Source: [https://github.com/onnx/models/tree/main/text/machine_comprehension/roberta](https://github.com/onnx/models/tree/main/text/machine_comprehension/roberta)
4848
#[derive(Debug, Clone)]
4949
pub enum RoBERTa {
5050
/// Variant with input is a sequence of words as a string. Example: "Text to encode: Hello, World"
@@ -61,7 +61,7 @@ pub enum RoBERTa {
6161
///
6262
/// > Transformer-based language model for text generation.
6363
///
64-
/// Source: [https://github.com/onnx/models/tree/master/text/machine_comprehension/gpt-2](https://github.com/onnx/models/tree/master/text/machine_comprehension/gpt-2)
64+
/// Source: [https://github.com/onnx/models/tree/main/text/machine_comprehension/gpt-2](https://github.com/onnx/models/tree/main/text/machine_comprehension/gpt-2)
6565
///
6666
/// Variant downloaded: ONNX Version 1.6 with Opset Version 10.
6767
#[derive(Debug, Clone)]
@@ -70,16 +70,16 @@ pub enum GPT2 {
7070
GPT2,
7171
/// GPT2 + script changes
7272
///
73-
/// See [https://github.com/onnx/models/blob/master/text/machine_comprehension/gpt-2/dependencies/GPT2-export.py](https://github.com/onnx/models/blob/master/text/machine_comprehension/gpt-2/dependencies/GPT2-export.py)
73+
/// See [https://github.com/onnx/models/blob/main/text/machine_comprehension/gpt-2/dependencies/GPT2-export.py](https://github.com/onnx/models/blob/main/text/machine_comprehension/gpt-2/dependencies/GPT2-export.py)
7474
/// for the script changes.
7575
GPT2LmHead,
7676
}
7777

7878
impl ModelUrl for MachineComprehension {
7979
fn fetch_url(&self) -> &'static str {
8080
match self {
81-
MachineComprehension::BiDAF => "https://github.com/onnx/models/raw/master/text/machine_comprehension/bidirectional_attention_flow/model/bidaf-9.onnx",
82-
MachineComprehension::BERTSquad => "https://github.com/onnx/models/raw/master/text/machine_comprehension/bert-squad/model/bertsquad-10.onnx",
81+
MachineComprehension::BiDAF => "https://github.com/onnx/models/raw/main/text/machine_comprehension/bidirectional_attention_flow/model/bidaf-9.onnx",
82+
MachineComprehension::BERTSquad => "https://github.com/onnx/models/raw/main/text/machine_comprehension/bert-squad/model/bertsquad-10.onnx",
8383
MachineComprehension::RoBERTa(variant) => variant.fetch_url(),
8484
MachineComprehension::GPT2(variant) => variant.fetch_url(),
8585
}
@@ -89,17 +89,17 @@ impl ModelUrl for MachineComprehension {
8989
impl ModelUrl for RoBERTa {
9090
fn fetch_url(&self) -> &'static str {
9191
match self {
92-
RoBERTa::RoBERTaBase => "https://github.com/onnx/models/raw/master/text/machine_comprehension/roberta/model/roberta-base-11.onnx",
93-
RoBERTa::RoBERTaSequenceClassification => "https://github.com/onnx/models/raw/master/text/machine_comprehension/roberta/model/roberta-sequence-classification-9.onnx",
92+
RoBERTa::RoBERTaBase => "https://github.com/onnx/models/raw/main/text/machine_comprehension/roberta/model/roberta-base-11.onnx",
93+
RoBERTa::RoBERTaSequenceClassification => "https://github.com/onnx/models/raw/main/text/machine_comprehension/roberta/model/roberta-sequence-classification-9.onnx",
9494
}
9595
}
9696
}
9797

9898
impl ModelUrl for GPT2 {
9999
fn fetch_url(&self) -> &'static str {
100100
match self {
101-
GPT2::GPT2 => "https://github.com/onnx/models/raw/master/text/machine_comprehension/gpt-2/model/gpt2-10.onnx",
102-
GPT2::GPT2LmHead => "https://github.com/onnx/models/raw/master/text/machine_comprehension/gpt-2/model/gpt2-lm-head-10.onnx",
101+
GPT2::GPT2 => "https://github.com/onnx/models/raw/main/text/machine_comprehension/gpt-2/model/gpt2-10.onnx",
102+
GPT2::GPT2LmHead => "https://github.com/onnx/models/raw/main/text/machine_comprehension/gpt-2/model/gpt2-lm-head-10.onnx",
103103
}
104104
}
105105
}

onnxruntime/src/download/vision/body_face_gesture_analysis.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ pub enum BodyFaceGestureAnalysis {
1515
/// A CNN based model for face recognition which learns discriminative features of faces and produces
1616
/// embeddings for input face images.
1717
///
18-
/// Source: [https://github.com/onnx/models/tree/master/vision/body_analysis/arcface](https://github.com/onnx/models/tree/master/vision/body_analysis/arcface)
18+
/// Source: [https://github.com/onnx/models/tree/main/vision/body_analysis/arcface](https://github.com/onnx/models/tree/main/vision/body_analysis/arcface)
1919
///
2020
/// Variant downloaded: ONNX Version 1.3 with Opset Version 8.
2121
ArcFace,
2222
/// Deep CNN for emotion recognition trained on images of faces.
2323
///
24-
/// Source: [https://github.com/onnx/models/tree/master/vision/body_analysis/emotion_ferplus](https://github.com/onnx/models/tree/master/vision/body_analysis/emotion_ferplus)
24+
/// Source: [https://github.com/onnx/models/tree/main/vision/body_analysis/emotion_ferplus](https://github.com/onnx/models/tree/main/vision/body_analysis/emotion_ferplus)
2525
///
2626
/// Variant downloaded: ONNX Version 1.3 with Opset Version 8.
2727
EmotionFerPlus,
@@ -30,8 +30,8 @@ pub enum BodyFaceGestureAnalysis {
3030
impl ModelUrl for BodyFaceGestureAnalysis {
3131
fn fetch_url(&self) -> &'static str {
3232
match self {
33-
BodyFaceGestureAnalysis::ArcFace => "https://github.com/onnx/models/raw/master/vision/body_analysis/arcface/model/arcfaceresnet100-8.onnx",
34-
BodyFaceGestureAnalysis::EmotionFerPlus => "https://github.com/onnx/models/raw/master/vision/body_analysis/emotion_ferplus/model/emotion-ferplus-8.onnx",
33+
BodyFaceGestureAnalysis::ArcFace => "https://github.com/onnx/models/raw/main/vision/body_analysis/arcface/model/arcfaceresnet100-8.onnx",
34+
BodyFaceGestureAnalysis::EmotionFerPlus => "https://github.com/onnx/models/raw/main/vision/body_analysis/emotion_ferplus/model/emotion-ferplus-8.onnx",
3535
}
3636
}
3737
}

onnxruntime/src/download/vision/domain_based_image_classification.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use crate::download::{vision::Vision, AvailableOnnxModel, ModelUrl};
99
pub enum DomainBasedImageClassification {
1010
/// Handwritten digits prediction using CNN
1111
///
12-
/// Source: [https://github.com/onnx/models/tree/master/vision/classification/mnist](https://github.com/onnx/models/tree/master/vision/classification/mnist)
12+
/// Source: [https://github.com/onnx/models/tree/main/vision/classification/mnist](https://github.com/onnx/models/tree/main/vision/classification/mnist)
1313
///
1414
/// Variant downloaded: ONNX Version 1.3 with Opset Version 8.
1515
Mnist,
@@ -18,7 +18,7 @@ pub enum DomainBasedImageClassification {
1818
impl ModelUrl for DomainBasedImageClassification {
1919
fn fetch_url(&self) -> &'static str {
2020
match self {
21-
DomainBasedImageClassification::Mnist => "https://github.com/onnx/models/raw/master/vision/classification/mnist/model/mnist-8.onnx",
21+
DomainBasedImageClassification::Mnist => "https://github.com/onnx/models/raw/main/vision/classification/mnist/model/mnist-8.onnx",
2222
}
2323
}
2424
}

0 commit comments

Comments
 (0)