Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request adds support for spectroscopic redshift measurements by introducing a new GridScalarCodec along with a corresponding Z modality, and integrates these updates into the codec registration and unit tests.
- Added a new GridScalarCodec class in aion/codecs/scalar.py that uses a fixed-range ScalarLinearQuantizer.
- Introduced and registered a new Z modality in aion/modalities.py and updated tests to validate the new implementations.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/tokenizers/test_scalar_tokenizer.py | Updated imports and added tests for GridScalarCodec and Z modality |
| tests/test_data/Z_codec_*.pt | Added test data files for codec input, encoded, and decoded batches |
| aion/modalities.py | Introduced new Z modality for redshift measurements |
| aion/codecs/scalar.py | Added GridScalarCodec class and removed MultiScalarCodec docstring for cleanup |
| aion/codecs/init.py | Updated codec registration to include GridScalarCodec |
Contributor
Author
|
Exellent, good job @EiffL |
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 a new
GridScalarCodecclass and a correspondingZmodality, along with updates to integrate these additions into the existing codebase and tests. The changes include codec registration, modality definition, and updates to unit tests to ensure proper functionality.Codec-related changes:
GridScalarCodecclass inaion/codecs/scalar.py, which uses aScalarLinearQuantizerfor scalar quantization with a fixed range of(0.0, 1.0).GridScalarCodecin the__init__.pyfile ofaion/codecsfor import and export. [1] [2]Modality-related changes:
Zmodality inaion/modalities.py, representing spectroscopic redshift measurements.Zmodality in the list of scalar modalities inaion/modalities.py.Testing updates:
Zmodality codec, including input, encoded, and decoded batches. [1] [2] [3]tests/tokenizers/test_scalar_tokenizer.pyto include tests forGridScalarCodecand theZmodality. [1] [2] [3]Cleanup:
MultiScalarCodecclass inaion/codecs/scalar.pyto streamline the file.