Unify SIT file name deduction from a network path#34173
Open
andrey-golubev wants to merge 1 commit intoopenvinotoolkit:masterfrom
Open
Unify SIT file name deduction from a network path#34173andrey-golubev wants to merge 1 commit intoopenvinotoolkit:masterfrom
andrey-golubev wants to merge 1 commit intoopenvinotoolkit:masterfrom
Conversation
Contributor
Author
|
@PatrikStepan @Maxim-Doronin please take a look! |
andrey-golubev
commented
Feb 18, 2026
| std::replace_if( | ||
| name.begin(), name.end(), | ||
| [](unsigned char c) { | ||
| return !std::isalnum(c); | ||
| }, | ||
| '_'); | ||
| return std::move(name); | ||
| return name; | ||
| } |
Contributor
Author
There was a problem hiding this comment.
note: I expect both places that deal with copies to be properly optimized via the copy elision in C++17; definitely there's no need to std::move() at return.
andrey-golubev
commented
Feb 18, 2026
| OPENVINO_ASSERT(std::filesystem::exists(networkPath) && networkPath.has_filename(), | ||
| "Network path does not exist or is invalid: ", | ||
| FLAGS_network); | ||
| netFileName = cleanName(networkPath.stem().string()); |
Contributor
Author
There was a problem hiding this comment.
i am also a bit skeptical there's actually a need to use cleanName() at all: if the path is accepted here, it means OS and std::filesystem consider it valid. decided to keep it as is to preserve the original behaviour (e.g. model.suffix.extension to be converted into model_suffx name here)
Contributor
Author
f5ac565 to
03426b5
Compare
The --network option is used to establish file names of inference results that SIT produces. Depending on whether an absolute or a relative path is given, the file name deduced would be different. For example, conside 'foo.xml' to be the network name: * C:\path\foo.xml would result in '_foo' file name * foo.xml would result in 'foo' file name This inconsistency causes unexpected failures when both absolute and relative paths are combined within a "single" SIT-based workflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The --network option is used to establish file names of inference results that SIT produces. Depending on whether an absolute or a relative path is given, the file name deduced would be different. For example, conside 'foo.xml' to be the network name:
This inconsistency causes unexpected failures when both absolute and relative paths are combined within a "single" SIT-based workflow.