Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

复现时遇到的问题 #41

Open
ywjhs opened this issue May 7, 2024 · 3 comments
Open

复现时遇到的问题 #41

ywjhs opened this issue May 7, 2024 · 3 comments

Comments

@ywjhs
Copy link

ywjhs commented May 7, 2024

训练可以正常进行,但是不知道训练中途保存的参数会保存在哪里,同时发现inference.py需要的标签checkpoint的内容是空的,请问配置文件里的checkpoint应该怎么填,什么时候填,以及训练时的参数会保存在哪里

@Quiyyy
Copy link

Quiyyy commented May 24, 2024

你好,请问问题解决了吗,我尝试在jupyter中训练checkpoints文件夹打不开,但是使用colab训练checkpoints文件可以正常打开,并且模型会正常保存

@Quiyyy
Copy link

Quiyyy commented May 24, 2024

问题解决了,模型其实已经保存了,只是文件太大打不开,你可以使用这段代码将checkpoints文件夹压缩
`import shutil
import os

def compress_folder(folder_name, output_path):
"""
Compresses the specified folder into a zip file.

Parameters:
folder_name (str): The name of the folder to compress.
output_path (str): The path of the output zip file.
"""
folder_path = os.path.abspath(folder_name)
if not os.path.exists(folder_path):
    print(f'Folder "{folder_path}" does not exist.')
    return

shutil.make_archive(output_path, 'zip', folder_path)
print(f'Folder "{folder_path}" has been compressed into "{output_path}.zip"')

示例用法,将当前工作目录下的 "checkpoints" 文件夹压缩为 "checkpoints.zip"

compress_folder('checkpoints', 'checkpoints')`

@luoyonghua
Copy link

训练完就只生成了文件夹,打开之后都是空的,请较一下这个怎么解决
Snipaste_2024-12-17_02-39-25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants