2026-05-01 20:23:11,903 | INFO | Starting training for model: efficientnetv2 2026-05-01 20:23:11,903 | INFO | Args: {'model_name': 'efficientnetv2', 'image_dir': '/root/NIH-ChestXray/data/images_all', 'csv_path': '/root/NIH-ChestXray/data/Data_Entry_2017_v2020.csv', 'train_split_file': '/root/NIH-ChestXray/data/train_val_list.txt', 'test_split_file': '/root/NIH-ChestXray/data/test_list.txt', 'output_dir': './outputs', 'epochs': 10, 'batch_size': 512, 'lr': 0.0003, 'weight_decay': 1e-05, 'image_size': 224, 'num_workers': 8, 'pos_weight': 3.0, 'patience': 3} 2026-05-01 20:23:12,179 | INFO | Using device: cuda 2026-05-01 20:23:12,207 | INFO | GPU: NVIDIA A100-SXM4-80GB 2026-05-01 20:23:12,916 | INFO | Train samples: 86524 | Val samples: 25596 2026-05-01 20:23:13,142 | INFO | Loading pretrained weights from Hugging Face hub (timm/tf_efficientnetv2_s.in21k_ft_in1k) 2026-05-01 20:23:13,280 | INFO | HTTP Request: HEAD https://huggingface.co/timm/tf_efficientnetv2_s.in21k_ft_in1k/resolve/main/model.safetensors "HTTP/1.1 302 Found" 2026-05-01 20:23:13,281 | WARNING | Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads. 2026-05-01 20:23:13,303 | INFO | HTTP Request: GET https://huggingface.co/api/models/timm/tf_efficientnetv2_s.in21k_ft_in1k/xet-read-token/ea9abc143ea2b9d8e1ec1de277bce02149b9cf0e "HTTP/1.1 200 OK" 2026-05-01 20:23:14,721 | INFO | [timm/tf_efficientnetv2_s.in21k_ft_in1k] Safe alternative available for 'pytorch_model.bin' (as 'model.safetensors'). Loading weights using safetensors. 2026-05-01 20:23:16,586 | INFO | Missing keys (classifier.weight, classifier.bias) discovered while loading pretrained weights. This is expected if model is being adapted. 2026-05-01 20:23:29,934 | INFO | Epoch 1 | Batch 0/169 | Loss: 2.5928 2026-05-01 20:25:19,851 | INFO | Epoch 1 | Batch 100/169 | Loss: 0.3750 2026-05-01 20:27:39,009 | INFO | Epoch 1/10 | Train Loss: 0.3935 | Val Loss: 0.4840 | Val Mean AUC: 0.7443 | Time: 262.2s 2026-05-01 20:27:39,010 | INFO | Per-class AUC: { "No Finding": 0.7129, "Atelectasis": 0.7299, "Cardiomegaly": 0.7744, "Effusion": 0.8051, "Infiltration": 0.6882, "Mass": 0.7129, "Nodule": 0.6834, "Pneumonia": 0.6675, "Pneumothorax": 0.8161, "Consolidation": 0.7096, "Edema": 0.8157, "Emphysema": 0.8227, "Fibrosis": 0.7493, "Pleural_Thickening": 0.6989, "Hernia": 0.7786 } 2026-05-01 20:27:39,538 | INFO | Saved best model with AUC: 0.7443 2026-05-01 20:27:50,532 | INFO | Epoch 2 | Batch 0/169 | Loss: 0.3251 2026-05-01 20:29:42,059 | INFO | Epoch 2 | Batch 100/169 | Loss: 0.3538 2026-05-01 20:32:01,567 | INFO | Epoch 2/10 | Train Loss: 0.3264 | Val Loss: 0.4660 | Val Mean AUC: 0.7841 | Time: 262.0s 2026-05-01 20:32:01,568 | INFO | Per-class AUC: { "No Finding": 0.7279, "Atelectasis": 0.7542, "Cardiomegaly": 0.866, "Effusion": 0.8155, "Infiltration": 0.7004, "Mass": 0.7828, "Nodule": 0.7213, "Pneumonia": 0.7117, "Pneumothorax": 0.8538, "Consolidation": 0.7336, "Edema": 0.8315, "Emphysema": 0.8889, "Fibrosis": 0.7977, "Pleural_Thickening": 0.7374, "Hernia": 0.8394 } 2026-05-01 20:32:02,527 | INFO | Saved best model with AUC: 0.7841 2026-05-01 20:32:13,602 | INFO | Epoch 3 | Batch 0/169 | Loss: 0.3199 2026-05-01 20:34:04,565 | INFO | Epoch 3 | Batch 100/169 | Loss: 0.3234 2026-05-01 20:36:22,404 | INFO | Epoch 3/10 | Train Loss: 0.3104 | Val Loss: 0.4542 | Val Mean AUC: 0.7939 | Time: 259.9s 2026-05-01 20:36:22,405 | INFO | Per-class AUC: { "No Finding": 0.7287, "Atelectasis": 0.7627, "Cardiomegaly": 0.8741, "Effusion": 0.8245, "Infiltration": 0.6975, "Mass": 0.8056, "Nodule": 0.7391, "Pneumonia": 0.7126, "Pneumothorax": 0.8531, "Consolidation": 0.7441, "Edema": 0.8316, "Emphysema": 0.9014, "Fibrosis": 0.8109, "Pleural_Thickening": 0.7593, "Hernia": 0.863 } 2026-05-01 20:36:23,174 | INFO | Saved best model with AUC: 0.7939 2026-05-01 20:36:34,020 | INFO | Epoch 4 | Batch 0/169 | Loss: 0.2990 2026-05-01 20:38:26,983 | INFO | Epoch 4 | Batch 100/169 | Loss: 0.2603 2026-05-01 20:40:46,888 | INFO | Epoch 4/10 | Train Loss: 0.2984 | Val Loss: 0.4543 | Val Mean AUC: 0.7977 | Time: 263.7s 2026-05-01 20:40:46,888 | INFO | Per-class AUC: { "No Finding": 0.7265, "Atelectasis": 0.7625, "Cardiomegaly": 0.8833, "Effusion": 0.8195, "Infiltration": 0.697, "Mass": 0.8045, "Nodule": 0.7442, "Pneumonia": 0.721, "Pneumothorax": 0.8645, "Consolidation": 0.7419, "Edema": 0.8455, "Emphysema": 0.9069, "Fibrosis": 0.8091, "Pleural_Thickening": 0.7692, "Hernia": 0.8703 } 2026-05-01 20:40:47,516 | INFO | Saved best model with AUC: 0.7977 2026-05-01 20:40:58,571 | INFO | Epoch 5 | Batch 0/169 | Loss: 0.2751 2026-05-01 20:42:49,535 | INFO | Epoch 5 | Batch 100/169 | Loss: 0.2734 2026-05-01 20:45:07,225 | INFO | Epoch 5/10 | Train Loss: 0.2850 | Val Loss: 0.4603 | Val Mean AUC: 0.7987 | Time: 259.7s 2026-05-01 20:45:07,225 | INFO | Per-class AUC: { "No Finding": 0.7298, "Atelectasis": 0.7628, "Cardiomegaly": 0.8798, "Effusion": 0.8228, "Infiltration": 0.6938, "Mass": 0.804, "Nodule": 0.7521, "Pneumonia": 0.7113, "Pneumothorax": 0.8545, "Consolidation": 0.7438, "Edema": 0.8461, "Emphysema": 0.9068, "Fibrosis": 0.8118, "Pleural_Thickening": 0.7681, "Hernia": 0.8933 } 2026-05-01 20:45:07,892 | INFO | Saved best model with AUC: 0.7987 2026-05-01 20:45:18,453 | INFO | Epoch 6 | Batch 0/169 | Loss: 0.2734 2026-05-01 20:47:09,922 | INFO | Epoch 6 | Batch 100/169 | Loss: 0.2664 2026-05-01 20:49:27,959 | INFO | Epoch 6/10 | Train Loss: 0.2674 | Val Loss: 0.4742 | Val Mean AUC: 0.7912 | Time: 260.1s 2026-05-01 20:49:27,960 | INFO | Per-class AUC: { "No Finding": 0.7234, "Atelectasis": 0.7558, "Cardiomegaly": 0.8693, "Effusion": 0.8189, "Infiltration": 0.681, "Mass": 0.8059, "Nodule": 0.7334, "Pneumonia": 0.7028, "Pneumothorax": 0.856, "Consolidation": 0.7258, "Edema": 0.8386, "Emphysema": 0.8978, "Fibrosis": 0.8111, "Pleural_Thickening": 0.7656, "Hernia": 0.8826 } 2026-05-01 20:49:28,289 | INFO | EarlyStopping: no improvement for 1/3 epochs 2026-05-01 20:49:39,172 | INFO | Epoch 7 | Batch 0/169 | Loss: 0.2397 2026-05-01 20:51:31,979 | INFO | Epoch 7 | Batch 100/169 | Loss: 0.2511 2026-05-01 20:53:50,933 | INFO | Epoch 7/10 | Train Loss: 0.2443 | Val Loss: 0.5064 | Val Mean AUC: 0.7816 | Time: 262.6s 2026-05-01 20:53:50,934 | INFO | Per-class AUC: { "No Finding": 0.7049, "Atelectasis": 0.7456, "Cardiomegaly": 0.8651, "Effusion": 0.8085, "Infiltration": 0.6687, "Mass": 0.7916, "Nodule": 0.734, "Pneumonia": 0.6827, "Pneumothorax": 0.8417, "Consolidation": 0.7197, "Edema": 0.833, "Emphysema": 0.8941, "Fibrosis": 0.8087, "Pleural_Thickening": 0.7584, "Hernia": 0.8671 } 2026-05-01 20:53:51,327 | INFO | EarlyStopping: no improvement for 2/3 epochs 2026-05-01 20:54:01,933 | INFO | Epoch 8 | Batch 0/169 | Loss: 0.2147 2026-05-01 20:55:53,388 | INFO | Epoch 8 | Batch 100/169 | Loss: 0.2219 2026-05-01 20:58:11,478 | INFO | Epoch 8/10 | Train Loss: 0.2162 | Val Loss: 0.5603 | Val Mean AUC: 0.7737 | Time: 260.2s 2026-05-01 20:58:11,479 | INFO | Per-class AUC: { "No Finding": 0.7023, "Atelectasis": 0.7307, "Cardiomegaly": 0.8571, "Effusion": 0.8029, "Infiltration": 0.6714, "Mass": 0.7837, "Nodule": 0.729, "Pneumonia": 0.6607, "Pneumothorax": 0.827, "Consolidation": 0.7057, "Edema": 0.8182, "Emphysema": 0.8911, "Fibrosis": 0.8014, "Pleural_Thickening": 0.746, "Hernia": 0.8788 } 2026-05-01 20:58:11,877 | INFO | EarlyStopping: no improvement for 3/3 epochs 2026-05-01 20:58:11,877 | INFO | Early stopping triggered at epoch 8. Best AUC: 0.7987 2026-05-01 20:58:11,877 | INFO | Training complete. Best Val AUC: 0.7987