-
Notifications
You must be signed in to change notification settings - Fork 0
Fix IndexError in kaggle_submission.py for sequences exceeding max_length #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -150,9 +150,9 @@ def predict_structures( | |
|
|
||
| # Store predictions | ||
| for j, (idx, row) in enumerate(batch_df.iterrows()): | ||
| seq_len = len(row['sequence']) | ||
| seq_len = min(len(row['sequence']), max_length) | ||
| target_id = row['target_id'] | ||
| sequence = row['sequence'] | ||
| sequence = row['sequence'][:max_length] # Truncate sequence to max_length | ||
|
Comment on lines
+153
to
+155
|
||
| coords = pred_coords[j, :seq_len, :, :] | ||
|
|
||
| predictions.append({ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def create_submission(predictions, output_path, num_structures=5):
"""
Create submission file from predictions.