python - 如何通过 git-lfs 将训练有素的 NLP 模型推送到 huggingface.co?
问题描述
我使用了“ !sudo apt-get install git-lfs
”,并且我在 Windows 上,我在某个地方错了:我怎样才能通过这个错误消息?
文本:
[ ] model.push_to_hub (MY_MODEL_NAME, use_auth_token=HUGGINGFACE_API_KEY)
tokenizer.push_to_hub(MY MODEL_NAME, use_auth_token-HUGGINGFACE_API_KEY)
07/09/2021 01:13:08 - INFO huggingface_hub.repository - git version 2.17.1
Sorry, no usage text found for "git-lfs"
--------------------------------------------------------------------
Called ProcessError Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/huggingface hub/repository.py in git commit(self, commit_message)
396 encoding="utf-8",
--> 397 cwd-self.local dir,
398 )
------------------------------------ 5 frames ----------------------
Called ProcessError: Command '['git', 'commit', '-m', ' add model'] returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
OSError Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/huggingface_hub/repository.py in git commit(self, commit_message)
401 raise EnvironmentError(exc.stderr)
402 else:
--> 403 raise EnvironmentError (exc.stdout)
404
405 def git push(self) -> str:
OSError: On branch main
Your branch is ahead of origin/main' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
截屏:
解决方案
推荐阅读
- verilog - 我正在使用带有 N/S 灯和 E/W 灯的摩尔电路制作交通灯控制器,并且我的输出一直显示为所有 X
- r - sjPlot::plot_model - 在 2x2 面板图中绘制 3 向交互并更改固定效果的标签
- python - 我正在尝试使用 tf.tensor_scatter_nd_update 制作二进制遮罩层,但我无法满足形状约束
- graph - 在绘图期间,我得到两种不同类型的图形,一种具有更多曲线,另一种更直,用于相同的代码。原因是什么
- google-apps-script - 从谷歌驱动器解析 json
- php - 未定义的变量:php web 应用程序中的monthly_error
- uml - 如何将构造函数添加到 UML 图?
- django - 尝试使用 Django、Redis 和 Apache wsgi 运行 2 个 Celery 守护进程和队列
- c# - Windows 服务中未调用 UDP 侦听器回调
- python - 获取按钮和表单的黑色屏幕截图