Skip to content

[Ehn] Enhance config module #899

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

Conversation

HydrogenSulfate
Copy link
Collaborator

@HydrogenSulfate HydrogenSulfate commented May 15, 2024

PR types

New features

PR changes

APIs

Describe

  1. 通过ConfigStore,支持在yaml文件中指定defaults字段来提供通用参数的默认配置,免去重复的yaml字段填写和Solver实例化时的十多个参数指定,如下所示。
    
     # before 
     solver = ppsci.solver.Solver(
         model,
         constraint,
         cfg.output_dir,
         optimizer,
         lr_scheduler,
         cfg.TRAIN.epochs,
         cfg.TRAIN.iters_per_epoch,
         save_freq=cfg.TRAIN.save_freq,
         log_freq=cfg.log_freq,
         eval_during_train=True,
         eval_freq=cfg.TRAIN.eval_freq,
         seed=cfg.seed,
         equation=equation,
         geom=geom,
         validator=validator,
         visualizer=visualizer,
         pretrained_model_path=cfg.TRAIN.pretrained_model_path,
         checkpoint_path=cfg.TRAIN.checkpoint_path,
         eval_with_no_grad=cfg.EVAL.eval_with_no_grad,
     )
    
     # after
     solver = ppsci.solver.Solver(
         model,
         constraint,
         optimizer=optimizer,
         equation=equation,
         validator=validator,
         visualizer=visualizer,
         cfg=cfg, <-- Only need cfg
     )
  2. 移除原有的AttrDict相关代码。
  3. 更新相关单测

此PR只负责更新基础功能,案例的代码、文档更新在 #852

Copy link

paddle-bot bot commented May 15, 2024

Thanks for your contribution!

Copy link
Collaborator

@zhiminzhang0830 zhiminzhang0830 left a comment

Choose a reason for hiding this comment

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

LGTM

@zhiminzhang0830 zhiminzhang0830 merged commit f17d1b3 into PaddlePaddle:develop May 15, 2024
@HydrogenSulfate HydrogenSulfate deleted the update_config_module branch May 15, 2024 11:10
huohuohuohuohuo123 pushed a commit to huohuohuohuohuo123/PaddleScience that referenced this pull request Aug 12, 2024
* support default config content in config module and remove deprecated AttrDict series code

* update corresponding unitests

* update develop code
HydrogenSulfate added a commit that referenced this pull request Jul 29, 2025
)

* add Solver.finetune() (#755)

* 【PPSCI Doc No.20】ppsci.arch.DeepPhyLSTM	 (#756)

* [Add] phylstm examples

* [Change] phylstm examples

* [Change] remove blank line

* clear differentiation cache in visu_forward to avoid OOM problem (#757)

* update docstring (#758)

* 【PPSCI Doc No.104-105】 (#759)

* update docstring

* remove spaces in args

* update

* remove extra blank line

* 【Hackathon 5th No.63】 PhyCRNet: Physics-informed Convolutional-Recurrent Network for Solving Spatiotemporal PDEs (#674)

* Add files via upload

* Create readme.md

* Add files via upload

* Update __init__.py

* Add files via upload

* Add files via upload

* add

* add

* add

* add

* add

* add

* add

* add

* add

* add

* a

* a

* Update phycrnet.md

* Update phycrnet.md

* Update phycrnet.md

* a

* d

* d

* a

* a

* a

* a

* a

* a

* p

* a

* a

* a

* update .md file

* update .md file

* update .md file

* fix

* edit md

* eval

* m

* m

* edit

* edit

---------

Co-authored-by: WG <[email protected]>
Co-authored-by: wangguan <[email protected]>

* [Doc] Add more contrib and more installtion method (#760)

* add 3 install method in README.md

* add more contributors

* [Doc] Add tutorial and fix docs (#766)

* (WIP)Add tutorial page

* fix document

* fix

* change split_to_dict and concat_to_tensor to staticmethod

* update batch_index class variable for all datasets

* move legend to outter-right of curve box and set dpi to 200

* add 1 more aistudio url

* [Fix] Update copyright and docstrings (#761)

* update copyright header

* update docstring of PhyCRNet

* doc106 (#762)

* set encoding to utf-8 when reading content from README.md during pip install (#768)

* doc108-109 (#764)

* remove python3.7 in docker (#765)

* remove python3.7

* update

* 【PPSCI Doc No.107】update doc for `ppsci.visualize.save_vtu_to_mesh` (#763)

* doc107

* fix

* [Example] Add RegAE example (#660)

* add RegAE example

* add RegAE

---------

Co-authored-by: HydrogenSulfate <[email protected]>

* [Enh] add validation for hydra config (#769)

* add validation for hydra config

* update unitest for pydantic

* fix for OptimizerList

* fix

* 【Hackathon 5th No.54】NSFnets (Navier-Stokes Flow nets): Physics-informed neural networks for the incompressible Navier-Stokes equations (#670)

* Add files via upload

* add

* add

* a

* a

* a

* a

* a

* a

* a

* a

* a

* a

* a

* a

* a

* a

* a

* a

* a

* a

* a

* a

* a

* a

* a

* a

* edit

* m

* edit

* a

* Update nsfnet4.md

* m

* m

* Update nsfnet4.md

* finish

* m

* debug

* edit

* add

* a

* a

* a

* a

* a

* a

* a

* d

* Update nsfnet4.md

* d

* d

* d

* d

* over

* reformat docs

* fix inference

* fix lr scheduler

---------

Co-authored-by: WG <[email protected]>
Co-authored-by: wangguan <[email protected]>

* specify pydantic >= 2.5.x or field_validator can not be imported from pydantic 1.x version (#770)

* add YingLong model (#771)

* add yinglong inference code

* add readme file for yinglong

* update yinglong predict code

* add copyright in predict_12layers.py

* update readme

* add reference for timefeatures.py

* update predict_12layers and readme

* [Doc] Add description of yaml (#774)

* (WIP)fix doctest and refine document

* update docs

* fix wrong code in ldc2d

* update code

* update paranoma

* fix

* refine doc

* Yinglong infer (#772)

* add yinglong inference code

* add readme file for yinglong

* update yinglong predict code

* add copyright in predict_12layers.py

* update readme

* add reference for timefeatures.py

* update predict_12layers and readme

* add visualize and update readme

* add figure for yinglong

* update yinglong readme

* fix readme for yinglong

* add predict for yinglong 24 layers

* update readme

* add plot for yinglong

* update predict code

* update readme

* update file path

* add version check

* fix doc string

* update readme

* update readme (#775)

* set create_graph=False before eval (#776)

* [Fea] Support python inference (#773)

* [Doc] Add pretrained model for laplace2d & refine comments (#639)

* update laplace2d pretrained model

* remove 'after finished training' comment in evaluate function

* update README.md

* add deploy module for aneurysm

* update code

* update aneurysm code

* update code

* update code

* update code

* update aneurysm document

* update export and inference document

* fix docstring

* [Fix] restore 'by_epoch' for SchedulerList and fix EPNN (#777)

* restore 'by_epoch' for SchedulerList

* fix for epnn

* [Fix]fix data transform error (#779)

* [Fix]fix data transform error

* [Update]add 'auto_collation' for some examples

* API 文档补全LorenzEmbedding,RosslerEmbedding

* Update embedding_koopman.py

* Update embedding_koopman.py

* Revert "[Fix]fix data transform error (#779)" (#781)

This reverts commit 6823a3e.

* [Update]update setting of 'auto_collation' and fix errors (#783)

* set 'auto_collation' false when using data transform

* fix data transform error of topopt example

* update document (#782)

* update Graphcast to document (#784)

* fix url of GraphCast in index.md (#785)

* [Refine] Refine yinglong code (#786)

* refine yinglong predictor and use config instead of argparser

* modify README of yinglong

* fix for review

* add requirements for yinglong (#787)

* [Docker] Update dockerfile & refine aneurysm (#789)

* update pymesh package and dockerfile for python3.9

* refine aneurysm code for export and inference

* install requirements.txt before executing setup.py for pymesh

* revert random permutation from numpy to paddle (#792)

* 【PPSCI Doc No.9】	ppsci.data.dataset.VtuDataset (#791)

* Add docx

* Apply suggestions from code review

* Apply suggestions from code review

* [Fea] Support onnx and TensorRT inference (#794)

* support onnx inference in base Predictor and PINNPredictor

* support exporting onnx model after exporting paddle inference models via argument 'with_onnx'

* support TensorRT for aneurysm and add TensorRT example in document

* 【PPSCI Export&Infer No. 29】 add export and inference (#793)

* add export and inference

* update

* 【PPSCI Export&Infer No.3】euler_beam (#796)

* 【PPSCI Export&Infer No.3】euler_beam

* Update examples/euler_beam/euler_beam.py

Co-authored-by: HydrogenSulfate <[email protected]>

* update config

---------

Co-authored-by: HydrogenSulfate <[email protected]>

* Move 2 tensor initialization to lazy call to prevent using GPU memory when start program in non-gpu mode(such as cpu) (#795)

* 【PPSCI Export&Infer No.4】laplace2d (#797)

* [Doc] Fix pipe document & refine inference guide (#798)

* correct pretrainde_model_path of Pipe Flow(test=document_fix)

* refine inference document

* fix significant figures to 2 for tidy plot

* increase indention

* [Fea] Add ModifiedMLP (#799)

* Add ModifiedMLP

* limit hidden_size to type int for ModifiedMLP

* fix f-string

* 【PPSCI Export&Infer No.5】lorenz (#801)

* 【PPSCI Export&Infer No.5】lorenz

* fix bug

* 【PPSCI Export&Infer No.6】rossler (#803)

* API 文档补全Generator (#804)

* fix lorenz/rossler export and infer (#805)

* add embedding model to PhysformerGPT2 for infer

* modify export and inference code of lorenz

* fix export command

* fix export and infer of rossler

* fix doc

* fix error message in generate method

* fix docstring

* refine code (#806)

* 【PPSCI Export&Infer No.7】 volterra_ide (#807)

* 【PPSCI Export&Infer No.7】 volterra_ide

* fix docstyle

* Allow initialize dataloader without specifying 'sampler' (#809)

* [Add]MRMSDataset (#810)

* [Add]MRMSDataset

* fix code and style

* [Fea] Support tensorboardX and add corresponding guidance (#812)

* support tensorboardX for viv as demo and add tensorboardX guide in
user_guide.md

* fix comma

* Fix sot sci error (#815)

* add nsys file

* add nsys file

* add nsys file

* fix paddle sot error

* fix code style

* chip heat simulation (#808)

* add bubble datafile test=develop

* add bubble code test=develop

* add bubble code test=develop

* add bubble code test=develop

* add bubble code

* add bubble data

* add bubble code

* delete mat file

* delete mat file

* bubble code

* delete mat file

* add some modify

* add some modifications

* add some modifications

* add some modifications

* add some modifications

* add some modification

* add some modification

* add some modification

* add some modification

* add some modification

* add some modification(test=document_fix)

* add some modification

* add some modification

* add some modification

* add some modification

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code for chip heat simulation

* add some code for chip heat simulation

* add some code for DGMR

* add some code for chip

* add some code for chip

* deleted dgmr code

* add some code for chip heat

* add some code for chip heat

* add some code for chip heat

* add some code for chip heat

* add some code for chip heat

* add some code for chip heat

* add some code for chip heat

* Update examples/chip_heat/conf/chip_heat.yaml

---------

Co-authored-by: HydrogenSulfate <[email protected]>

* modified:   docs/zh/examples/chip_heat.md (#820)

* add bubble datafile test=develop

* add bubble code test=develop

* add bubble code test=develop

* add bubble code test=develop

* add bubble code

* add bubble data

* add bubble code

* delete mat file

* delete mat file

* bubble code

* delete mat file

* add some modify

* add some modifications

* add some modifications

* add some modifications

* add some modifications

* add some modification

* add some modification

* add some modification

* add some modification

* add some modification

* add some modification(test=document_fix)

* add some modification

* add some modification

* add some modification

* add some modification

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code for chip heat simulation

* add some code for chip heat simulation

* add some code for DGMR

* add some code for chip

* add some code for chip

* deleted dgmr code

* add some code for chip heat

* add some code for chip heat

* add some code for chip heat

* add some code for chip heat

* add some code for chip heat

* add some code for chip heat

* add some code for chip heat

* modified some code for chip heat

* 【PPSCI Doc No.58、59、60】Mesh.from_pymesh、translate、scale (#818)

* update mesh.py

* update mesh.py

* [Doc] Fix url in chip_heat document (#822)

* add bubble datafile test=develop

* add bubble code test=develop

* add bubble code test=develop

* add bubble code test=develop

* add bubble code

* add bubble data

* add bubble code

* delete mat file

* delete mat file

* bubble code

* delete mat file

* add some modify

* add some modifications

* add some modifications

* add some modifications

* add some modifications

* add some modification

* add some modification

* add some modification

* add some modification

* add some modification

* add some modification(test=document_fix)

* add some modification

* add some modification

* add some modification

* add some modification

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code for chip heat simulation

* add some code for chip heat simulation

* add some code for DGMR

* add some code for chip

* add some code for chip

* deleted dgmr code

* add some code for chip heat

* add some code for chip heat

* add some code for chip heat

* add some code for chip heat

* add some code for chip heat

* add some code for chip heat

* add some code for chip heat

* modified some code for chip heat

* modified some code for chip heat

* [Fix] Fix doctest (#821)

* fix(test=document_fix)

* pretty evaluation output with prettytable

* fix code failed in doctest

* Revert "Merge branch 'pretty_eval_output' into develop"

This reverts commit 66cded1, reversing
changes made to 18ea97a.

* skip mesh example code in geometry/mesh.py for requiring pymesh installtion

* skip more code for doctest

* [Fix]dtype of RadarDataset's data (#823)

* 【PPSCI Doc No.38-40】 (#826)

* ppsci.equation.PDE.parameters/state_dict/set_state_dict api fix

* ppsci.equation.PDE.parameters/state_dict/set_state_dict api fix

---------

Co-authored-by: krp <[email protected]>

* remove seed and directory code to slim laplace2d exmaples (#824)

* [Fea] Support nvtx profiling (#825)

* support nvtx profiling via NVTX=1

* rename trainer to solver

* add user guide for NVTX

* refine code of paddle.framework.core and add cache for 3 context_manager of Solver

* update nsys chapter in user_guide

* fix solver.py

* Dgmr (#813)

* add bubble datafile test=develop

* add bubble code test=develop

* add bubble code test=develop

* add bubble code test=develop

* add bubble code

* add bubble data

* add bubble code

* add some code for chip

* add some code for DGMR

* add some code for DGMR

* add some code for DGMR

* add some dgmr code

* add some dgmr code

* add some dgmr code

* add some dgmr code

* add some dgmr code

* add some dgmr code

* add some dgmr code

* add some dgmr code

* add some dgmr code

* add some dgmr code

* add some dgmr code

* add some dgmr code

* add some dgmr code

* add some dgmr code

* add some dgmr code

* add some dgmr code

* add some dgmr code

* add some dgmr code

* add some dgmr code

* add some dgmr code

* add some dgmr code

* check if is directory befoe mkdirs (#827)

* [Fix] Replace os.path.isdir with len (#830)

* replace os.path.isdir with len

* enumerate from 0

* add quasi-random sampling method: Halton (#828)

* Update solver.py (#831)

修改osp.isdir为len

* 【PPSCI Doc No.66-74】 (#829)

* ppsci.equation.PDE.parameters/state_dict/set_state_dict api fix

* ppsci.equation.PDE.parameters/state_dict/set_state_dict api fix

* fix api docs in the timedomain

* fix api docs of timedomain

* fix api docs of timedomain

---------

Co-authored-by: krp <[email protected]>
Co-authored-by: HydrogenSulfate <[email protected]>

* [Enh] Refactor sum aggregator (#834)

* add Sum loss aggregator

* simplify loss aggregation code in train.py and add check for AGDA and PCGrad when used with amp

* add check for using L-BFGS with use_amp=True

* Refine Relobralo

* Fix docstring of timedomain.py

* remove unnecessary code in train.py

* automatically download *.pdeqn file if available when download pretrained model

* wrap func generated by symbolic module with DDP

* fix Relobralo

* initialize loss with 0.0 instead of first loss

* 【PPSCI Doc No.41-57】 (#833)

* fix docs bugs

* fix docs bugs

* fix codestyle bug

* fix codestyle bugs

* fix codestyle bugs

* fix some bugs

* fix codetype error

* fix other bugs

* fix typehint bugs

* fix other bugs

* fix codestyle bug

* fix codestyle bug

* add skip_prune_program arg for Solver.export (#835)

* 【PPSCI Export&Infer No.23】viv (#832)

* eadd export and inference for viv

* add doc

* fix viv export&infer

* Rewriting function

* fix viv export&infer

* [Doc] Add more contributors and refine several docstrings (#836)

* auto generate contributors instead of adding manually

* refine return type of docstrings

* 【PPSCI Doc No.61-65】 (#839)

* fix doc bugs

* fix codestyle bugs

* [Doc] Fix description for mkldnn (#837)

* fix description for mkldnn

* merge 3 visualization chapter into one chapter

* initialize loss with first constraint loss instead of 0.0, and change random seed of euler_beam for better l2error

* update euler_beam doc

* fix return type of PDE.set_state_dict

* Update XPINN_2D_PoissonsEqn.py (#842)

* support enabling prim via ++prim=1 (#843)

* 【PPSCI Doc No.23、25-29、31-34、97】 (#840)

* ppsci.equation.PDE.parameters/state_dict/set_state_dict api fix

* ppsci.equation.PDE.parameters/state_dict/set_state_dict api fix

* fix api docs in the timedomain

* fix api docs of timedomain

* fix api docs of timedomain

* ppsci api docs fixed

* ppsci api docs fixed

* ppsci api docs fixed

---------

Co-authored-by: krp <[email protected]>
Co-authored-by: HydrogenSulfate <[email protected]>

* 【PPSCI Doc No.35-37】 (#846)

* docs: add examples for api No.35-37

* Update ppsci/equation/pde/base.py

* Update ppsci/equation/pde/base.py

* Update ppsci/equation/pde/base.py

---------

Co-authored-by: HydrogenSulfate <[email protected]>

* Bubble net (#847)

* add bubble datafile test=develop

* add bubble code test=develop

* add bubble code test=develop

* add bubble code test=develop

* add bubble code

* add bubble data

* add bubble code

* delete mat file

* delete mat file

* bubble code

* delete mat file

* add some modify

* add some modifications

* add some modifications

* add some modifications

* add some modifications

* add some modification

* add some modification

* add some modification

* add some modification

* add some modification

* add some modification(test=document_fix)

* add some modification

* add some modification

* add some modification

* add some modification

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code for chip heat simulation

* add some code for chip heat simulation

* add some code for DGMR

* add some code for chip

* add some code for chip

* deleted dgmr code

* add some code for chip heat

* add some code for chip heat

* add some code for chip heat

* add some code for chip heat

* add some code for chip heat

* add some code for chip heat

* add some code for chip heat

* modified some code for chip heat

* modified some code for chip heat

* modified some code for chip heat

* [Example] Add allen cahn example (#845)

* allow empty optimizer when saving checkpoint

* add model averaging module

* fix return dtype inconsistency with global dtype

* use python func instead of sympy function for pow(u,3) get a bit poor L2 error than multiply(u*u*u)

* refine AllenCahn docstring

* support save and load for average model module

* add 3 ema unitests

* update 2023 to 2024

* add ema config pydantic scheme

* add avg_range for SWA

* update field_validator for swa and ema

* support period embedding for MLP

* Keep non-float data when reading file

* update ema and save_load, printer and eval, solver module code

* add allen_cahn example

* refine code

* save buffer and non-grad required params in ema

* add unitest for ema with buffer

* fix epoch_ema saving

* add unitest for ema state_dict

* refine allen_cahn_plain.py

* fix string to floating conversion in reader.py

* fix string to floating conversion in reader.py

* remove print code in solver

* Update allen_cahn_plain.py

* Update misc.py

---------

Co-authored-by: zzm <[email protected]>

* 【benchmark】fix benchmark model name (#850)

* add max_mem_reserved for benchmark

* add max_mem_reserved for benchamrk

* fix benchmark model name

* [Example] Add allen_cahn causal train with fourier feature and random weight factorization (#848)

* allow empty optimizer when saving checkpoint

* add model averaging module

* fix return dtype inconsistency with global dtype

* use python func instead of sympy function for pow(u,3) get a bit poor L2 error than multiply(u*u*u)

* refine AllenCahn docstring

* support save and load for average model module

* add 3 ema unitests

* update 2023 to 2024

* add ema config pydantic scheme

* add avg_range for SWA

* update field_validator for swa and ema

* support period embedding for MLP

* Keep non-float data when reading file

* update ema and save_load, printer and eval, solver module code

* add allen_cahn example

* refine code

* save buffer and non-grad required params in ema

* add unitest for ema with buffer

* fix epoch_ema saving

* add unitest for ema state_dict

* refine allen_cahn_plain.py

* fix string to floating conversion in reader.py

* fix string to floating conversion in reader.py

* update code and refine document

* correct initialization for RWF

* update docstring for arg 'random_weight' of mlp

* update docstrings

* add causal fourier rwf config

* fix code in mlp.py

* refine code in mse.py

* add ema document file(test=document_fix) (#853)

* [New example] Add nls-mb example (#838)

* add NLS-MB example

* fix

* fix

* fix

* fix

* modify

* modify

* modify

* fix

* replace deprecated 'FieldValidationInfo' with 'ValidationInfo' (#855)

* check return type of FunctionalLoss (#854)

* [Docker] Add docker image (#856)

* execute 'ldconfig' after /bin/bash automatically

* add_dockerhub

* refine doc

* update base image to paddle official image(test=document_fix)

* update code

* update code

* 【PPSCI Export&Infer No.24】 biharmonic2d (#858)

* [SCI Export&Infer No.24] biharmonic2d

* P[PSCI Export&Infer No.724] biharmonic2d fix

* [Fix] Fix NLS-MB document and code (#859)

* execute 'ldconfig' after /bin/bash automatically

* add_dockerhub

* refine doc

* update base image to paddle official image(test=document_fix)

* Fix NLS-MB examples code and document

* Update YingLong1 README.md (#861)

* Update YingLong1 README.md

* Update README.md

* add '_' to initializer.glorot_normal

* add allen_cahn_default.yaml

* [Doc] Add anno for eval (#863)

* add annotation for eval.py

* add NLS example into index and README

* rename yinglong to yinglong1 (#862)

* add allen-cahn document

* update pymesh install package

* 【PPSCI Export&Infer No.22】VP_NSFNet4 (#864)

* [SCI Export&Infer No.24] biharmonic2d

* P[PSCI Export&Infer No.724] biharmonic2d fix

* add export&infer nsfnet4

* add export&infer nsfnet4

* update pymesh install package (#865)

* [Refine] Refine evaluation output (#866)

* fix(test=document_fix)

* pretty evaluation output with prettytable

* remove epoch id when ony evaluating

* hidden epoch information when not evaluating on flying

* [Enh] Add numpy solver in config solvers (#869)

* support registering numpy config solvers when parsing attribute of numpy from config

* remove permutation code

* avoid duplicated register

* [API] Add chamfer loss (#871)

* add chamfer loss

* update development.md

* update example of chamfer loss docstring

* fix doctest for ChamferLoss

* support batch comupute for chamferloss

* add-earthformer (#870)

* del arch.md in data (#872)

* [Add]Add competition&IJCAI_2024 submodule (#873)

* [Add]Add competition&IJCAI_2024 code

* update README

* add IJCAI 2024 CAR competition to inedx.md and fix docstrings in cuboid_transformer.py(test=document_fix) (#874)

* [Update]update competition description (#876)

* Fix typo (#881)

* fix typo for correcting 'direcotry' to 'directory'

* fix typo for correcting 'unchaned' to 'unchanged'

* [Fix] Fix inference path typo (#880)

* fix(test=document_fix)

* fix typo for correcting 'pdpiparmas' to 'pdiparams'

* add left bracket for docstring of CuboidSelfAttentionLayer

* 【PPSCI Export&Infer No.15-16】 (#875)

* fix doc bugs

* fix codestyle bugs

* 【PPSCI Export&Infer No.15-16】

* fix codestyle bug for PPSCI Export&Infer No.15-16】

* fix codestyle bugs for 【PPSCI Export&Infer No.15-16】

* fix codestyle bugs for 【PPSCI Export&Infer No.15-16】

* fix codestyle bugs for 【PPSCI Export&Infer No.15-16】

* fix bugs for 【PPSCI Export&Infer No.15-16】

* fix codestyle bugs

* updata_ijcai_car_submodule (#882)

* 【PPSCI Export&Infer No.25】bracket (#878)

* ppsci.equation.PDE.parameters/state_dict/set_state_dict api fix

* ppsci.equation.PDE.parameters/state_dict/set_state_dict api fix

* fix api docs in the timedomain

* fix api docs of timedomain

* fix api docs of timedomain

* ppsci api docs fixed

* ppsci api docs fixed

* ppsci api docs fixed

* add export and infer for bracket

* updata bracket doc

* solve conflict according to the branch named develop

* Update examples/bracket/conf/bracket.yaml

* Update examples/bracket/conf/bracket.yaml

* Update examples/bracket/conf/bracket.yaml

* add export&inference for bracket

---------

Co-authored-by: krp <[email protected]>
Co-authored-by: HydrogenSulfate <[email protected]>

* add document of python_infer with depoly module (#885)

* 【PPSCI Export&Infer No.11-12】 (#883)

* fix doc bugs

* fix codestyle bugs

* 【PPSCI Export&Infer No.15-16】

* fix codestyle bug for PPSCI Export&Infer No.15-16】

* fix codestyle bugs for 【PPSCI Export&Infer No.15-16】

* fix codestyle bugs for 【PPSCI Export&Infer No.15-16】

* fix codestyle bugs for 【PPSCI Export&Infer No.15-16】

* fix bugs for 【PPSCI Export&Infer No.15-16】

* fix codestyle bugs

* 【PPSCI Export&Infer No.11-12】

* change predictor

* fix bugs in change predictor

* cancel extra doc commit

* fix codestyle bugs

* Update examples/cylinder/2d_unsteady/cylinder2d_unsteady_Re100.py

* Update examples/cylinder/2d_unsteady/transformer_physx/train_transformer.py

* Update examples/cylinder/2d_unsteady/cylinder2d_unsteady_Re100.py

* Update examples/cylinder/2d_unsteady/transformer_physx/train_transformer.py

* Update examples/cylinder/2d_unsteady/transformer_physx/train_transformer.py

* cancel extra changes

* cancel extra changes

* update examples/cylinder/2d_unsteady/transformer_physx/conf/transformer.yaml

---------

Co-authored-by: HydrogenSulfate <[email protected]>

* 【PPSCI Export&Infer No.21】tempoGAN (#884)

* add tempoGAN export&infer

* fix tempoGAN.md

* fix tempoGAN.md

* fix tempoGAN.py

* [Doc&Refine] Add IJCAI competetion in README (#886)

* add ijcai 2024 competetion information in README

* refine symbolic module

* Fix document(test=document_fix)

* fix for pdiparams_path

* [Hackathon 6th Code Camp No.15] support earthformer docs (#877)

* add-earthformer

* add-earthformer-doc

* add-earthformer-doc

* add-erthformer-doc

* add-earthformer

* add-earthformer-doc

* add-earthformer-doc

* add-earthformer-doc

* add-earthformer-doc

---------

Co-authored-by: zzm <[email protected]>

* Update mkdocs.yml (#888)

* 【PPSCI Export&Infer No.20】shock_wave (#890)

* add shock_wave export&infer

* Update examples/shock_wave/shock_wave.py

* Update examples/shock_wave/shock_wave.py

---------

Co-authored-by: HydrogenSulfate <[email protected]>

* 【PPSCI Export&Infer No.9】Bubble (#887)

* 【PPSCI Export&Infer No.9】

* update examples/bubble/conf/bubble.yaml

* fix codestyle bugs

* Update examples/bubble/bubble.py

* update examples/bubble/bubble.py

---------

Co-authored-by: HydrogenSulfate <[email protected]>

* modify earthformer-doc (#891)

* add-earthformer

* add-earthformer-doc

* add-earthformer-doc

* add-erthformer-doc

* add-earthformer

* add-earthformer-doc

* add-earthformer-doc

* add-earthformer-doc

* add-earthformer-doc

* add-earthformer-doc

* add-earthformer-doc

---------

Co-authored-by: zzm <[email protected]>

* 【PPSCI Export&Infer No.30】heat_exchanger (#892)

* 【PPSCI Export&Infer No.30】heat_exchanger

* fix codestyle bug

* update examples/heat_exchanger/heat_exchanger.py

* fix codestyle bugs

* Update heat_exchanger.py

Fix and simplify code

---------

Co-authored-by: HydrogenSulfate <[email protected]>

* add export&infer 26-27 (#893)

* [Fea] Support detach_keys argument for all PDE (#889)

* fully support detach_keys argument for all PDE

* add unitest for detach option

* fix access for 'name' when exp do not have 'name' attribute

* fix unitest

* add example code for _apply_detach

* fix test_pde_base

* [Fix] Fix phycrnet bug (#894)

* fix phycrnet bug

* Update examples/phycrnet/functions.py

Co-authored-by: zzm <[email protected]>

* Update examples/phycrnet/functions.py

Co-authored-by: zzm <[email protected]>

---------

Co-authored-by: zzm <[email protected]>

* [Doc] Update links of cooperation projects (#898)

* fix(test=document_fix)

* optimize importing

* 添加共创计划项目链接

* [Ehn] Enhance config module (#899)

* support default config content in config module and remove deprecated AttrDict series code

* update corresponding unitests

* update develop code

* 【PPSCI Export&Infer No.13】 darcy2d (#900)

* 【PPSCI Export&Infer No.13】 darcy2d

* Update examples/darcy/darcy2d.py

---------

Co-authored-by: HydrogenSulfate <[email protected]>

* Add export & inference for hPINNs (#902)

* feat: add export and infer functions for hpinns

* fix:register transform brfore export

* 【PPSCI Export&Infer No.2】Add export & inference for DeepONet (#901)

* add DeepONet export and infer

* update docstring of geometry

* Update deeponet.py

* Update deeponet.py

* [Upadte]update plotting of hpinn's inference (#903)

* [Upadte]update plotting of hpinn's inference

* update1

* [Fix] Fix fractional poisson 2d (#904)

* Fix fractional_poisson_2d

* update fractional_poisson_2d

* [Doc&Fix] Update config doc and correct API (#905)

* update config document and adapt viv code to new config module

* update 'how to use optuna' in document

* Fix

* 【PPSCI Export&Infer No.35】nowcastnet (#895)

* nowcastnet.py

* nowcastnet.py

* nowcastnet.py

* Update examples/nowcastnet/nowcastnet.py

Co-authored-by: HydrogenSulfate <[email protected]>

* Update examples/nowcastnet/nowcastnet.py

Co-authored-by: HydrogenSulfate <[email protected]>

* nowcastnet

* nowcastnet

---------

Co-authored-by: HydrogenSulfate <[email protected]>

* Fix cylinder2d_unsteady_transformer_physx (#906)

* [Fea] Add PirateNet and update allen_cahn document (#907)

* Add PiraNet and update allen_cahn document

* fix example code for mlp.py

* rename pira to pirate

* update AIStudio link for allen cahn

* [Fix] Fix output_dir for visualDL and tensorboardX (#908)

* fix output_dir for visualDL and tensorboardX

* update scikit-learn<1.5.0 for incompatible upgrad

* update docs(test=document_fix) (#909)

* [Hackathon 6th Code Camp No.15] support neuraloperator (#867)

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* [Fix] Fix document requirement and update yaml (#910)

* add dependencies to dynamic in pyproject.toml

* Add --create-dirs in curl scripts for creating directory automatically

* remove visualdl from requirements.txt

* use true/false instead of True/False for compatibility

* update some links

* fix visualdl

* [Fix] Correct desciprtion of epsilon of AllenCahn equation (#911)

* Correct desciprtion of epsilon of AllenCahn equation

* fix seed for test_detach

* Add allen cahn sota (#879)

* add allen cahn ntk

* update code

* add allen cahn ntk

* update code

* update code

* update code

* 修改配置

---------

Co-authored-by: HydrogenSulfate <[email protected]>

* 【Hackathon 6th No.39】XPINN 迁移至 PaddleScience (#849)

* add XPINNs example

* comment

* add conf file

* refine code

* fix comment

* fix data type

* fix data type

* Update examples/xpinn/plotting.py

* Update examples/xpinn/conf/xpinn.yaml

* refine code

* refine doc

* refine doc

* fix doc

* fix bugs

---------

Co-authored-by: HydrogenSulfate <[email protected]>

* [Doc] Add evaluation for xpinn and add to homepage (#912)

* add evaluation for xpinn and refine doc

* update Examples in AllenCahn docstring

* fix export and infer (#916)

* update example code for PINNPredictor (#918)

* auto build and upload develop pip whl to pypi when commiting (#920)

* fix for 3.10 (#921)

* [Refine] Refine loss and metric module (#919)

* return loss dict instead of loss summation for all loss.forward

* adapt all mtl module for Dict[str, Tensor] type of input losses

* fix

* remove 'area' in Constriant.output_keys

* fix eval.py

* fix code

* fix examples in func.py

* fix examples in func.py

* Fix for MSELossWithL2Decay and train_enn.py

* fix doctest in loss/mse.py

* fix epnn

* fix

* [Doc] Refine user guide (#922)

* fix code and refine userguide

* print log when reach the training max_steps

* update docs

* [Example] Add ldc 2d Re1000 and Re3200 example (#924)

* update piranet for ldc re3200 case(WIP)

* add ldc_2d_Re1000 plain example

* add ldc_2d_Re3200_piratenet and ldc_2d_Re3200_sota

* refine code

* refine docstrings

* add missing blank line for docstrings

* refine docstrings

* replace lowercase to uppercase for first word in sentence

* add ldc_2d_re3200_piratenet and ldc_2d_re3200_sota

* remove redundant files

* fix linenum

* fix doctest

* fix for allen_cahn

* [Doc] Update ldc2d doc and README (#925)

* update ldc2d doc

* update RAEDME

* 【PPSCI Export&Infer No.31】heat_pinn (#926)

* ppsci.equation.PDE.parameters/state_dict/set_state_dict api fix

* ppsci.equation.PDE.parameters/state_dict/set_state_dict api fix

* fix api docs in the timedomain

* fix api docs of timedomain

* fix api docs of timedomain

* ppsci api docs fixed

* ppsci api docs fixed

* ppsci api docs fixed

* add export and infer for bracket

* updata bracket doc

* solve conflict according to the branch named develop

* Update examples/bracket/conf/bracket.yaml

* Update examples/bracket/conf/bracket.yaml

* Update examples/bracket/conf/bracket.yaml

* add export&inference for bracket

* add export and infer for heat_pinn

* add export and infer for heat_pinn

* Update examples/heat_pinn/heat_pinn.py

* Update examples/heat_pinn/heat_pinn.py

* Update examples/heat_pinn/conf/heat_pinn.yaml

---------

Co-authored-by: krp <[email protected]>
Co-authored-by: HydrogenSulfate <[email protected]>

* [Doc] Refine doc (#927)

* remove vtk for slim requirements.txt

* fix document of ldc2d_steady.md

* refine grad_norm

* remove redundant profiler.py file

* refine docs

* fix gradnorm

* restore gradnorm to original version

* remove pyvista from requirements.txt

* add nightly build pip .whl url (#928)

* Support gh pages (#929)

* update develop mkdocs

* add mike plugin to support deploying document in github pages

* remove pycamotk for submodules (#930)

* add workflows for github pages

* update mkdocs.yml

* update ai4s_universal_platform branch for gh-page

* only set default to latest when current branch is develop

* fix ci.yml

* fix alias

* use develop instead of latest

* remove ci.yml in develop branch

* [Fix] Fix eval (#931)

* update develop mkdocs

* allow alias for mike

* fix and refine eval.py

* fix

* [Hackathon 6th Code Camp No.15] support neuraloperator docs (#917)

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator-doc

* add-neuraloperator-doc

* move-paddle-harmonics

* add-neuraloperator-doc

* add-neuraloperator-doc

* add-neuraloperator-doc

* add-neuraloperator-doc

* add-neuraloperator-doc

* add-neuraloperator-doc

* add-neuraloperator-docs

* add-neuraloperator-docs

* add-neuraloperator-docs

* add-neuraloperator-doc

* add-neuraloperator-doc

* add montecarlo integrate api (#932)

* add montecarlo integrate api

* Update ppsci/experimental/math_module.py

* Update ppsci/experimental/math_module.py

* Update ppsci/experimental/math_module.py

* Update ppsci/experimental/math_module.py

* Update ppsci/experimental/math_module.py

* fix code format error

---------

Co-authored-by: HydrogenSulfate <[email protected]>

* 【Hackathon 6th No.37】GraphCastNet 代码迁移至 PaddleScience (#897)

* add GraphGridMeshDataSet

* add graphcast model and example

* refine code and visualization

* add license

* fix bugs

* fix ci errors

* fix ci errors

* fix ci errors

* fix ci errors

* fix ci errors

* add docs

* resolve conflicts

* resolve conflicts

* resolve conflicts

* resolve conflicts

* refine docs

* fix comments

* fix comments

* fix comments

* fix

* delete atmospheric_utils.py

* fix ci errors

* fix

* fix comments

* fix

* add transform in graphcast

* fix model bugs

* fix

* fix docs

* [Doc&Fix] Fix compatibility with isort and black and refine install_setup and graphcast doc (#934)

* update develop mkdocs

* allow alias for mike

* add pymesh test notation for py310 and fix isort conflict with black

* use warning instead of assert for duplicated metric name

* fix amgnet for precision promotion is deprecated between int32/64

* [Doc] Refine doc and code (#935)

* update develop mkdocs

* allow alias for mike

* fix code

* use full instead of to_tensor

* reset time statistics after printing

* modify yinglong (#937)

* modify yinglong

* refine

* update adr example(pre) (#938)

* add Extformer-MoE example by HKUST(GZ) (#933)

* add extformer-moe

* fix 0624

* fix 0624

* Delete outputs_extformer_moe_pretrain directory

* Delete docs/zh/examples/extformer_moe_figs directory

* Update extformer_moe.md

* Update extformer_moe_utils.py

* Update extformer_moe.md

* Update ppsci/data/dataset/__init__.py

Co-authored-by: HydrogenSulfate <[email protected]>

* Update ppsci/data/dataset/ext_moe_enso_dataset.py

Co-authored-by: HydrogenSulfate <[email protected]>

* fix merge review issues

* fix merge 240629

* fix 240701

* fix 240701_

* fix 240701__

* fix 240701___

* Update ext_moe_enso_dataset.py

* Update docs/zh/examples/extformer_moe.md

Co-authored-by: HydrogenSulfate <[email protected]>

* Update docs/zh/examples/extformer_moe.md

Co-authored-by: HydrogenSulfate <[email protected]>

* Update ppsci/data/dataset/ext_moe_enso_dataset.py

---------

Co-authored-by: HydrogenSulfate <[email protected]>

* [Fix] Fix extformer-moe (#940)

* fix&refine extformer code and docs

* replace paddle.nn. with nn.

* update Extformer-MoE in docs

* [Example] Add adv_cvit and ns_cvit (#939)

* update develop mkdocs

* allow alias for mike

* update CViT code(WIP)

* update CViT code(WIP)

* update validate code

* update code

* update code

* refine code

* refine docs

* update docs

* update export&inference code

* update ns cvit code(WIP, not aligned)

* update reprod code

* rename block name according to their class

* add more config yamls

* fix data/__init__

* fix

* refine code and add more annotations

* update code

* update TRT steps

* change pos/time embedding from buffer to trainable parameters

* use interpolation for spatial_dims

* remove interpolation

* update config

* fix std of normal initializer

* update outputfile

* add einops into req

* restore l2_rel

* refine eval checking and logging

* update example code of FunctionalBatchTransform

* update pretrained url and plot code

* add cvit doc

* update adv_cvit doc

* rename title for adv_cvit.md

* update docs

* update docs

* fix zh/examples/extformer_moe.md

* update docs

* refine code

* [Fix] Fix batch indexing failed in phylstm2 (#941)

* fix batch indexing failed in list:

* fix chapter number of adv_cvit.md(test=document_fix)

* [Doc] Add requirements.txt for AMGNet (#942)

* remove print code

* add req for amgnet

* [Fix] Fix phylstm (#943)

* fix phylstm running error

* update version warning

* fix amgnet doc(test=document_fix)

* fix deepcfd

* fix deepcfd

* [Doc] Fix document and formulations for cvit (#944)

* fix document and formulations

* correct doc of Data.batch_transform

* update schema for None batch size in INFER config

* support batch_size to be set to None where certain data is unnecessary to be batchified

* update pre-commit

* refine EVAL config schema

* Fix eval config (#948)

* [Feature] Add loss aggregator to saving/loading process (#949)

* fix document and formulations

* correct doc of Data.batch_transform

* update schema for None batch size in INFER config

* support batch_size to be set to None where certain data is unnecessary to be batchified

* update pre-commit

* refine EVAL config schema

* save&load state_dict for loss aggregator

* [Doc] Add HKUST badge and remove some codes (#950)

* add HKUST icon in cooperation institution

* remove unnecessary loss_aggregator in load_pretrain function

* resize image

* add requests into requirements

* Fix typo in mtl/base (#951)

* PIDeepONet-LBM (#947)

* PIDeepONet-LBM

* PIDeepONet-LBM-datasetMountBOS

* PIDeepONet-LBM-datasetMountBOS-CUDASet

* PIDeepONet-LBM-datasetMountBOS-CUDASet

* [PIR] Support pir export and infer (#952)

* support export and inference in PIR mode

* add validator check

* fix solver.predict and device setting (#953)

* fix input dtype in shock wave (#954)

* [Fix] Fix dtype (#956)

* align dtype of input with model parameter

* wrap return training loss with dict

* update aneurysm zh-cn translation:

* [Fix] Adapt code to dy2st mode (#957)

* shallow copy input data in expression

* shallow copy in ComposedNode.forward

* update tempoGAN code linenumber

* update code

* [Example] Add spinn on helmholtz equation (#958)

* update spinn code(WIP)

* update code(l2err=0.089)

* update SPINN helmholtz3d

* update pretraind model url(TRAIN.nc=64)

* add spinn doc

* refine code and docs

* update

* update docs

* update supports information

* update code and doc

* refine arch code

* Fix return type in examples/tempoGAN/functions.py for tempoGAN (#963)

* [Add]add paddle version code of IJACA 2024 (#959)

* [Add]add paddle version code of IJACA 2024

* update README.txt

* update command of README.txt and some hints

* [Doc] Update guidance of development (#965)

* update SPINN url

* update url

* annotate latex which may occur error when latex font is not installed

* add mtl submodule to loss.__all__

* update doc

* update pre-commit guidance

* update synchronization of upstream guidance

* [Doc] Update url (#966)

* update SPINN url

* update url

* annotate latex which may occur error when latex font is not installed

* add mtl submodule to loss.__all__

* update doc

* update pre-commit guidance

* update synchronization of upstream guidance

* update docs

* update batch size computation

* rename IJACA -> IJCAI

* update description

* remove redundant import

* 整理代码并准备提交

* 整理代码并准备提交

* 整理代码并准备提交

* perovskite

* 使用 Git LFS 跟踪大文件

* Remove large files from version control

* Remove LFS tracking and update .gitattributes

* 提交在 new_feature_branch 上的更改

* Your commit message

* Resolve merge conflicts and merge upstream develop

* Resolve merge conflicts and merge upstream develop

* Resolve merge conflicts and merge upstream develop

* Resolve merge conflicts and merge upstream develop

* Resolve merge conflicts and merge upstream develop

* Remove MLP folder from Git tracking

* 修复 MLP_LI 文件中的尾随空格

* Save local changes to mkdocs.yml

* Update MLP_LI documentation and results images

* 整理代码并提交到 dev_model 分支

* Resolve merge conflicts and merge upstream develop

* Resolve merge conflicts and merge upstream develop

* 整理代码,提交新增和修改的文件

* Resolve merge conflicts and merge upstream develop

* Resolve merge conflicts and merge upstream develop

* Resolve merge conflicts and merge upstream develop

* Resolve merge conflicts and merge upstream develop

* Resolve merge conflicts and merge upstream develop

* Resolve merge conflicts and merge upstream develop

---------

Co-authored-by: HydrogenSulfate <[email protected]>
Co-authored-by: megemini <[email protected]>
Co-authored-by: ooo oo <[email protected]>
Co-authored-by: Tianchi <[email protected]>
Co-authored-by: WG <[email protected]>
Co-authored-by: wangguan <[email protected]>
Co-authored-by: xusuyong <[email protected]>
Co-authored-by: zzm <[email protected]>
Co-authored-by: lijialin03 <[email protected]>
Co-authored-by: Turingg <[email protected]>
Co-authored-by: Turingg <[email protected]>
Co-authored-by: Tao Luo <[email protected]>
Co-authored-by: 张春乔 <[email protected]>
Co-authored-by: AyaseNana <[email protected]>
Co-authored-by: Wang Xin <[email protected]>
Co-authored-by: GGBond8488 <[email protected]>
Co-authored-by: liaoxin2 <[email protected]>
Co-authored-by: smallpoxscattered <[email protected]>
Co-authored-by: hyDONG <[email protected]>
Co-authored-by: krp <[email protected]>
Co-authored-by: Wu Fei <[email protected]>
Co-authored-by: MayYouBeProsperous <[email protected]>
Co-authored-by: WoWYoYLoL <[email protected]>
Co-authored-by: gmm <[email protected]>
Co-authored-by: Xiaoxu Chen <[email protected]>
Co-authored-by: yangchanghui <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: KennyNH <[email protected]>
Co-authored-by: KaiCHEN-HT <[email protected]>
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