Skip to content

QEff library utility to capture environment/runtime/library metadata right after loading a model before any transforms are applied. - #1183

Open
quic-dhirajku wants to merge 2 commits into
quic:mainfrom
quic-dhirajku:config_dump
Open

QEff library utility to capture environment/runtime/library metadata right after loading a model before any transforms are applied.#1183
quic-dhirajku wants to merge 2 commits into
quic:mainfrom
quic-dhirajku:config_dump

Conversation

@quic-dhirajku

Copy link
Copy Markdown
Contributor

Added a QEff library utility, wired it into core model and diffusers flows, and validated that dumps are created once per model even when later stages fail.

This captures environment/runtime/library metadata in a robust, non-intrusive way for CausalLM, VLM, and diffusers CPU paths.

  • Add QEfficient/utils/library_dump.py with dump_qeff_library_once(model_architecture, model_name) that writes a JSON manifest under QEFF_HOME/<arch_or_name>/<model_name>/ qeff_library-<run_id>.json
  • Capture schema version, creation timestamp, model name/architecture, QEff package info (version/import path/editable flag), runtime (python/platform/pid), QAIC SDK versions (apps/platform from qaic-version-util), and a full pip-style dependency snapshot
  • Ensure the manifest is written only once per model per process via a process-level _written registry
  • Add dump_qeff_library_once into QEFFBaseModel.init before any PyTorch transforms so dumps survive transform/export failures and never break model construction
  • Add unit tests in tests/unit_test/utils/test_library_dump.py to cover manifest shape, paths, deduplication, QAIC SDK parsing, and basic resilience
  • Add tests/unit_test/utils/test_library_dump_api_calls.py to validate CausalLM, VLM (qwen3_vl custom config), Diffusers (Flux pipeline) with this utility.

… flows, and validated that dumps are created once per model even when later stages fail.

  This captures environment/runtime/library metadata in a robust, non-intrusive way for CausalLM, VLM, and diffusers CPU paths.

  - Add QEfficient/utils/library_dump.py with dump_qeff_library_once(model_architecture, model_name) that writes a JSON manifest under QEFF_HOME/<arch_or_name>/<model_name>/
    qeff_library-<run_id>.json
  - Capture schema version, creation timestamp, model name/architecture, QEff package info (version/import path/editable flag), runtime (python/platform/pid), QAIC SDK versions
    (apps/platform from qaic-version-util), and a full pip-style dependency snapshot
  - Ensure the manifest is written only once per model per process via a process-level _written registry
  - Add dump_qeff_library_once into QEFFBaseModel.__init__ before any PyTorch transforms so dumps survive transform/export failures and never break model construction
  - Add unit tests in tests/unit_test/utils/test_library_dump.py to cover manifest shape, paths, deduplication, QAIC SDK parsing, and basic resilience
  - Add tests/unit_test/utils/test_library_dump_api_calls.py to validate CausalLM, VLM (qwen3_vl custom config), Diffusers (Flux pipeline) with this utility.

Signed-off-by: Dhiraj Kumar Sah <dhirajku@qti.qualcomm.com>
…_calls.py to transformers test instead of unit_tests directory as these tests require model weights to test for different stages of API calls.

Signed-off-by: Dhiraj Kumar Sah <dhirajku@qti.qualcomm.com>
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.

1 participant