-
Notifications
You must be signed in to change notification settings - Fork 667
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
add_warning_in_flow_save #10338
base: master
Are you sure you want to change the base?
add_warning_in_flow_save #10338
Conversation
Code got formatted by CI. Please request CI again if you still want to have this PR merged. If the PR is from a forked repo, please download the patch files from the GitHub Actions web page and apply them locally. |
Code got formatted by CI. Please request CI again if you still want to have this PR merged. If the PR is from a forked repo, please download the patch files from the GitHub Actions web page and apply them locally. |
@@ -703,6 +703,12 @@ def save( | |||
""" | |||
if isinstance(path_or_buffer, str): | |||
path_or_buffer = Path(path_or_buffer) | |||
if os.path.isdir(path_or_buffer) and not save_as_external_data: | |||
path_or_buffer = path_or_buffer / "model.pt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
model.of
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
model.of
已修改
warnings.warn( | ||
f"The save path cannot be a dir name from oneflow-0.9.1! The system | ||
will automatically complete it into the file name as {path_or_buffer}" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warnings.warn(
f"The save path cannot be a dir name from oneflow-0.9.1! The system "
f"will automatically complete it into the file name as {path_or_buffer}"
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
除了谢暄踢的两点建议外,我没有其他问题
CI failed when running job: cuda-module. PR label automerge has been removed |
Speed stats:
|
View latest API docs preview at: https://oneflow-staging.oss-cn-beijing.aliyuncs.com/docs/Oneflow-Inc/oneflow/pr/10338/ |
CI failed when running job: cuda-module. PR label automerge has been removed |
Speed stats:
|
No description provided.