Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR expands the HSC codec support by introducing new scalar modalities, enhances codec initialization with an optional log‐scaling parameter, and provides a one‐stop script for converting, uploading, and validating legacy HSC codecs. It also updates test fixtures and LFS configuration.
- Added new HSC extinction, magnitude, and shape scalar modalities in
aion/modalities.py. - Extended
ScalarCodecto acceptmin_log_valueand adjusted quantizer logic. - Introduced
scripts/export_hsc_codecs.pyto automate conversion, uploading to HuggingFace, and test‐data generation. - Updated test data under
tests/test_data/and enabled.ptfiles in Git LFS.
Reviewed Changes
Copilot reviewed 45 out of 45 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| aion/modalities.py | New HSC scalar modality classes registered in ScalarModalities. |
| aion/codecs/scalar.py | ScalarCodec now takes min_log_value and uses log quantizer. |
| scripts/export_hsc_codecs.py | New export script for legacy HSC codecs (convert, upload, test). |
| tests/test_data/*.pt | Added LFS‐tracked input/encoded/decoded batches for new modalities. |
| .gitattributes | Added *.pt to Git LFS tracking. |
| pyproject.toml | Added huggingface_hub[torch] to optional dependencies. |
Comments suppressed due to low confidence (1)
aion/codecs/scalar.py:83
- The
ScalarCodecconstructor now always usesScalarLogReservoirQuantizer, which changes its original behavior of linear quantization. Consider restoringScalarReservoirQuantizerforScalarCodecand reservingScalarLogReservoirQuantizerforLogScalarCodec.
self._quantizer = ScalarLogReservoirQuantizer(
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several updates to the codec system, including enhancements to modality support, codec initialization, and the addition of a new script for exporting codecs. It also includes updates to test data for validation purposes. Below is a breakdown of the most significant changes:
Codec System Enhancements:
AG,AR,AI,AZ,AY,MagG,MagR,MagI,MagZ,MagY,Shape11,Shape22,Shape12) to expand support for HSC extinction values, magnitudes, and shapes inaion/modalities.py. These modalities are also added to theScalarModalitieslist. [1] [2]ScalarCodecinitialization inaion/codecs/scalar.pyto include an optionalmin_log_valueparameter for better control over log-scaling behavior.New Script for Codec Export:
scripts/export_hsc_codecs.py, a comprehensive script for converting legacy HSC codecs to the AION format, uploading them to the HuggingFace Hub, and generating test data for validation. The script supports multiple operational modes such as testing, uploading, and skipping uploads.Test Data Updates:
a_g,a_r,a_i,a_z,a_y, and others. These files are stored intests/test_data/and are tracked using Git LFS. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16]Configuration Updates:
.gitattributesto ensure all.ptfiles are managed by Git LFS, streamlining handling of large model and test data files.