Julian Bilcke commited on
Commit ·
d2fbbb1
1
Parent(s): 79aa37d
add more logs
Browse files1494 unmodified lines14951496149714981499150015011502150315044 unmodified lines15091510151115121513151415151516151715181494 unmodified lines# Check in lora_weights directorylora_weights_dir = self.app.output_path / "lora_weights"if lora_weights_dir.exists():lora_safetensors = lora_weights_dir / "pytorch_lora_weights.safetensors"if lora_safetensors.exists():logger.info(f"Found weights in lora_weights directory: {lora_safetensors}")return str(lora_safetensors)# If not found in root or lora_weights, log the issuelogger.warning(f"Model weights not found at expected location: {model_output_safetensors_path}")4 unmodified linesif checkpoints:logger.info(f"Found {len(checkpoints)} checkpoint directories, but main weights file is missing")latest_checkpoint = max(checkpoints, key=lambda x: int(x.name.split("_")[-1]))checkpoint_weights = latest_checkpoint / "pytorch_lora_weights.safetensors"if checkpoint_weights.exists():logger.info(f"Found weights in latest checkpoint: {checkpoint_weights}")return str(checkpoint_weights)return None1494 unmodified lines14951496149714981499150015011502150315041505150615071508150915104 unmodified lines1515151615171518151915201521152215231524152515261527152815291530153115321494 unmodified lines# Check in lora_weights directorylora_weights_dir = self.app.output_path / "lora_weights"if lora_weights_dir.exists():logger.info(f"Found lora_weights directory: {lora_weights_dir}")lora_weights_contents = list(lora_weights_dir.glob("*"))logger.info(f"Contents of lora_weights directory: {lora_weights_contents}")lora_safetensors = lora_weights_dir / "pytorch_lora_weights.safetensors"if lora_safetensors.exists():logger.info(f"Found weights in lora_weights directory: {lora_safetensors}")return str(lora_safetensors)else:logger.info(f"pytorch_lora_weights.safetensors not found in lora_weights directory")# If not found in root or lora_weights, log the issuelogger.warning(f"Model weights not found at expected location: {model_output_safetensors_path}")4 unmodified linesif checkpoints:logger.info(f"Found {len(checkpoints)} checkpoint directories, but main weights file is missing")latest_checkpoint = max(checkpoints, key=lambda x: int(x.name.split("_")[-1]))logger.info(f"Latest checkpoint directory: {latest_checkpoint}")# Log contents of latest checkpointcheckpoint_contents = list(latest_checkpoint.glob("*"))logger.info(f"Contents of latest checkpoint {latest_checkpoint.name}: {checkpoint_contents}")checkpoint_weights = latest_checkpoint / "pytorch_lora_weights.safetensors"if checkpoint_weights.exists():logger.info(f"Found weights in latest checkpoint: {checkpoint_weights}")return str(checkpoint_weights)else:logger.info(f"pytorch_lora_weights.safetensors not found in checkpoint directory")return None
vms/ui/project/services/training.py+14