Skip to content

fix: make entropy_compress backend constructible - #74

Open
JiataiWang wants to merge 1 commit into
zjunlp:mainfrom
JiataiWang:fix/entropy-compressor-registration
Open

fix: make entropy_compress backend constructible#74
JiataiWang wants to merge 1 commit into
zjunlp:mainfrom
JiataiWang:fix/entropy-compressor-registration

Conversation

@JiataiWang

Copy link
Copy Markdown

What was broken

entropy_compress is listed as a supported pre-compressor, but selecting it fails during config validation, before the model is loaded. The config registry points to EntropyCompressor instead of EntropyCompressorConfig, and the factory registry ends at the module name without an implementation class.

What changed

  • point the config registry at EntropyCompressorConfig
  • point the factory registry at EntropyCompressor
  • add regression tests for both resolution steps without downloading a model

Test

PYTHONPATH=src uv run --no-project --python 3.11 \
  --with pytest --with numpy --with 'pydantic>=2.12,<3' \
  python -m pytest -q tests

Result: 4 passed.

@JiataiWang

Copy link
Copy Markdown
Author

Hi! Just checking in on this PR when you get a chance. The change is intentionally limited to wiring the entropy compressor config/factory registries, with regression coverage and no model download needed. Happy to rebase or adjust anything if needed. Thanks!

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