Skip to content

Update psp_featurizer.py#12

Open
jchenpku wants to merge 1 commit intoTencentAI4S:masterfrom
jchenpku:master
Open

Update psp_featurizer.py#12
jchenpku wants to merge 1 commit intoTencentAI4S:masterfrom
jchenpku:master

Conversation

@jchenpku
Copy link

@jchenpku jchenpku commented Feb 7, 2025

Fix inhomogeneous array issue by normalizing MSA and deletion matrix in psp_featurizer.py (by gpt-o3-mini)

  • Added a new helper function (_normalize_msa) to ensure that all MSA sequences are of uniform length (padding with '-' or truncating as needed).
  • Modified the _get_feature_dict function to invoke normalization for both the MSA and the deletion matrix.
  • This change ensures that when the arrays are created downstream (using np.array), they are rectangular and prevents ValueErrors.
  • The model behavior remains unchanged for well-formatted inputs.

Fix inhomogeneous array issue by normalizing MSA and deletion matrix in psp_featurizer.py (by gpt-o3-mini)

- Added a new helper function (_normalize_msa) to ensure that all MSA sequences are of uniform length (padding with '-' or truncating as needed).
- Modified the _get_feature_dict function to invoke normalization for both the MSA and the deletion matrix.
- This change ensures that when the arrays are created downstream (using np.array), they are rectangular and prevents ValueErrors.
- The model behavior remains unchanged for well-formatted inputs.
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