Mp/netvae refactor#60
Open
matthewpeterkort wants to merge 11 commits into
Open
Conversation
☂️ Python Coverage
Overall Coverage
New Files
Modified Files
|
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.
clean up alot of stuff that broke in the netvae refactor.
add some e2e tests to prove functionality
remove old depcreated code, wire up existing code to use existing patterns.
Adds a verify command ex:
embkit model verify netvae_latent2061_epochs20.model --ciThat can be used for inspecting the model file to see what the model did, the features, etc. It can also spot potential issues in the model if the model is something that you don't expect it to be, ex:
AI PR SUMMARY:
1. Constraint Architecture Migration
src/embkit/constraints/pathway_constraint.pyfeaturingPathwayConstraintInfo.src/embkit/constraints/network_constraint.py.src/embkit/factory/layers.py.ConstraintInfois now an abstract interface.PathwayConstraintInfo.from_dict.FeatureGroups-based mask generation from the layer factory path.Layer.gen_layer()now passes(in_features, out_features)into constraints and enforces strict shape validation.2. NetVAE Rebuilt Around Pathway Constraints
src/embkit/models/vae/net_vae.pynow constructs encoder/decoder masked layers directly fromfeatures,latent_groups, andgroup_layer_size.set_constraint_active(...)update_membership(...)refresh_masks(...)get_constraint_projection_weights(...)verify_integrityfor per-layer sparsity and leakage checks.from_dictnow errors ongroup_layer_scaling.3. Training Path Hardening for Masked Weights
src/embkit/modules/masked_linear.py, addedin_features/out_featurespassthrough properties.weight * mask.clamp_masked_weights()for hard post-step enforcement.src/embkit/optimize/__init__.py, added_enforce_model_masks(...)called after optimizer steps.fit_vae(...)now refreshes masks before training.fit_net_vae(...)(API path) with explicit TODO/context comments.fit_alt(...).4. Serialization and Verification Pipeline
src/embkit/factory/core.py:save(...)now clamps masked weights before serialization.run_model_verification(...)to load models and run integrity checks.5. CLI Improvements
train-netvae: InstantiatesNetVAE(...)directly; added--group-layer-size.train-vae: Added normalization guard for HDF5 input.extract_sif_interactionsandbuild_feature_map_indices.model verifywith--json,--ci, and--strictflags for health checks and latent assertions.6. Documentation & API Cleanup
docs/change-notes.md.mkdocsnavigation and requirements.7. Testing Expansion (Unit + E2E)
8. CI Coverage Enforcement Overhaul
/.github/workflows/pr_coverage_check.ymlnow fetches full history for diff coverage.Breaking / Behavioral Notes
group_layer_scalingis no longer accepted for NetVAE config loading.embkit.constraints.network_constrainthas been removed.PathwayConstraintInfoandMaskedLinear.