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

TypeError: expected str, bytes or os.Pathlike object, not NoneType #2767

Closed
XuFanffei opened this issue Aug 29, 2023 · 5 comments · Fixed by #2784
Closed

TypeError: expected str, bytes or os.Pathlike object, not NoneType #2767

XuFanffei opened this issue Aug 29, 2023 · 5 comments · Fixed by #2784

Comments

@XuFanffei
Copy link

Summary

I want to use the “dp train init-model.json --init-model model.ckpt.index” instruction to improve my model, but this error occurred:
TypeError: expected str, bytes or os.Pathlike object, not NoneType
init-model.json.zip

DeePMD-kit Version

deepmd-kit-2.1.5

TensorFlow Version

2.9.0

Python Version, CUDA Version, GCC Version, LAMMPS Version, etc

No response

Details

err.zip

@njzjz
Copy link
Member

njzjz commented Aug 29, 2023

The correct argument is --init-model model.ckpt.

@njzjz njzjz added question and removed wontfix labels Aug 29, 2023
@taol1
Copy link

taol1 commented Aug 30, 2023

The correct argument is --init-model model.ckpt.

Thank you for your reply!

I use this directive: dp train --init-model model.ckpt.index init-model.json, and still report: TypeError: expected str, bytes or os.PathLike object, not NoneType

@njzjz
Copy link
Member

njzjz commented Aug 30, 2023

The checkpoint should be model.ckpt instead of model.ckpt.index.

@taol1
Copy link

taol1 commented Sep 1, 2023

The checkpoint should be model.ckpt instead of model.ckpt.index.

image

My 00.train/000/ directory is constructed as shown in the figure, no model.ckpt file.

@njzjz
Copy link
Member

njzjz commented Sep 4, 2023

model.ckpt is the prefix of files.

@njzjz njzjz added the document label Sep 4, 2023
njzjz added a commit to njzjz/deepmd-kit that referenced this issue Sep 4, 2023
@njzjz njzjz linked a pull request Sep 4, 2023 that will close this issue
@njzjz njzjz closed this as completed Sep 5, 2023
@njzjz njzjz added Docs and removed document labels Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants