From 19f26f404e6e1d4ec7c1e2b1e890359b2afd2156 Mon Sep 17 00:00:00 2001 From: Michael Goin Date: Fri, 1 Sep 2023 10:45:46 -0400 Subject: [PATCH 1/5] Ignore link check for all localhost/0.0.0.0/127.0.0.1 urls --- .github/workflows/linkcheck.yml | 1 + .github/workflows/mlc_config.json | 13 +++++++++++++ docs/use-cases/cv/image-classification.md | 4 ++-- docs/use-cases/nlp/question-answering.md | 4 ++-- docs/use-cases/nlp/token-classification.md | 4 ++-- docs/user-guide/deepsparse-docker.md | 4 ++-- 6 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/mlc_config.json diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index e2547734ab..c30a8185cc 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -19,3 +19,4 @@ jobs: - uses: gaurav-nelson/github-action-markdown-link-check@v1 with: use-quiet-mode: 'yes' + config-file: 'mlc_config.json' diff --git a/.github/workflows/mlc_config.json b/.github/workflows/mlc_config.json new file mode 100644 index 0000000000..a9eb1307ac --- /dev/null +++ b/.github/workflows/mlc_config.json @@ -0,0 +1,13 @@ +{ + "ignorePatterns": [ + { + "pattern": "^http://localhost.*" + }, + { + "pattern": "^http://127\\.0\\.0\\.1.*" + }, + { + "pattern": "^http://0\\.0\\.0\\.0.*" + } + ] +} \ No newline at end of file diff --git a/docs/use-cases/cv/image-classification.md b/docs/use-cases/cv/image-classification.md index 33c1a7dd5e..f93c23f523 100644 --- a/docs/use-cases/cv/image-classification.md +++ b/docs/use-cases/cv/image-classification.md @@ -212,9 +212,9 @@ deepsparse.server \ --task image_classification \ --model_path zoo:cv/classification/resnet_v1-50/pytorch/sparseml/imagenet/pruned95_quant-none ``` - + You should see Uvicorn report that it is running on http://0.0.0.0:5543. Once launched, a /docs path is created with full endpoint descriptions and support for making sample requests. - + Here is an example client request, using the Python requests library for formatting the HTTP: diff --git a/docs/use-cases/nlp/question-answering.md b/docs/use-cases/nlp/question-answering.md index 4d168f4756..89124d32d7 100644 --- a/docs/use-cases/nlp/question-answering.md +++ b/docs/use-cases/nlp/question-answering.md @@ -221,9 +221,9 @@ deepsparse.server \ --task question-answering \ --model_path zoo:nlp/question_answering/obert-base/pytorch/huggingface/squad/pruned90_quant-none # or path/to/onnx ``` - + You should see Uvicorn report that it is running on http://0.0.0.0:5543. Once launched, a /docs path is created with full endpoint descriptions and support for making sample requests. - + Here is an example client request, using the Python requests library for formatting the HTTP: ```python diff --git a/docs/use-cases/nlp/token-classification.md b/docs/use-cases/nlp/token-classification.md index 3886ec7802..c2655ec48c 100644 --- a/docs/use-cases/nlp/token-classification.md +++ b/docs/use-cases/nlp/token-classification.md @@ -219,9 +219,9 @@ deepsparse.server \ --task token_classification \ --model_path "zoo:nlp/token_classification/obert-base/pytorch/huggingface/conll2003/pruned90_quant-none" # or path/to/onnx ``` - + You should see Uvicorn report that it is running on http://0.0.0.0:5543. Once launched, a /docs path is created with full endpoint descriptions and support for making sample requests. - + Here is an example client request, using the Python requests library for formatting the HTTP: ```python diff --git a/docs/user-guide/deepsparse-docker.md b/docs/user-guide/deepsparse-docker.md index d010744c80..48f5301b94 100644 --- a/docs/user-guide/deepsparse-docker.md +++ b/docs/user-guide/deepsparse-docker.md @@ -57,9 +57,9 @@ Alternatively, you can run the two commands in a single line: ```bash docker container run -p 5543:5543 deepsparse_docker deepsparse.server --task sentiment_analysis --model_path "zoo:nlp/sentiment_analysis/distilbert-none/pytorch/huggingface/sst2/pruned90-none" ``` - + You should see Uvicorn report that it is running on http://0.0.0.0:5543. Once launched, a `/docs` path is created with full endpoint descriptions and support for making sample requests. - + Here is an example client request, using the Python requests library for formatting the HTTP: ```python From 049fe3b785a45ca3eff0a7404dc8f016591f9096 Mon Sep 17 00:00:00 2001 From: Michael Goin Date: Fri, 1 Sep 2023 10:51:14 -0400 Subject: [PATCH 2/5] Add better matching --- .github/workflows/mlc_config.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/mlc_config.json b/.github/workflows/mlc_config.json index a9eb1307ac..8abd9e1793 100644 --- a/.github/workflows/mlc_config.json +++ b/.github/workflows/mlc_config.json @@ -1,13 +1,13 @@ { "ignorePatterns": [ { - "pattern": "^http://localhost.*" + "pattern": ".*localhost.*" }, { - "pattern": "^http://127\\.0\\.0\\.1.*" + "pattern": ".*127\\.0\\.0\\.1.*" }, { - "pattern": "^http://0\\.0\\.0\\.0.*" + "pattern": ".*0\\.0\\.0\\.0.*" } ] } \ No newline at end of file From e4f2d3b623bb7aacaae351013e4a4ab89a6eff75 Mon Sep 17 00:00:00 2001 From: Michael Goin Date: Fri, 1 Sep 2023 10:58:00 -0400 Subject: [PATCH 3/5] update linkcheck --- .github/workflows/linkcheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index c30a8185cc..89fb487c7b 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: gaurav-nelson/github-action-markdown-link-check@v1 + - uses: gaurav-nelson/github-action-markdown-link-check@1.0.15 with: use-quiet-mode: 'yes' config-file: 'mlc_config.json' From 8f7de34be13d76b06a2f6f5d3f07a3cab67e6196 Mon Sep 17 00:00:00 2001 From: Michael Goin Date: Fri, 1 Sep 2023 11:00:40 -0400 Subject: [PATCH 4/5] config file path --- .github/workflows/linkcheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index 89fb487c7b..c379d0bf12 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -19,4 +19,4 @@ jobs: - uses: gaurav-nelson/github-action-markdown-link-check@1.0.15 with: use-quiet-mode: 'yes' - config-file: 'mlc_config.json' + config-file: '.github/workflows/mlc_config.json' From 8d36ac4f3eab423a0dd2d3fa32dd3fedc0f92eae Mon Sep 17 00:00:00 2001 From: Michael Goin Date: Fri, 1 Sep 2023 11:03:36 -0400 Subject: [PATCH 5/5] v1 --- .github/workflows/linkcheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index c379d0bf12..8d02a43c7e 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: gaurav-nelson/github-action-markdown-link-check@1.0.15 + - uses: gaurav-nelson/github-action-markdown-link-check@v1 with: use-quiet-mode: 'yes' config-file: '.github/workflows/mlc_config.json'