日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

kaggle notebook中使用git lfs

發布時間:2023/12/20 编程问答 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 kaggle notebook中使用git lfs 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

#爲kaggle notebook配置git-lfs
!curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | ?bash
!apt-get install -y --allow-unauthenticated git-lfs

?

# 下面是依賴包
!pip install pretrainedmodels
!pip install albumentations==0.3.0
!pip install addict
!rm -r RSNA666
!git clone https://github.com/appleyuchi/RSNA_kaggle_notebook

!cp /kaggle/input/cache666/*.pkl /kaggle/working/RSNA_kaggle_notebook/cache
!cd /kaggle/working/RSNA666;ls -l
!git clone https://github.com/NVIDIA/apex && cd apex && pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./

?

#假定我們要保存的大文件是.pt權重,那麼我們假設保存在

www.github.com/appleyuchi/appleyuchi/RSNA_MODEL中:

如下:

?

!rm -r ?/kaggle/working/RSNA_MODEL
!git clone https://github.com/appleyuchi/RSNA_MODEL
!cp /kaggle/working/*.pt /kaggle/working/RSNA_MODEL
!cd /kaggle/working/RSNA_MODEL/;git lfs track "*.pt";git add .gitattributes;git add *.pt
!cd /kaggle/working/RSNA_MODEL/;git status
!cd /kaggle/working/RSNA_MODEL;git commit --allow-empty-message -m f''&&git push https://appleyuchi:密碼@github.com/appleyuchi/RSNA_MODEL.git --all

?

?

銷燬git上面的.pt模型文件(必須kaggle上操作,因爲我們是國內,github服務器是國外,我們不能在自己電腦上進行銷燬模型操作):

!git clone https://github.com/appleyuchi/RSNA_MODEL
!cd /kaggle/working/RSNA_MODEL;rm *.pt;git add *;git commit --allow-empty-message -m f''&&git push https://appleyuchi:密碼@github.com/appleyuchi/RSNA_MODEL.git --all

總結

以上是生活随笔為你收集整理的kaggle notebook中使用git lfs的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。