Skip to content

Conversation

@atobiszei
Copy link
Collaborator

Script when launched for second time had different (wrong) paths in graph.pbtxt because xml/bin files already exist.

Ticket:CVS-177562

### Export model
if os.path.isfile(os.path.join(source_model, 'openvino_model.xml')) or os.path.isfile(os.path.join(source_model, 'openvino_language_model.xml')):
print("OV model is source folder. Skipping conversion.")
model_path = source_model
Copy link
Collaborator

Choose a reason for hiding this comment

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

My recollection is that this condition was for the scenario of source model from NFS storage with RO access. That was to be absolute path.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right now when used for 1st time script pull the model:
python ~/git_repos/ovms1/demos/common/export_models/export_model.py text_generation --source_model Qwen/Qwen3-8B --weight-format int8 --model_repository_path ./ --tool_parser hermes3 --overwrite_models --enable_prefix_caching
Then in ./config.json we have "base_path": "Qwen/Qwen3-8B", and in graph.pbtxt : models_path: "./",. After second launch in graph.pbtxt we have: models_path: "Qwen/Qwen3-8B",, which fails since it would require graph.pbtxt to be in: ````./Qwen/Qwen3-8B/Qwen/Qwen3-8B/``` directory.

Additionally when launched with slightly different command (just going 1 step above in directory tree):

python ~/git_repos/ovms1/demos/common/export_models/export_model.py text_generation --source_model Qwen/Qwen3-8B --weight-format int8 --model_repository_path ./models3  --tool_parser hermes3 --overwrite_models --enable_prefix_caching

This works fine (paths in graph.pbtxt are fine).
Either way we would need a way to tell when to create graph.pbtxt in separate directory tree (with RW).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants