Skip to content

Unify SIT file name deduction from a network path#34173

Open
andrey-golubev wants to merge 1 commit intoopenvinotoolkit:masterfrom
andrey-golubev:fix_sit_network_path
Open

Unify SIT file name deduction from a network path#34173
andrey-golubev wants to merge 1 commit intoopenvinotoolkit:masterfrom
andrey-golubev:fix_sit_network_path

Conversation

@andrey-golubev
Copy link
Contributor

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.

@andrey-golubev andrey-golubev requested review from a team as code owners February 18, 2026 08:23
@andrey-golubev
Copy link
Contributor Author

@PatrikStepan @Maxim-Doronin please take a look!

std::replace_if(
name.begin(), name.end(),
[](unsigned char c) {
return !std::isalnum(c);
},
'_');
return std::move(name);
return name;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

OPENVINO_ASSERT(std::filesystem::exists(networkPath) && networkPath.has_filename(),
"Network path does not exist or is invalid: ",
FLAGS_network);
netFileName = cleanName(networkPath.stem().string());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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)

@github-actions github-actions bot added the category: NPU OpenVINO NPU plugin label Feb 18, 2026
@sys-openvino-ci sys-openvino-ci added the ExternalIntelPR External contributor from Intel label Feb 18, 2026
@andrey-golubev
Copy link
Contributor Author

@Maxim-Doronin @DariaMityagina ping

Copy link
Contributor

@DariaMityagina DariaMityagina left a comment

Choose a reason for hiding this comment

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

LGTM!

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: NPU OpenVINO NPU plugin ExternalIntelPR External contributor from Intel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants