Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Refactor solver #233

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

Merged
merged 2 commits into from
Mar 28, 2023

Conversation

HydrogenSulfate
Copy link
Collaborator

PR types

Function optimization

PR changes

APIs

Describe

  1. 将Solver构造方式拆分为4个静态方法: create_train_solver_from_args, create_eval_solver_from_args, create_train_solver_from_config, create_eval_solver_from_config

@paddle-bot
Copy link

paddle-bot bot commented Mar 23, 2023

Thanks for your contribution!


pretrained_model_path = cfg["Global"].get("pretrained_model_path", None)
log_level = cfg["Global"].get("log_level", "info")

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add config checker

@cxxly
Copy link
Collaborator

cxxly commented Mar 23, 2023

create_train_solver_from_args, create_eval_solver_from_args, create_train_solver_from_config, create_eval_solver_from_config 四个接口统一成Solver(...), Sover.from_conf(...),使用solver.train/eval切换模式

2. support grad scaler in save_load.py
3. adjust default checkpoint directory
cxxly
cxxly previously approved these changes Mar 27, 2023
Copy link
Collaborator

@cxxly cxxly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with todo:

  • add config checker

…_stokes.py; 3. replace f-string with string if f-string has no placeholders
Copy link
Collaborator

@cxxly cxxly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@HydrogenSulfate HydrogenSulfate merged commit 4b3febb into PaddlePaddle:develop Mar 28, 2023
@HydrogenSulfate HydrogenSulfate deleted the refactor_solver branch March 28, 2023 05:09
huohuohuohuohuo123 pushed a commit to huohuohuohuohuo123/PaddleScience that referenced this pull request Aug 12, 2024
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

Successfully merging this pull request may close these issues.

2 participants