Skip to content

Commit 348aa2e

Browse files
author
dmoi
committed
finishing up IT benchmarks
1 parent 5e25038 commit 348aa2e

6 files changed

Lines changed: 8380 additions & 788 deletions

config_notebook_1k_epochs.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ overwrite: true
1111

1212
# Training hyperparameters (from notebook)
1313
epochs: 1000
14-
batch_size: 8
15-
gradient_accumulation_steps: 2
14+
batch_size: 16
15+
gradient_accumulation_steps: 1
1616
seed: 0
1717

1818
# Model architecture (from notebook)
@@ -49,12 +49,12 @@ clip_grad: true
4949
# Loss weights (from notebook cell)
5050
# Note: These are initial weights - notebook has weight schedulers (currently commented out)
5151
edgeweight: 0.1
52-
# logitweight = 0.1
53-
xweight: 5.0
52+
logitweight: 0.01
53+
xweight: 0.5
5454
# fft2weight = 0.01
55-
# vqweight = 0.1
56-
# angles_weight = 0.1
57-
# ss_weight = 0.1
55+
vqweight: 0.1
56+
angles_weight: 0.1
57+
ss_weight: 0.1
5858

5959
# Commitment cost scheduling (from notebook encoder config)
6060
use_commitment_scheduling: true

foldtree2/learn_lightning.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# learn_lightning.py - PyTorch Lightning training with multi-GPU support
2+
import gc
23
import os
34
# Set CUDA memory allocator to use expandable segments to reduce fragmentation
45
os.environ['PYTORCH_CUDA_ALLOC_CONF'] = 'expandable_segments:True'
@@ -407,6 +408,10 @@ def training_step(self, batch, batch_idx):
407408
current_commitment = self.encoder.vector_quantizer.get_commitment_cost()
408409
self.log('train/commitment_cost', current_commitment, on_step=False, on_epoch=True, batch_size=batch_size)
409410

411+
412+
# Clear CUDA cache
413+
torch.cuda.empty_cache()
414+
gc.collect()
410415
return loss
411416

412417
def configure_optimizers(self):

foldtree2/learn_monodecoder.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,9 @@ def print_about():
194194
parser.add_argument('--ss-weight', type=float, default=0.25,
195195
help='Weight for secondary structure loss (default: 0.25)')
196196

197+
parser.add_argument('--nconv-layers', type=int, default=3,
198+
help='Number of convolutional layers in the geometry decoder (default: 3)')
199+
197200
# Tensor Core precision
198201
parser.add_argument('--tensor-core-precision', type=str, default='high',
199202
choices=['highest', 'high', 'medium'],
@@ -536,7 +539,7 @@ def decode_batch_reconstruction(encoder, decoder, z_batch, device, converter, ve
536539
'in_channels': {'res': args.embedding_dim, 'godnode4decoder': ndim_godnode, 'foldx': 23, 'fft2r': ndim_fft2r, 'fft2i': ndim_fft2i},
537540
'concat_positions': False,
538541
'conv_channels': [2*hidden_size, hidden_size, hidden_size],
539-
'kernel_sizes': [3, 3 ,3 ],
542+
'kernel_sizes': [3 ]*args.nconv_layers,
540543
'FFT2decoder_hidden': [hidden_size//2, hidden_size//2],
541544
'contactdecoder_hidden': [hidden_size//2, hidden_size//4],
542545
'ssdecoder_hidden': [hidden_size//2, hidden_size//2],

0 commit comments

Comments
 (0)