Skip to content

Implement reduce_dimensions#932

Merged
Graciaaa3 merged 26 commits into
mainfrom
reduce_dimensions
Jun 23, 2026
Merged

Implement reduce_dimensions#932
Graciaaa3 merged 26 commits into
mainfrom
reduce_dimensions

Conversation

@Graciaaa3

@Graciaaa3 Graciaaa3 commented May 26, 2026

Copy link
Copy Markdown
Collaborator

Change Description

Closes #859

Solution Description

This PR introduces the initial framework for a reduce_dimensions verb to support multiple dimensionality reduction algorithms with Hyrax.

Current Progress

Added the reduce_dimensions verb.
Introduced the ReductionAlgorithm subclass structure to provide a generalized abstraction layer for dimensionality reduction methods. Migrated the existing UMAP implementation into the new reduce_dimensions framework while preserving current functionality and behavior.

Next Steps

  • Implementing support for additional dimensionality reduction algorithms: t-SNE and PCA.
  • Adding and updating documentation for the new API and configuration structure.
  • Adding and updating tests for reduce_dimensions and newly supported algorithms.

Code Quality

  • I have read the Contribution Guide and agree to the Code of Conduct
  • My code follows the code style of this project
  • My code builds (or compiles) cleanly without any errors or warnings
  • My code contains relevant comments and necessary documentation

@codecov

codecov Bot commented May 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.22785% with 53 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.38%. Comparing base (b157303) to head (6dcacbb).
⚠️ Report is 27 commits behind head on main.

Files with missing lines Patch % Lines
...x/verbs/reduction_algorithms/algorithm_registry.py 68.75% 20 Missing ⚠️
src/hyrax/verbs/reduction_algorithms/tsne.py 69.69% 10 Missing ⚠️
src/hyrax/verbs/reduction_algorithms/pca.py 85.18% 8 Missing ⚠️
src/hyrax/verbs/reduction_algorithms/umap.py 85.18% 8 Missing ⚠️
src/hyrax/verbs/reduce_dimensions.py 89.23% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #932      +/-   ##
==========================================
+ Coverage   63.82%   64.38%   +0.56%     
==========================================
  Files          74       81       +7     
  Lines        7693     7930     +237     
==========================================
+ Hits         4910     5106     +196     
- Misses       2783     2824      +41     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Graciaaa3 Graciaaa3 self-assigned this May 28, 2026
@Graciaaa3 Graciaaa3 requested review from drewoldag and removed request for drewoldag May 29, 2026 19:44
Comment thread src/hyrax/hyrax_default_config.toml Outdated

@drewoldag drewoldag left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking like it's on the right track. Left a few comments, nothing too scary.

Comment thread src/hyrax/verbs/reduce_dimensions.py
Comment thread src/hyrax/verbs/reduce_dimensions.py Outdated
Comment thread src/hyrax/verbs/reduce_dimensions.py Outdated
Comment thread src/hyrax/verbs/reduce_dimensions.py Outdated
Comment thread src/hyrax/verbs/reduce_dimensions.py Outdated
Comment thread src/hyrax/verbs/reduction_algorithms/pca.py Outdated
Comment thread src/hyrax/verbs/reduction_algorithms/pca.py Outdated
Comment thread src/hyrax/verbs/reduction_algorithms/pca.py
Comment thread src/hyrax/verbs/reduction_algorithms/algorithm_registry.py

@drewoldag drewoldag left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This batch of changes look reasonable.

@Graciaaa3 Graciaaa3 marked this pull request as ready for review June 23, 2026 17:29
@Graciaaa3

Copy link
Copy Markdown
Collaborator Author

At this point all the code/docstring/tests are finished. I will address the documentation updates in a separate PR.

@Graciaaa3 Graciaaa3 requested a review from aritraghsh09 June 23, 2026 18:56

@drewoldag drewoldag left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with a couple of comments to look at. Half are just wording suggestions and can be ignored. The one about refactoring the parallel code can be deferred. The others might be worth looking at.

Comment thread src/hyrax/config_migrations/migrations/004_move_umap_to_reduce.py
Comment thread src/hyrax/verbs/reduction_algorithms/tsne.py
Comment thread src/hyrax/verbs/reduction_algorithms/umap.py
Comment thread src/hyrax/verbs/reduce_dimensions.py Outdated
Comment thread src/hyrax/verbs/reduce_dimensions.py Outdated
Comment thread tests/hyrax/test_reduce_dimensions.py
@Graciaaa3 Graciaaa3 merged commit 809a712 into main Jun 23, 2026
8 checks passed
@Graciaaa3 Graciaaa3 deleted the reduce_dimensions branch June 23, 2026 21:31
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.

Integrate with dimensional reduction algorithms beyond UMAP

2 participants