【hydra No.2】modify laplace2d to hydra style#575
Merged
Conversation
|
Thanks for your contribution! |
|
✅ This PR's description meets the template requirements! |
HydrogenSulfate
requested changes
Oct 18, 2023
Comment on lines
+8
to
+13
| # linux | ||
| wget https://paddle-org.bj.bcebos.com/paddlescience/datasets/laplace2d/laplace2d_dataset.tar | ||
| # windows | ||
| # curl https://paddle-org.bj.bcebos.com/paddlescience/datasets/laplace2d/laplace2d_dataset.tar --output laplace2d_dataset.tar | ||
| # unzip it | ||
| tar -xvf laplace2d_dataset.tar |
Collaborator
There was a problem hiding this comment.
这个模型没有来自文件的数据集,可以删除除最后一行外的代码
| mode: train # running mode: train/eval | ||
| seed: 42 | ||
| output_dir: ${hydra:run.dir} | ||
| #log_freq: 20 |
| NPOINT_BC: 400 | ||
|
|
||
| # model settings | ||
| model: |
Comment on lines
+53
to
+54
| NPOINT_INTERIOR = cfg.NPOINT_INTERIOR | ||
| NPOINT_BC = cfg.NPOINT_BC |
| # set random seed for reproducibility | ||
| ppsci.utils.misc.set_random_seed(cfg.seed) | ||
|
|
||
| # # set output directory |
| ppsci.utils.misc.set_random_seed(cfg.seed) | ||
|
|
||
| # # set output directory | ||
| logger.init_logger("ppsci", osp.join(cfg.output_dir, "train.log"), "info") |
| equation = {"laplace": ppsci.equation.Laplace(dim=2)} | ||
|
|
||
| # set geometry | ||
| geom = {"rect": ppsci.geometry.Rectangle((0.0, 0.0), (1.0, 1.0))} |
Collaborator
There was a problem hiding this comment.
使用cfg.DIAGONAL_COORD作为几何参数
Comment on lines
+157
to
+159
| NPOINT_INTERIOR = cfg.NPOINT_INTERIOR | ||
| NPOINT_BC = cfg.NPOINT_BC | ||
| NPOINT_TOTAL = NPOINT_INTERIOR + NPOINT_BC |
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| main() No newline at end of file |
HydrogenSulfate
requested changes
Oct 19, 2023
| ``` py linenums="110" | ||
| --8<-- | ||
| examples/laplace/laplace2d.py:115: | ||
| examples/laplace/laplace2d.py:110:130: |
| dir: output_laplace2d/${now:%Y-%m-%d}/${now:%H-%M-%S}/${hydra.job.override_dirname} | ||
| job: | ||
| name: ${mode} # name of logfile | ||
| chdir: false # keep current working direcotry unchaned |
| === "模型训练命令" | ||
|
|
||
| ``` sh | ||
| tar -xvf laplace2d_dataset.tar |
Collaborator
There was a problem hiding this comment.
删除tar -xvf laplace2d_dataset.tar
HydrogenSulfate
requested changes
Oct 19, 2023
23 tasks
Collaborator
|
hi, @xusuyong
|
Closed
huohuohuohuohuo123
pushed a commit
to huohuohuohuohuo123/PaddleScience
that referenced
this pull request
Aug 12, 2024
* modify laplace2d to hydra style * modify laplace2d to hydra style * modify laplace2d to hydra style * modify laplace2d to hydra style * modify laplace2d to hydra style * modify laplace2d to hydra style * fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


PR types
Others
PR changes
Others
Describe
laplace2d 案例代码重构