Upload code/train_sft.py with huggingface_hub
Browse files706 unmodified lines707708709710711712713714715716717706 unmodified linesif os.path.exists(save_path):api.upload_file(path_or_fileobj=save_path,path_in_repo=f"checkpoints/{ckpt_filename}",repo_id="ViuAI/ViuAI-500M",repo_type="model")print(f"✅ Successfully uploaded {ckpt_filename} to ViuAI/ViuAI-500M!")except Exception as e:print(f"⚠️ Error uploading to Hugging Face: {e}")else:706 unmodified lines707708709710711712713714715716717706 unmodified linesif os.path.exists(save_path):api.upload_file(path_or_fileobj=save_path,path_in_repo=f"sft_checkpoints/sft_{args.version}/{ckpt_filename}",repo_id="ViuAI/ViuAI-500M",repo_type="model")print(f"✅ Successfully uploaded {ckpt_filename} to ViuAI/ViuAI-500M (sft_checkpoints/sft_{args.version}/)!")except Exception as e:print(f"⚠️ Error uploading to Hugging Face: {e}")else:
code/train_sft.py+2-2