Skip to content

Conversation

liqunfu
Copy link
Collaborator

@liqunfu liqunfu commented Jul 10, 2024

Description

#6215

Signed-off-by: liqunfu <liqun.fu@microsoft.com>
@liqunfu liqunfu requested review from a team as code owners July 10, 2024 16:48
onnx/utils.py Outdated


def extract_model_safe(model_tar_path: str, local_model_with_data_dir_path: str) -> None:
"""

Check warning

Code scanning / lintrunner

RUFF/D212

Multi-line docstring summary should start at the first line. See https://docs.astral.sh/ruff/rules/multi-line-summary-first-line
Comment on lines +294 to +296
members=_tar_members_filter(
model_with_data_zipped, local_model_with_data_dir_path
),

Check failure

Code scanning / CodeQL

Arbitrary file write during tarfile extraction

This file extraction depends on a [potentially untrusted source](1).
Copy link
Contributor

github-actions bot commented Jul 10, 2024

Test Results

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ❌ ±0 

Results for commit e26d8ea. ± Comparison against base commit 084c929.

♻️ This comment has been updated with latest results.

@justinchuby justinchuby changed the title refactor safe extract method to fix issue 6215 Refactor safe extract method to fix issue 6215 Jul 10, 2024
@gramalingam
Copy link
Contributor

@liqunfu : should we merge this? I think renaming extract_model_safe to _extract_model_safe to make it private makes sense, as suggested above.

liqunfu and others added 3 commits July 16, 2024 10:48
Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: liqun Fu <liqun.fu@microsoft.com>
Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: liqun Fu <liqun.fu@microsoft.com>
model_with_data_zipped.extractall(
path=local_model_with_data_dir_path,
members=_tar_members_filter(
model_with_data_zipped, local_model_with_data_dir_path

Check failure

Code scanning / lintrunner

MYPY/arg-type

Argument 2 to "_tar_members_filter" has incompatible type "str | PathLike[Any]"; expected "str" To disable, use ` # type: ignore[arg-type]`
liqunfu added 4 commits July 16, 2024 10:56
Signed-off-by: liqunfu <liqun.fu@microsoft.com>
Signed-off-by: liqunfu <liqun.fu@microsoft.com>
Signed-off-by: liqunfu <liqun.fu@microsoft.com>
Signed-off-by: liqunfu <liqun.fu@microsoft.com>
@liqunfu liqunfu added this pull request to the merge queue Jul 16, 2024
Merged via the queue into main with commit 1b70f9b Jul 16, 2024
@liqunfu liqunfu deleted the liqun/6215 branch July 16, 2024 21:14
cjvolzka pushed a commit that referenced this pull request Jul 19, 2024
### Description
#6215

---------

Signed-off-by: liqunfu <liqun.fu@microsoft.com>
Signed-off-by: liqun Fu <liqun.fu@microsoft.com>
Co-authored-by: G. Ramalingam <grama@microsoft.com>
Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>
(cherry picked from commit 1b70f9b)
cjvolzka pushed a commit that referenced this pull request Jul 19, 2024
---------

Signed-off-by: liqunfu <liqfu@microsoft.com>
Signed-off-by: liqun Fu <liqfu@microsoft.com>
Co-authored-by: G. Ramalingam <grama@microsoft.com>
Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>
(cherry picked from commit 1b70f9b)
cjvolzka pushed a commit that referenced this pull request Jul 19, 2024
---------

Signed-off-by: liqunfu <liqfu@microsoft.com>
Signed-off-by: liqun Fu <liqfu@microsoft.com>
Co-authored-by: G. Ramalingam <grama@microsoft.com>
Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>
(cherry picked from commit 1b70f9b)
cjvolzka pushed a commit that referenced this pull request Jul 19, 2024
---------

Signed-off-by: liqunfu <liqfu@microsoft.com>
Signed-off-by: liqun Fu <liqfu@microsoft.com>
Co-authored-by: G. Ramalingam <grama@microsoft.com>
Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>
(cherry picked from commit 1b70f9b)
@cjvolzka cjvolzka mentioned this pull request Jul 19, 2024
andife pushed a commit to andife/onnx that referenced this pull request Jul 20, 2024
### Description
onnx#6215

---------

Signed-off-by: liqunfu <liqun.fu@microsoft.com>
Signed-off-by: liqun Fu <liqun.fu@microsoft.com>
Co-authored-by: G. Ramalingam <grama@microsoft.com>
Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Andreas Fehlner <fehlner@arcor.de>
andife pushed a commit that referenced this pull request Jul 23, 2024
---------

Signed-off-by: liqunfu <liqfu@microsoft.com>
Signed-off-by: liqun Fu <liqfu@microsoft.com>
Co-authored-by: G. Ramalingam <grama@microsoft.com>
Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>
(cherry picked from commit 1b70f9b)
Signed-off-by: Andreas Fehlner <fehlner@arcor.de>
@cjvolzka cjvolzka added this to the 1.16.2 milestone Jul 25, 2024
@cjvolzka cjvolzka mentioned this pull request Jul 26, 2024
cjvolzka pushed a commit that referenced this pull request Jul 29, 2024
---------

Signed-off-by: liqunfu <liqfu@microsoft.com>
Signed-off-by: liqun Fu <liqfu@microsoft.com>
Co-authored-by: G. Ramalingam <grama@microsoft.com>
Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>
(cherry picked from commit 1b70f9b)
cjvolzka added a commit that referenced this pull request Jul 30, 2024
### Description
Check-pick commits from `main` into `rel-1.16.2` branch

### Motivation and Context
Fix 1.16.1 issues and enabled 1.16.2 builds by cherry-picking the
following PRs from `main` into the `1.16.2` branch

* Fixes since 1.16.0 release
  * #6164
  * #6222
  * #6217
  * #6255
  * #6254

---------

Co-authored-by: sunflowersxu <166728538+sunflowersxu@users.noreply.github.com>
Co-authored-by: liqun Fu <liqfu@microsoft.com>
Co-authored-by: G. Ramalingam <grama@microsoft.com>
andife pushed a commit to andife/onnx that referenced this pull request Aug 26, 2024
### Description
onnx#6215

---------

Signed-off-by: liqunfu <liqun.fu@microsoft.com>
Signed-off-by: liqun Fu <liqun.fu@microsoft.com>
Co-authored-by: G. Ramalingam <grama@microsoft.com>
Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Andreas Fehlner <fehlner@arcor.de>
linshokaku pushed a commit to linshokaku/onnx that referenced this pull request Oct 2, 2024
### Description
onnx#6215

---------

Signed-off-by: liqunfu <liqun.fu@microsoft.com>
Signed-off-by: liqun Fu <liqun.fu@microsoft.com>
Co-authored-by: G. Ramalingam <grama@microsoft.com>
Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Linsho Kaku <linsho@preferred.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants