CONFIG
├── train
│   └── seed: 2222                                                                                                  
│       interval: step                                                                                              
│       monitor: val/next_step_log_loss_valid_indices                                                               
│       mode: min                                                                                                   
│       ema: 0.0                                                                                                    
│       test: false                                                                                                 
│       debug: false                                                                                                
│       ignore_warnings: false                                                                                      
│       state:                                                                                                      
│         mode: null                                                                                                
│         n_context: 0                                                                                              
│         n_context_eval: 0                                                                                         
│       ckpt: null                                                                                                  
│       disable_dataset: false                                                                                      
│       validate_at_start: false                                                                                    
│       pretrained_model_path: /home/epsteine/safari-dev/outputs/outputs/2025-05-14/12-20-07/step_819.ckpt          
│       pretrained_model_strict_load: true                                                                          
│       pretrained_model_state_hook:                                                                                
│         _name_: null                                                                                              
│       post_init_hook:                                                                                             
│         _name_: null                                                                                              
│       layer_decay:                                                                                                
│         _name_: null                                                                                              
│         decay: 0.7                                                                                                
│                                                                                                                   
├── tolerance
│   └── logdir: ./resume                                                                                            
│       id: null                                                                                                    
│                                                                                                                   
├── wandb
│   └── project: corelogic-mortgage                                                                                 
│       group: ''                                                                                                   
│       job_type: training                                                                                          
│       mode: online                                                                                                
│       name: corelogic_5l_nn                                                                                       
│       save_dir: .                                                                                                 
│       id: corelogic_5l_nn                                                                                         
│                                                                                                                   
├── trainer
│   └── _target_: pytorch_lightning.Trainer                                                                         
│       devices: 1                                                                                                  
│       accelerator: gpu                                                                                            
│       accumulate_grad_batches: 1                                                                                  
│       max_epochs: 40                                                                                              
│       gradient_clip_val: 0.0                                                                                      
│       log_every_n_steps: 10                                                                                       
│       limit_train_batches: 1.0                                                                                    
│       limit_val_batches: 1.0                                                                                      
│                                                                                                                   
├── loader
│   └── batch_size: 1                                                                                               
│       num_workers: 0                                                                                              
│       pin_memory: false                                                                                           
│       drop_last: true                                                                                             
│                                                                                                                   
├── dataset
│   └── _name_: corelogic_loan_dataset                                                                              
│       C: 10                                                                                                       
│       A: 2                                                                                                        
│       alpha_p: 0.05                                                                                               
│       beta_p: 0.6                                                                                                 
│       alpha_sp: 0.15                                                                                              
│       beta_sp: 0.6                                                                                                
│       num_samples: 20                                                                                             
│       kappa_p: 0.8                                                                                                
│       kappa_sp: 0.6                                                                                               
│       num_seq: 100                                                                                                
│       val_split: 0.1                                                                                              
│       test_split: 0.3                                                                                             
│       dataset_name: corelogic_loan_dataset                                                                        
│       debug: true                                                                                                 
│       debug_data_size: 3                                                                                          
│       seed: 42                                                                                                    
│       num_states: 50                                                                                              
│       num_terminal_states: 2                                                                                      
│       load_data: true                                                                                             
│       data_path: /home/epsteine/safari-dev/data/corelogic/loan_data_top4_zip_52.npz                               
│       save_data: false                                                                                            
│       nr_sampling_timesteps: 50                                                                                   
│       max_to_sample: 4500                                                                                         
│       nr_loans_to_sample: 2500                                                                                    
│       sample_random_loan_index: true                                                                              
│       sample_random_time_index: true                                                                              
│       dataset_config:                                                                                             
│         path_origination: /share/data/llm_mortgages/data/filtered_origination_data_top_1_zips.csv                 
│         path_performance: /share/data/llm_mortgages/data/filtered_performance_data_top_1_zips.csv                 
│         database_size: 1000                                                                                       
│         start_year: 1988                                                                                          
│         end_year: 2023                                                                                            
│         columns_to_normalize_origination:                                                                         
│         - fico_score_at_origination                                                                               
│         - original_balance                                                                                        
│         - initial_interest_rate                                                                                   
│         - original_ltv                                                                                            
│         columns_to_normalize_performance:                                                                         
│         - current_balance                                                                                         
│         - current_interest_rate                                                                                   
│         - scheduled_monthly_pi                                                                                    
│         - scheduled_principal                                                                                     
│         - mba_days_delinquent                                                                                     
│         feature_set:                                                                                              
│         - current_state                                                                                           
│         - fico_score_at_origination                                                                               
│         - original_balance                                                                                        
│         - initial_interest_rate                                                                                   
│         - original_ltv                                                                                            
│         - unemployment_rate                                                                                       
│         - national_mortgage_rate                                                                                  
│         - current_balance                                                                                         
│         - current_interest_rate                                                                                   
│         - scheduled_monthly_pi                                                                                    
│         - scheduled_principal                                                                                     
│         - mba_days_delinquent                                                                                     
│         - inferred_collateral_type                                                                                
│         - convertible_flag                                                                                        
│         - pool_insurance_flag                                                                                     
│         - io_flag                                                                                                 
│         - prepay_penalty_flag                                                                                     
│         - negative_amortization_flag                                                                              
│         - buydown_flag                                                                                            
│         - lagged_foreclosure_rate                                                                                 
│         - lagged_prepayment_rate                                                                                  
│         nr_classes: 8                                                                                             
│       steps_per_epoch: 35                                                                                         
│       val_split_date: 2009-06                                                                                     
│       test_split_date: 2009-12                                                                                    
│                                                                                                                   
├── task
│   └── _name_: base                                                                                                
│       loss: next_step_log_loss_valid_indices                                                                      
│       metrics:                                                                                                    
│       - next_step_log_loss_valid_indices                                                                          
│       torchmetrics: null                                                                                          
│                                                                                                                   
├── optimizer
│   └── _name_: adamw                                                                                               
│       lr: 0.001                                                                                                   
│       weight_decay: 0.05                                                                                          
│       betas:                                                                                                      
│       - 0.9                                                                                                       
│       - 0.999                                                                                                     
│                                                                                                                   
├── scheduler
│   └── _name_: cosine_warmup                                                                                       
│       num_warmup_steps: 140.0                                                                                     
│       num_training_steps: 1400.0                                                                                  
│                                                                                                                   
├── callbacks
│   └── learning_rate_monitor:                                                                                      
│         logging_interval: step                                                                                    
│       timer:                                                                                                      
│         step: true                                                                                                
│         inter_step: false                                                                                         
│         epoch: true                                                                                               
│         val: true                                                                                                 
│       params:                                                                                                     
│         total: true                                                                                               
│         trainable: true                                                                                           
│         fixed: true                                                                                               
│       model_checkpoint:                                                                                           
│         monitor: val/next_step_log_loss_valid_indices                                                             
│         mode: min                                                                                                 
│         save_top_k: 1                                                                                             
│         save_last: true                                                                                           
│         dirpath: checkpoints/                                                                                     
│         filename: step_{step}                                                                                     
│         auto_insert_metric_name: false                                                                            
│         verbose: true                                                                                             
│                                                                                                                   
├── decoder
│   └── _name_: tranistion_step_decoder                                                                             
│       hidden_dim: 140                                                                                             
│       num_states: 8                                                                                               
│       lookback_horizon: 25                                                                                        
│       forecast: false                                                                                             
│       forecast_horizon: 5                                                                                         
│       loan_pool_size: 1                                                                                           
│                                                                                                                   
├── model
│   └── layer:                                                                                                      
│         _name_: id_lookback                                                                                       
│         T: 0                                                                                                      
│         l_max: 50                                                                                                 
│         learning_rate: 0.001                                                                                      
│         lam: 0.001                                                                                                
│         kernel_dropout: 0.1                                                                                       
│         postact: glu                                                                                              
│         bidirectional: false                                                                                      
│         weight_init: random                                                                                       
│         use_set_mixing: true                                                                                      
│         set_mixing_architecture: MLP                                                                              
│         nr_layers_with_set: 6                                                                                     
│         set_mixing_dropout: 0.1                                                                                   
│         set_feature_embedding_dim: 5                                                                              
│         set_debug: true                                                                                           
│         set_nr_attn_heads: 1                                                                                      
│         kernel_len: 30                                                                                            
│         activation: relu                                                                                          
│         dropout: 0.1                                                                                              
│       _name_: model                                                                                               
│       prenorm: false                                                                                              
│       transposed: false                                                                                           
│       n_layers: 4                                                                                                 
│       d_model: 140                                                                                                
│       residual: R                                                                                                 
│       pool:                                                                                                       
│         _name_: pool                                                                                              
│         stride: 1                                                                                                 
│         expand: null                                                                                              
│       norm: null                                                                                                  
│       dropout: 0.1                                                                                                
│       tie_dropout: true                                                                                           
│       track_norms: true                                                                                           
│       encoder: null                                                                                               
│       decoder: null                                                                                               
│                                                                                                                   
└── encoder
    └── _name_: set_encoder                                                                                         
        chunk_size: 3                                                                                               
        architecture: MLP                                                                                           
        nr_attention_heads: 1                                                                                       
        feature_embedding_dim: 5                                                                                    
        n_attn_summary_statistics: true                                                                             
        dropout: 0.1                                                                                                
        debug: true                                                                                                 
                                                                                                                    
