Model conversion file structure
This article explains the file structure generated during model conversion workflows and the purpose of each folder and file, including cache handling, history tracking, inference and so on.
After creating the model project and running it several times, the file structure might look like this:
model_project_name/
βββ model_lab.workspace.config
βββ huggingface_microsoft_resnet-50_v1/
βββ .gitignore
βββ imagenet.py
βββ inference_sample.ipynb
βββ model_project.config
βββ README.md
βββ requirements.txt
βββ resnet_ptq_qnn.json
βββ cache/
βββ history/
βββ history_1(20250414_161046)/
βββ model/
βββ footprints.json
βββ history.config
βββ history.config.user
βββ inference_sample.ipynb
βββ log.txt
βββ metrics.json
βββ model_config.json
βββ olive_config.json
βββ output_footprint.json
βββ run_history.txt
βββ history_2/
βββ history_3/
In the model_project_name folder, workflows for each model are stored in a separate folder.
requirements.txt: lists the dependencies required to run the workflow and the inference sample.resnet_ptq_qnn.json,imagenet.py: the JSON file used to convert the model by Olive. Some might require additional Python files for customization.README.md: describes model details such as the model's task, performance metrics, and usage instructions.model_project.config: contains project template settings. Some settings can be overridden to suit your specific requirements.inference_sample.ipynb: sample to test the output model. This file will be copied into thehistoryfolder, to enable using different Jupyter notebooks to compare models from different histories.
Cache folder
The cache folder stores cache files that were generated during workflow execution. These cached results can help accelerate repeated runs of the workflow.
You can delete this folder to free up space if it's no longer needed.
History folder
The timestamp in the history folder name indicates the run time, like: April 14, 2025 at 16:10:46.
model: model files.model_config.json: contains details about the model.footprints.json,output_footprint.json,run_history.txt: Olive output.history.config,history.config.user: history configurations used by Model Conversion.inference_sample.ipynb: sample to test the output model.log.txt: contain logs.metrics.json: contain evaluation result if evaluation is enabled.olive_config.json: the config used to run the conversion.
About git
By default, the cache and history folders are excluded from version control (.gitignore), except for the following two configuration files: history.config and olive_config.json
You might update the .gitignore file to include specific history folders that are worth saving.
When someone else clones the repo, these two files ensure that they can rerun these histories to reproduce the conversion result.
__pycache__
/cache
/history/*/*
!/history/*/history.config
!/history/*/olive_config.json