【Hackathon 6th No.39】XPINN 迁移至 PaddleScience#849
【Hackathon 6th No.39】XPINN 迁移至 PaddleScience#849HydrogenSulfate merged 20 commits intoPaddlePaddle:developfrom
Conversation
|
Thanks for your contribution! |
examples/xpinn/xpinn.py
Outdated
|
|
||
| import ppsci | ||
|
|
||
| # For the use of the second derivative: paddle.cos, paddle.exp |
There was a problem hiding this comment.
可以删除注释里的paddle.exp,默认模式已经支持无限阶微分
examples/xpinn/xpinn.py
Outdated
| def xpinn_2d( | ||
| x1: paddle.Tensor, | ||
| y1: paddle.Tensor, | ||
| u1: paddle.Tensor, | ||
| x2: paddle.Tensor, | ||
| y2: paddle.Tensor, | ||
| u2: paddle.Tensor, | ||
| x3: paddle.Tensor, | ||
| y3: paddle.Tensor, | ||
| u3: paddle.Tensor, | ||
| xi1: paddle.Tensor, | ||
| yi1: paddle.Tensor, | ||
| u1i1: paddle.Tensor, | ||
| u2i1: paddle.Tensor, | ||
| xi2: paddle.Tensor, | ||
| yi2: paddle.Tensor, | ||
| u1i2: paddle.Tensor, | ||
| u3i2: paddle.Tensor, | ||
| ub: paddle.Tensor, | ||
| ub_pred: paddle.Tensor, | ||
| ): | ||
| u1_x = get_grad(u1, x1) | ||
| u1_y = get_grad(u1, y1) | ||
| u1_xx = get_grad(u1_x, x1) | ||
| u1_yy = get_grad(u1_y, y1) | ||
|
|
||
| u2_x = get_grad(u2, x2) | ||
| u2_y = get_grad(u2, y2) | ||
| u2_xx = get_grad(u2_x, x2) | ||
| u2_yy = get_grad(u2_y, y2) | ||
|
|
||
| u3_x = get_grad(u3, x3) | ||
| u3_y = get_grad(u3, y3) | ||
| u3_xx = get_grad(u3_x, x3) | ||
| u3_yy = get_grad(u3_y, y3) | ||
|
|
||
| u1i1_x = get_grad(u1i1, xi1) | ||
| u1i1_y = get_grad(u1i1, yi1) | ||
| u1i1_xx = get_grad(u1i1_x, xi1) | ||
| u1i1_yy = get_grad(u1i1_y, yi1) | ||
|
|
||
| u2i1_x = get_grad(u2i1, xi1) | ||
| u2i1_y = get_grad(u2i1, yi1) | ||
| u2i1_xx = get_grad(u2i1_x, xi1) | ||
| u2i1_yy = get_grad(u2i1_y, yi1) | ||
|
|
||
| u1i2_x = get_grad(u1i2, xi2) | ||
| u1i2_y = get_grad(u1i2, yi2) | ||
| u1i2_xx = get_grad(u1i2_x, xi2) | ||
| u1i2_yy = get_grad(u1i2_y, yi2) | ||
|
|
||
| u3i2_x = get_grad(u3i2, xi2) | ||
| u3i2_y = get_grad(u3i2, yi2) | ||
| u3i2_xx = get_grad(u3i2_x, xi2) | ||
| u3i2_yy = get_grad(u3i2_y, yi2) | ||
|
|
||
| uavgi1 = (u1i1 + u2i1) / 2 | ||
| uavgi2 = (u1i2 + u3i2) / 2 | ||
|
|
||
| # Residuals | ||
| f1 = u1_xx + u1_yy - (paddle.exp(x1) + paddle.exp(y1)) | ||
| f2 = u2_xx + u2_yy - (paddle.exp(x2) + paddle.exp(y2)) | ||
| f3 = u3_xx + u3_yy - (paddle.exp(x3) + paddle.exp(y3)) | ||
|
|
||
| # Residual continuity conditions on the interfaces | ||
| fi1 = (u1i1_xx + u1i1_yy - (paddle.exp(xi1) + paddle.exp(yi1))) - ( | ||
| u2i1_xx + u2i1_yy - (paddle.exp(xi1) + paddle.exp(yi1)) | ||
| ) | ||
| fi2 = (u1i2_xx + u1i2_yy - (paddle.exp(xi2) + paddle.exp(yi2))) - ( | ||
| u3i2_xx + u3i2_yy - (paddle.exp(xi2) + paddle.exp(yi2)) | ||
| ) | ||
|
|
||
| loss1 = ( | ||
| 20 * paddle.mean(paddle.square(ub - ub_pred)) | ||
| + paddle.mean(paddle.square(f1)) | ||
| + 1 * paddle.mean(paddle.square(fi1)) | ||
| + 1 * paddle.mean(paddle.square(fi2)) | ||
| + 20 * paddle.mean(paddle.square(u1i1 - uavgi1)) | ||
| + 20 * paddle.mean(paddle.square(u1i2 - uavgi2)) | ||
| ) | ||
|
|
||
| loss2 = ( | ||
| paddle.mean(paddle.square(f2)) | ||
| + 1 * paddle.mean(paddle.square(fi1)) | ||
| + 20 * paddle.mean(paddle.square(u2i1 - uavgi1)) | ||
| ) | ||
|
|
||
| loss3 = ( | ||
| paddle.mean(paddle.square(f3)) | ||
| + 1 * paddle.mean(paddle.square(fi2)) | ||
| + 20 * paddle.mean(paddle.square(u3i2 - uavgi2)) | ||
| ) | ||
| return loss1, loss2, loss3 |
There was a problem hiding this comment.
- 函数内重复代码过多,建议化简下
- 这样的XPINN写法感觉不太具备可扩展性,换一个案例这个函数就不能用了
There was a problem hiding this comment.
重新实现了XPINN的loss函数
| def loss_fun( | ||
| output_dict: Dict[str, paddle.Tensor], | ||
| label_dict: Dict[str, paddle.Tensor], | ||
| *args, | ||
| ): | ||
| loss1, loss2, loss3 = xpinn_2d( | ||
| output_dict["x_f1"], | ||
| output_dict["y_f1"], | ||
| output_dict["u1"], | ||
| output_dict["x_f2"], | ||
| output_dict["y_f2"], | ||
| output_dict["u2"], | ||
| output_dict["x_f3"], | ||
| output_dict["y_f3"], | ||
| output_dict["u3"], | ||
| output_dict["xi1"], | ||
| output_dict["yi1"], | ||
| output_dict["u1i1"], | ||
| output_dict["u2i1"], | ||
| output_dict["xi2"], | ||
| output_dict["yi2"], | ||
| output_dict["u1i2"], | ||
| output_dict["u3i2"], | ||
| label_dict["ub"], | ||
| output_dict["ub_pred"], | ||
| ) | ||
|
|
||
| return loss1 + loss2 + loss3 |
examples/xpinn/xpinn.py
Outdated
| ) | ||
|
|
||
| error_u_total = paddle.linalg.norm( | ||
| paddle.squeeze(u_exact) - u_pred.flatten(), 2 |
There was a problem hiding this comment.
squeeze改为flatten,两边语义一致
examples/xpinn/xpinn.py
Outdated
| "input_keys": ( | ||
| "x_f1", | ||
| "y_f1", | ||
| "x_f2", | ||
| "y_f2", | ||
| "x_f3", | ||
| "y_f3", | ||
| "xi1", | ||
| "yi1", | ||
| "xi2", | ||
| "yi2", | ||
| "xb", | ||
| "yb", | ||
| ), |
There was a problem hiding this comment.
分解后的input_keys可以由基本的input_keys+XPINN生成,不建议使用hard code
There was a problem hiding this comment.
input_keys 放在了配置文件中
examples/xpinn/xpinn.py
Outdated
| "xb", | ||
| "yb", | ||
| ), | ||
| "label_keys": ("ub", "u_exact", "u_exact2", "u_exact3"), |
There was a problem hiding this comment.
u_exact==>u_exact1?
There was a problem hiding this comment.
数据集中的名字是 u_exact
examples/xpinn/xpinn.py
Outdated
| x1=input_["x_f1"], | ||
| y1=input_["y_f1"], | ||
| x2=input_["x_f2"], | ||
| y2=input_["y_f2"], | ||
| x3=input_["x_f3"], | ||
| y3=input_["y_f3"], | ||
| xi1=input_["xi1"], | ||
| yi1=input_["yi1"], | ||
| xi2=input_["xi2"], | ||
| yi2=input_["yi2"], | ||
| xb=input_["xb"], | ||
| yb=input_["yb"], |
There was a problem hiding this comment.
不建议使用x_f1、xb、yi1这类命名方式,看不太出来每个字段的含义
There was a problem hiding this comment.
好的,修改了命名
examples/xpinn/xpinn.py
Outdated
| "input_keys": ( | ||
| "x_f1", | ||
| "y_f1", | ||
| "x_f2", | ||
| "y_f2", | ||
| "x_f3", | ||
| "y_f3", | ||
| "xi1", | ||
| "yi1", | ||
| "xi2", | ||
| "yi2", | ||
| "xb", | ||
| "yb", | ||
| ), |
There was a problem hiding this comment.
不建议使用x_f1、xb、yi1这类命名方式,看不太出来每个字段的含义
There was a problem hiding this comment.
好的,修改了命名
examples/xpinn/xpinn.py
Outdated
| ): | ||
| for key in in_: | ||
| in_[key] = paddle.cast(in_[key], paddle.float64) | ||
| return in_, _label, _weight |
ppsci/utils/reader.py
Outdated
| if not np.issubdtype(data_dict[key].dtype, np.integer): | ||
| if ( | ||
| not np.issubdtype(data_dict[key].dtype, np.integer) | ||
| and data_dict[key].dtype != np.float64 |
There was a problem hiding this comment.
这里这么改会导致float64类型的数据不能被转换为float32,模型训练时数据与权重参数类型不匹配而报错。
There was a problem hiding this comment.
之前误以为有些算子只支持float64,已经修改。文档还在编写中。
examples/xpinn/xpinn.py
Outdated
| def get_grad(outputs: paddle.Tensor, inputs: paddle.Tensor) -> paddle.Tensor: | ||
| grad = paddle.grad(outputs, inputs, retain_graph=True, create_graph=True) | ||
| return grad[0] | ||
|
|
There was a problem hiding this comment.
这个函数看起来只被单独调用,建议放到get_second_derivatives上方,并且函数名前加上单个下划线
examples/xpinn/xpinn.py
Outdated
| residual_func (Callable, optional): residual calculation function. Defaults to lambda x,y : x - y. | ||
| """ | ||
|
|
||
| def get_second_derivatives( |
examples/xpinn/xpinn.py
Outdated
| return grad[0] | ||
|
|
||
|
|
||
| def xpinn_loss( |
| ] | ||
| ) | ||
|
|
||
| # the shape of label_dict["residual_u_exact"] is [22387, 1], and be cut into [18211, 1] `_eval_by_dataset`(ppsci/solver/eval.py). |
There was a problem hiding this comment.
这个注释是什么意思呢?是输入的样本点数不等于输出的样本点数,导致在_eval_by_dataset被丢掉?
There was a problem hiding this comment.
是的,输入的样本点数小于标签点数,数据集提供的label_dict["residual_u_exact"] 本来包含了label_dict["residual2_u_exact"] 和 label_dict["residual3_u_exact"]。
examples/xpinn/xpinn.py
Outdated
| error_u_total = paddle.linalg.norm( | ||
| u_exact.flatten() - u_pred.flatten(), 2 | ||
| ) / paddle.linalg.norm(u_exact.flatten(), 2) | ||
| return {"total": error_u_total} |
* 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 <490868991@qq.com>
) * 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 <39621324+wangguan1995@users.noreply.github.com> Co-authored-by: wangguan <772359200@qq.com> * [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 <490868991@qq.com> * [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 <39621324+wangguan1995@users.noreply.github.com> Co-authored-by: wangguan <772359200@qq.com> * 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 <490868991@qq.com> * update config --------- Co-authored-by: HydrogenSulfate <490868991@qq.com> * 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 <490868991@qq.com> * 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 <2934631798@qq.com> * 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 <2934631798@qq.com> Co-authored-by: HydrogenSulfate <490868991@qq.com> * [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 <2934631798@qq.com> Co-authored-by: HydrogenSulfate <490868991@qq.com> * 【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 <490868991@qq.com> * 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 <95690929+zhiminzhang0830@users.noreply.github.com> * 【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 <2934631798@qq.com> Co-authored-by: HydrogenSulfate <490868991@qq.com> * 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 <490868991@qq.com> * 【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 <95690929+zhiminzhang0830@users.noreply.github.com> * 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 <490868991@qq.com> * 【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 <490868991@qq.com> * 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 <95690929+zhiminzhang0830@users.noreply.github.com> * 【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 <490868991@qq.com> * 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 <95690929+zhiminzhang0830@users.noreply.github.com> * Update examples/phycrnet/functions.py Co-authored-by: zzm <95690929+zhiminzhang0830@users.noreply.github.com> --------- Co-authored-by: zzm <95690929+zhiminzhang0830@users.noreply.github.com> * [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 <490868991@qq.com> * 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 <490868991@qq.com> * Update examples/nowcastnet/nowcastnet.py Co-authored-by: HydrogenSulfate <490868991@qq.com> * nowcastnet * nowcastnet --------- Co-authored-by: HydrogenSulfate <490868991@qq.com> * 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 <490868991@qq.com> * 【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 <490868991@qq.com> * [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 <2934631798@qq.com> Co-authored-by: HydrogenSulfate <490868991@qq.com> * [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 <490868991@qq.com> * 【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 <490868991@qq.com> * Update ppsci/data/dataset/ext_moe_enso_dataset.py Co-authored-by: HydrogenSulfate <490868991@qq.com> * 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 <490868991@qq.com> * Update docs/zh/examples/extformer_moe.md Co-authored-by: HydrogenSulfate <490868991@qq.com> * Update ppsci/data/dataset/ext_moe_enso_dataset.py --------- Co-authored-by: HydrogenSulfate <490868991@qq.com> * [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 <490868991@qq.com> Co-authored-by: megemini <megemini@outlook.com> Co-authored-by: ooo oo <106524776+ooooo-create@users.noreply.github.com> Co-authored-by: Tianchi <62602289+DUCH714@users.noreply.github.com> Co-authored-by: WG <39621324+wangguan1995@users.noreply.github.com> Co-authored-by: wangguan <772359200@qq.com> Co-authored-by: xusuyong <107761330+xusuyong@users.noreply.github.com> Co-authored-by: zzm <95690929+zhiminzhang0830@users.noreply.github.com> Co-authored-by: lijialin03 <124568209+lijialin03@users.noreply.github.com> Co-authored-by: Turingg <732153168@qq.com> Co-authored-by: Turingg <117662096+Turingg@users.noreply.github.com> Co-authored-by: Tao Luo <luotao02@baidu.com> Co-authored-by: 张春乔 <83450930+Liyulingyue@users.noreply.github.com> Co-authored-by: AyaseNana <49900969+NKNaN@users.noreply.github.com> Co-authored-by: Wang Xin <xinwang614@gmail.com> Co-authored-by: GGBond8488 <33050871+GGBond8488@users.noreply.github.com> Co-authored-by: liaoxin2 <136409501+liaoxin2@users.noreply.github.com> Co-authored-by: smallpoxscattered <116335664+smallpoxscattered@users.noreply.github.com> Co-authored-by: hyDONG <116695878+1want2sleep@users.noreply.github.com> Co-authored-by: krp <2934631798@qq.com> Co-authored-by: Wu Fei <72655761+wufei2@users.noreply.github.com> Co-authored-by: MayYouBeProsperous <ljmhz@outlook.com> Co-authored-by: WoWYoYLoL <76137105+WoWYoYLoL@users.noreply.github.com> Co-authored-by: gmm <38800877+mmglove@users.noreply.github.com> Co-authored-by: Xiaoxu Chen <chenxx_id@163.com> Co-authored-by: yangchanghui <71805205+Yang-Changhui@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: KennyNH <63087259+KennyNH@users.noreply.github.com> Co-authored-by: KaiCHEN-HT <96469292+KaiCHEN-HT@users.noreply.github.com>
PR types
Others
PR changes
Others
Describe
原案例精度:0.04685
复现精度:0.04177