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

[Release] Add symlink verification before opening file #3097

Merged

Conversation

KodiaqQ
Copy link
Collaborator

@KodiaqQ KodiaqQ commented Nov 19, 2024

Changes

  • As stated in the title.

Reason for changes

Related tickets

  • 157068

Tests

  • test_examples/620/ - passed

@KodiaqQ KodiaqQ requested a review from a team as a code owner November 19, 2024 12:23
@github-actions github-actions bot added NNCF Common Pull request that updates NNCF Common release target labels Nov 19, 2024
@@ -71,6 +72,7 @@ def load_from_dir(dir_path: str) -> Tuple[Dict[str, Any], Dict[str, str]]:
continue # Skip the metadata file

try:
fail_if_symlink(statistics_file)
Copy link
Collaborator

@kshpv kshpv Nov 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a specific function, such as safe_open, and use it here and below?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a missed symlink check instead of the method since this is just a hotfix. A proper solution should be provided as part of the statistics caching implementation change (from pickle).

@KodiaqQ KodiaqQ requested a review from kshpv November 19, 2024 14:50
@KodiaqQ KodiaqQ merged commit 7510b4f into openvinotoolkit:release_v2140 Nov 19, 2024
12 checks passed
KodiaqQ added a commit to KodiaqQ/nncf that referenced this pull request Nov 19, 2024
…it#3097)

### Changes

- As stated in the title.

### Reason for changes

- Fix after openvinotoolkit#3017.

### Related tickets

- 157068

### Tests

- test_examples/620/ - passed

(cherry picked from commit 7510b4f)
@KodiaqQ KodiaqQ mentioned this pull request Nov 19, 2024
KodiaqQ added a commit that referenced this pull request Nov 19, 2024
- Cherry-pick of #3096
- Cherry-pick of #3097

test_examples/622/ - passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NNCF Common Pull request that updates NNCF Common release target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants