Skip to content
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

[Example] Add battery-electrochemical-performance prediction model #967

Open
wants to merge 1,376 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
1376 commits
Select commit Hold shift + click to select a range
3c4cf8d
Surrogate fix (#740)
wangguan1995 Jan 8, 2024
2a76d98
[Fea] Support derivative nodes fusing for any order (#745)
HydrogenSulfate Jan 10, 2024
eda6b78
fix heat_exchanger equation (#746)
HydrogenSulfate Jan 10, 2024
8063a77
Poiseuille Flow Fix (#743)
wangguan1995 Jan 11, 2024
4c8a961
[Fix] Fix fuse derivative corner case and add UT (#748)
HydrogenSulfate Jan 11, 2024
21d7ffc
fix scm tools (#749)
HydrogenSulfate Jan 11, 2024
6e742a7
update phygeonet doc (#747)
zhiminzhang0830 Jan 12, 2024
61ba5c2
[Doc] Refine documents and fix typo (#750)
HydrogenSulfate Jan 12, 2024
f76b48a
[Doc] update quick_start (#751)
HydrogenSulfate Jan 15, 2024
19d6858
fix bug
plusNew001 Jan 15, 2024
8a1a349
【PPSCI Doc No.12、13、14、15、16、17】ppsci.arch.Arch (#752)
megemini Jan 16, 2024
2762835
update docstrings and note (#754)
HydrogenSulfate Jan 17, 2024
0fa9a14
add Solver.finetune() (#755)
HydrogenSulfate Jan 17, 2024
6cf2951
【PPSCI Doc No.20】ppsci.arch.DeepPhyLSTM (#756)
megemini Jan 17, 2024
6d7c2ef
clear differentiation cache in visu_forward to avoid OOM problem (#757)
HydrogenSulfate Jan 18, 2024
b45fe5f
update docstring (#758)
ooooo-create Jan 19, 2024
152956f
【PPSCI Doc No.104-105】 (#759)
ooooo-create Jan 19, 2024
eabdc43
【Hackathon 5th No.63】 PhyCRNet: Physics-informed Convolutional-Recurr…
DUCH714 Jan 19, 2024
b5d7636
[Doc] Add more contrib and more installtion method (#760)
HydrogenSulfate Jan 19, 2024
473b373
[Doc] Add tutorial and fix docs (#766)
HydrogenSulfate Jan 22, 2024
5336d15
[Fix] Update copyright and docstrings (#761)
HydrogenSulfate Jan 22, 2024
d3fa030
doc106 (#762)
ooooo-create Jan 22, 2024
ba9fcaf
set encoding to utf-8 when reading content from README.md during pip …
HydrogenSulfate Jan 22, 2024
b3ae407
doc108-109 (#764)
ooooo-create Jan 22, 2024
77a6f6b
remove python3.7 in docker (#765)
ooooo-create Jan 23, 2024
627e4b6
【PPSCI Doc No.107】update doc for `ppsci.visualize.save_vtu_to_mesh` (…
ooooo-create Jan 23, 2024
f5fa76c
[Example] Add RegAE example (#660)
xusuyong Jan 23, 2024
8efb7ca
[Enh] add validation for hydra config (#769)
HydrogenSulfate Jan 23, 2024
d3aba2c
【Hackathon 5th No.54】NSFnets (Navier-Stokes Flow nets): Physics-infor…
DUCH714 Jan 25, 2024
f106ca8
specify pydantic >= 2.5.x or field_validator can not be imported from…
HydrogenSulfate Jan 26, 2024
98d3e72
add YingLong model (#771)
zhiminzhang0830 Jan 27, 2024
5e56111
[Doc] Add description of yaml (#774)
HydrogenSulfate Jan 31, 2024
04d2d89
Yinglong infer (#772)
zhiminzhang0830 Jan 31, 2024
183c888
update readme (#775)
zhiminzhang0830 Feb 1, 2024
7cabf19
set create_graph=False before eval (#776)
HydrogenSulfate Feb 2, 2024
8d756ce
[Fea] Support python inference (#773)
HydrogenSulfate Feb 4, 2024
583f2fb
[Fix] restore 'by_epoch' for SchedulerList and fix EPNN (#777)
HydrogenSulfate Feb 4, 2024
6823a3e
[Fix]fix data transform error (#779)
lijialin03 Feb 6, 2024
7fe6d3c
API 文档补全LorenzEmbedding,RosslerEmbedding
Turingg Feb 7, 2024
08ec87a
Update embedding_koopman.py
Turingg Feb 7, 2024
c713103
Update embedding_koopman.py
Turingg Feb 7, 2024
eed03c0
Merge branch 'develop' into new
Turingg Feb 7, 2024
1ff40c2
Revert "[Fix]fix data transform error (#779)" (#781)
lijialin03 Feb 20, 2024
73d725f
【PPSCI Doc No.21、22】ppsci.arch.LorenzEmbedding、ppsci.arch.LRosslerEmb…
luotao1 Feb 20, 2024
ce4b352
[Update]update setting of 'auto_collation' and fix errors (#783)
lijialin03 Feb 20, 2024
7c7e4fc
update document (#782)
HydrogenSulfate Feb 20, 2024
16c86c6
update Graphcast to document (#784)
HydrogenSulfate Feb 22, 2024
145445a
fix url of GraphCast in index.md (#785)
HydrogenSulfate Feb 22, 2024
e13c8f1
[Refine] Refine yinglong code (#786)
HydrogenSulfate Feb 23, 2024
3baffd2
add requirements for yinglong (#787)
HydrogenSulfate Feb 26, 2024
45b1474
[Docker] Update dockerfile & refine aneurysm (#789)
HydrogenSulfate Feb 27, 2024
bb1d3d1
revert random permutation from numpy to paddle (#792)
HydrogenSulfate Mar 1, 2024
e46008a
【PPSCI Doc No.9】 ppsci.data.dataset.VtuDataset (#791)
Liyulingyue Mar 1, 2024
c489261
[Fea] Support onnx and TensorRT inference (#794)
HydrogenSulfate Mar 4, 2024
10abaa6
【PPSCI Export&Infer No. 29】 add export and inference (#793)
NKNaN Mar 4, 2024
7736f44
【PPSCI Export&Infer No.3】euler_beam (#796)
GreatV Mar 4, 2024
aa5eaa1
Move 2 tensor initialization to lazy call to prevent using GPU memory…
HydrogenSulfate Mar 4, 2024
1b96d9b
【PPSCI Export&Infer No.4】laplace2d (#797)
GreatV Mar 5, 2024
ff7d715
[Doc] Fix pipe document & refine inference guide (#798)
HydrogenSulfate Mar 6, 2024
4dd897a
[Fea] Add ModifiedMLP (#799)
HydrogenSulfate Mar 6, 2024
03cab2f
【PPSCI Export&Infer No.5】lorenz (#801)
GreatV Mar 11, 2024
77eeadb
【PPSCI Export&Infer No.6】rossler (#803)
GreatV Mar 13, 2024
effc838
API 文档补全Generator (#804)
Turingg Mar 13, 2024
a52ce7c
fix lorenz/rossler export and infer (#805)
zhiminzhang0830 Mar 13, 2024
47356b3
refine code (#806)
HydrogenSulfate Mar 15, 2024
88b63d3
【PPSCI Export&Infer No.7】 volterra_ide (#807)
GreatV Mar 15, 2024
8028ad6
Allow initialize dataloader without specifying 'sampler' (#809)
HydrogenSulfate Mar 18, 2024
6b2cc63
[Add]MRMSDataset (#810)
lijialin03 Mar 21, 2024
c752895
[Fea] Support tensorboardX and add corresponding guidance (#812)
HydrogenSulfate Mar 21, 2024
fc8f131
Fix sot sci error (#815)
GGBond8488 Mar 21, 2024
18ea97a
chip heat simulation (#808)
liaoxin2 Mar 21, 2024
434dfc4
modified: docs/zh/examples/chip_heat.md (#820)
liaoxin2 Mar 25, 2024
b280169
【PPSCI Doc No.58、59、60】Mesh.from_pymesh、translate、scale (#818)
smallpoxscattered Mar 25, 2024
f64029d
[Doc] Fix url in chip_heat document (#822)
liaoxin2 Mar 26, 2024
cd5345b
[Fix] Fix doctest (#821)
HydrogenSulfate Mar 26, 2024
6e82a63
[Fix]dtype of RadarDataset's data (#823)
lijialin03 Mar 28, 2024
2c2bc8d
【PPSCI Doc No.38-40】 (#826)
1want2sleep Mar 29, 2024
10015f7
remove seed and directory code to slim laplace2d exmaples (#824)
HydrogenSulfate Mar 29, 2024
b4579ad
[Fea] Support nvtx profiling (#825)
HydrogenSulfate Mar 29, 2024
cda91fd
Dgmr (#813)
liaoxin2 Mar 29, 2024
483a3fa
check if is directory befoe mkdirs (#827)
HydrogenSulfate Apr 1, 2024
e372903
[Fix] Replace os.path.isdir with len (#830)
HydrogenSulfate Apr 2, 2024
754cbaa
add quasi-random sampling method: Halton (#828)
HydrogenSulfate Apr 2, 2024
9ccf46c
Update solver.py (#831)
zhiminzhang0830 Apr 3, 2024
54f8b8d
【PPSCI Doc No.66-74】 (#829)
1want2sleep Apr 4, 2024
17eff79
[Enh] Refactor sum aggregator (#834)
HydrogenSulfate Apr 7, 2024
9b62a10
【PPSCI Doc No.41-57】 (#833)
wufei2 Apr 7, 2024
f0eaa6a
add skip_prune_program arg for Solver.export (#835)
HydrogenSulfate Apr 7, 2024
d7e4991
【PPSCI Export&Infer No.23】viv (#832)
smallpoxscattered Apr 7, 2024
7827f42
[Doc] Add more contributors and refine several docstrings (#836)
HydrogenSulfate Apr 7, 2024
8d4369a
【PPSCI Doc No.61-65】 (#839)
wufei2 Apr 9, 2024
2af9ae8
[Doc] Fix description for mkldnn (#837)
HydrogenSulfate Apr 9, 2024
050c30d
Update XPINN_2D_PoissonsEqn.py (#842)
MayYouBeProsperous Apr 10, 2024
fff722e
support enabling prim via ++prim=1 (#843)
HydrogenSulfate Apr 10, 2024
89aeb4d
【PPSCI Doc No.23、25-29、31-34、97】 (#840)
1want2sleep Apr 12, 2024
a81d083
【PPSCI Doc No.35-37】 (#846)
WoWYoYLoL Apr 12, 2024
5862588
Bubble net (#847)
liaoxin2 Apr 12, 2024
9261c69
[Example] Add allen cahn example (#845)
HydrogenSulfate Apr 13, 2024
f048a4f
【benchmark】fix benchmark model name (#850)
mmglove Apr 15, 2024
fcfc38e
[Example] Add allen_cahn causal train with fourier feature and random…
HydrogenSulfate Apr 17, 2024
6503adb
add ema document file(test=document_fix) (#853)
HydrogenSulfate Apr 17, 2024
8ad8d0c
[New example] Add nls-mb example (#838)
xusuyong Apr 18, 2024
53d9a20
replace deprecated 'FieldValidationInfo' with 'ValidationInfo' (#855)
HydrogenSulfate Apr 18, 2024
05bb35c
check return type of FunctionalLoss (#854)
HydrogenSulfate Apr 18, 2024
cb21ea4
[Docker] Add docker image (#856)
HydrogenSulfate Apr 19, 2024
0a1c4a0
update code
HydrogenSulfate Apr 21, 2024
77e738e
update code
HydrogenSulfate Apr 21, 2024
277e41e
【PPSCI Export&Infer No.24】 biharmonic2d (#858)
smallpoxscattered Apr 22, 2024
95e979e
[Fix] Fix NLS-MB document and code (#859)
HydrogenSulfate Apr 22, 2024
268aae9
Update YingLong1 README.md (#861)
zhiminzhang0830 Apr 22, 2024
344d60f
add '_' to initializer.glorot_normal
HydrogenSulfate Apr 22, 2024
46e204a
Merge branch 'fix_allen_cahn' of https://github.com/HydrogenSulfate/P…
HydrogenSulfate Apr 22, 2024
fa00f6d
add allen_cahn_default.yaml
HydrogenSulfate Apr 22, 2024
0b432a8
[Doc] Add anno for eval (#863)
HydrogenSulfate Apr 22, 2024
b94c9b1
rename yinglong to yinglong1 (#862)
zhiminzhang0830 Apr 22, 2024
30da823
Merge branch 'develop' into fix_allen_cahn
HydrogenSulfate Apr 23, 2024
c5118d9
add allen-cahn document
HydrogenSulfate Apr 23, 2024
8ddc2f4
update pymesh install package
HydrogenSulfate Apr 23, 2024
0205128
【PPSCI Export&Infer No.22】VP_NSFNet4 (#864)
smallpoxscattered Apr 24, 2024
1c93d88
update pymesh install package (#865)
HydrogenSulfate Apr 24, 2024
eba289d
Merge branch 'develop' into fix_allen_cahn
HydrogenSulfate Apr 24, 2024
53a3a2a
[Refine] Refine evaluation output (#866)
HydrogenSulfate Apr 25, 2024
b96fc7b
Merge pull request #860 from HydrogenSulfate/fix_allen_cahn
cxxly Apr 26, 2024
a331946
[Enh] Add numpy solver in config solvers (#869)
HydrogenSulfate Apr 26, 2024
97ca920
[API] Add chamfer loss (#871)
HydrogenSulfate Apr 28, 2024
5cd0162
add-earthformer (#870)
Yang-Changhui Apr 28, 2024
7f66831
del arch.md in data (#872)
zhiminzhang0830 Apr 28, 2024
0cf728f
[Add]Add competition&IJCAI_2024 submodule (#873)
lijialin03 May 2, 2024
6d2e17c
add IJCAI 2024 CAR competition to inedx.md and fix docstrings in cubo…
HydrogenSulfate May 2, 2024
f19a5c6
[Update]update competition description (#876)
lijialin03 May 2, 2024
3f3d2f9
Fix typo (#881)
xusuyong May 6, 2024
c61a5f6
[Fix] Fix inference path typo (#880)
HydrogenSulfate May 6, 2024
fae0f16
【PPSCI Export&Infer No.15-16】 (#875)
wufei2 May 7, 2024
23dd4e5
updata_ijcai_car_submodule (#882)
wangguan1995 May 7, 2024
6d375c1
【PPSCI Export&Infer No.25】bracket (#878)
1want2sleep May 8, 2024
cfae240
add document of python_infer with depoly module (#885)
HydrogenSulfate May 9, 2024
47c433b
【PPSCI Export&Infer No.11-12】 (#883)
wufei2 May 10, 2024
f0d3ae9
【PPSCI Export&Infer No.21】tempoGAN (#884)
smallpoxscattered May 11, 2024
e0b7d15
[Doc&Refine] Add IJCAI competetion in README (#886)
HydrogenSulfate May 11, 2024
fe175c4
[Hackathon 6th Code Camp No.15] support earthformer docs (#877)
Yang-Changhui May 11, 2024
8f1f27d
Update mkdocs.yml (#888)
zhiminzhang0830 May 11, 2024
60a6369
【PPSCI Export&Infer No.20】shock_wave (#890)
smallpoxscattered May 12, 2024
7c04bf8
【PPSCI Export&Infer No.9】Bubble (#887)
wufei2 May 12, 2024
369b726
modify earthformer-doc (#891)
Yang-Changhui May 13, 2024
61be241
【PPSCI Export&Infer No.30】heat_exchanger (#892)
wufei2 May 13, 2024
6a96beb
add export&infer 26-27 (#893)
smallpoxscattered May 13, 2024
f1a0336
[Fea] Support detach_keys argument for all PDE (#889)
HydrogenSulfate May 13, 2024
c29678e
[Fix] Fix phycrnet bug (#894)
HydrogenSulfate May 13, 2024
98bfb30
[Doc] Update links of cooperation projects (#898)
HydrogenSulfate May 14, 2024
6b81879
[Ehn] Enhance config module (#899)
HydrogenSulfate May 15, 2024
4d44ed5
【PPSCI Export&Infer No.13】 darcy2d (#900)
wufei2 May 15, 2024
25725c6
Add export & inference for hPINNs (#902)
WoWYoYLoL May 16, 2024
f874bf2
【PPSCI Export&Infer No.2】Add export & inference for DeepONet (#901)
HydrogenSulfate May 16, 2024
d6047cf
[Upadte]update plotting of hpinn's inference (#903)
lijialin03 May 16, 2024
3d70cbe
[Fix] Fix fractional poisson 2d (#904)
HydrogenSulfate May 17, 2024
a1830a1
[Doc&Fix] Update config doc and correct API (#905)
HydrogenSulfate May 20, 2024
c57a97a
【PPSCI Export&Infer No.35】nowcastnet (#895)
smallpoxscattered May 21, 2024
fceb3f2
Fix cylinder2d_unsteady_transformer_physx (#906)
HydrogenSulfate May 21, 2024
bfee4f5
[Fea] Add PirateNet and update allen_cahn document (#907)
HydrogenSulfate May 23, 2024
f5dac19
[Fix] Fix output_dir for visualDL and tensorboardX (#908)
HydrogenSulfate May 23, 2024
62608a8
update docs(test=document_fix) (#909)
HydrogenSulfate May 24, 2024
c46a933
[Hackathon 6th Code Camp No.15] support neuraloperator (#867)
Yang-Changhui May 27, 2024
33b6597
[Fix] Fix document requirement and update yaml (#910)
HydrogenSulfate May 27, 2024
e5cdf29
[Fix] Correct desciprtion of epsilon of AllenCahn equation (#911)
HydrogenSulfate May 29, 2024
452ba2f
Add allen cahn sota (#879)
xusuyong May 30, 2024
ce050a3
【Hackathon 6th No.39】XPINN 迁移至 PaddleScience (#849)
MayYouBeProsperous May 30, 2024
99d5170
[Doc] Add evaluation for xpinn and add to homepage (#912)
HydrogenSulfate May 30, 2024
3fb6449
fix export and infer (#916)
zhiminzhang0830 May 30, 2024
30a2736
update example code for PINNPredictor (#918)
HydrogenSulfate Jun 3, 2024
1cd67d3
auto build and upload develop pip whl to pypi when commiting (#920)
HydrogenSulfate Jun 6, 2024
a880f4b
fix for 3.10 (#921)
HydrogenSulfate Jun 6, 2024
9b91ca7
[Refine] Refine loss and metric module (#919)
HydrogenSulfate Jun 6, 2024
085b458
[Doc] Refine user guide (#922)
HydrogenSulfate Jun 11, 2024
ec28348
[Example] Add ldc 2d Re1000 and Re3200 example (#924)
HydrogenSulfate Jun 12, 2024
1e61422
[Doc] Update ldc2d doc and README (#925)
HydrogenSulfate Jun 12, 2024
0d4e2ea
【PPSCI Export&Infer No.31】heat_pinn (#926)
1want2sleep Jun 14, 2024
9e9d147
[Doc] Refine doc (#927)
HydrogenSulfate Jun 17, 2024
3113eb5
add nightly build pip .whl url (#928)
HydrogenSulfate Jun 18, 2024
4171173
Support gh pages (#929)
HydrogenSulfate Jun 19, 2024
ee53eeb
remove pycamotk for submodules (#930)
HydrogenSulfate Jun 19, 2024
1162cc6
add workflows for github pages
HydrogenSulfate Jun 19, 2024
c8c83b4
Merge branch 'develop' of https://github.com/HydrogenSulfate/PaddleSc…
HydrogenSulfate Jun 19, 2024
fba7481
update mkdocs.yml
HydrogenSulfate Jun 19, 2024
76e16ce
update ai4s_universal_platform branch for gh-page
HydrogenSulfate Jun 19, 2024
aea71b4
only set default to latest when current branch is develop
HydrogenSulfate Jun 19, 2024
e96e93d
fix ci.yml
HydrogenSulfate Jun 19, 2024
2edfaa5
fix alias
HydrogenSulfate Jun 19, 2024
41ee16e
use develop instead of latest
github-actions[bot] Jun 19, 2024
25ff28a
remove ci.yml in develop branch
github-actions[bot] Jun 19, 2024
6dd6a98
[Fix] Fix eval (#931)
HydrogenSulfate Jun 21, 2024
a2240ac
[Hackathon 6th Code Camp No.15] support neuraloperator docs (#917)
Yang-Changhui Jun 24, 2024
985ed10
add montecarlo integrate api (#932)
cxxly Jun 25, 2024
c871670
【Hackathon 6th No.37】GraphCastNet 代码迁移至 PaddleScience (#897)
MayYouBeProsperous Jun 26, 2024
1deb3bc
[Doc&Fix] Fix compatibility with isort and black and refine install_s…
HydrogenSulfate Jun 27, 2024
8997f72
[Doc] Refine doc and code (#935)
HydrogenSulfate Jun 28, 2024
7f8817d
modify yinglong (#937)
zhiminzhang0830 Jul 2, 2024
c2134a6
update adr example(pre) (#938)
HydrogenSulfate Jul 5, 2024
d62cffd
add Extformer-MoE example by HKUST(GZ) (#933)
KennyNH Jul 8, 2024
02db125
[Fix] Fix extformer-moe (#940)
HydrogenSulfate Jul 8, 2024
0d61c06
[Example] Add adv_cvit and ns_cvit (#939)
HydrogenSulfate Jul 10, 2024
9bb8dc0
[Fix] Fix batch indexing failed in phylstm2 (#941)
HydrogenSulfate Jul 10, 2024
6ba4bee
[Doc] Add requirements.txt for AMGNet (#942)
HydrogenSulfate Jul 11, 2024
af9dab1
[Fix] Fix phylstm (#943)
HydrogenSulfate Jul 11, 2024
854dc9e
[Doc] Fix document and formulations for cvit (#944)
HydrogenSulfate Jul 15, 2024
4735514
Fix eval config (#948)
HydrogenSulfate Jul 15, 2024
fc5bd69
[Feature] Add loss aggregator to saving/loading process (#949)
HydrogenSulfate Jul 16, 2024
62d0457
[Doc] Add HKUST badge and remove some codes (#950)
HydrogenSulfate Jul 16, 2024
fbad74e
Fix typo in mtl/base (#951)
HydrogenSulfate Jul 17, 2024
5f3a1a1
PIDeepONet-LBM (#947)
KaiCHEN-HT Jul 17, 2024
e3accd4
[PIR] Support pir export and infer (#952)
HydrogenSulfate Jul 18, 2024
fcbfdfa
fix solver.predict and device setting (#953)
HydrogenSulfate Jul 22, 2024
2809f99
fix input dtype in shock wave (#954)
HydrogenSulfate Jul 23, 2024
5840712
[Fix] Fix dtype (#956)
HydrogenSulfate Jul 29, 2024
8641faa
[Fix] Adapt code to dy2st mode (#957)
HydrogenSulfate Jul 31, 2024
2834c8a
[Example] Add spinn on helmholtz equation (#958)
HydrogenSulfate Aug 5, 2024
eaa3982
Fix return type in examples/tempoGAN/functions.py for tempoGAN (#963)
HydrogenSulfate Aug 8, 2024
d67a5b9
[Add]add paddle version code of IJACA 2024 (#959)
lijialin03 Aug 9, 2024
957ac7e
[Doc] Update guidance of development (#965)
HydrogenSulfate Aug 9, 2024
93117ae
[Doc] Update url (#966)
HydrogenSulfate Aug 10, 2024
1cf8019
整理代码并准备提交
huohuohuohuohuo123 Aug 10, 2024
40dc557
整理代码并准备提交
huohuohuohuohuo123 Aug 11, 2024
4c8a473
整理代码并准备提交
huohuohuohuohuo123 Aug 11, 2024
4154f32
perovskite
huohuohuohuohuo123 Aug 12, 2024
add2e32
使用 Git LFS 跟踪大文件
huohuohuohuohuo123 Aug 12, 2024
dba9c3a
Remove large files from version control
huohuohuohuohuo123 Aug 12, 2024
46cc652
Remove LFS tracking and update .gitattributes
huohuohuohuohuo123 Aug 12, 2024
95f0f1b
提交在 new_feature_branch 上的更改
huohuohuohuohuo123 Aug 12, 2024
4d6a057
Resolve merge conflicts and merge upstream develop
huohuohuohuohuo123 Aug 12, 2024
e98b3cf
Your commit message
huohuohuohuohuo123 Aug 12, 2024
a2f0da3
Merge branch 'develop' into new_feature_branch
huohuohuohuohuo123 Aug 14, 2024
22a6bb7
Merge branch 'upstream_develop' into new_feature_branch
huohuohuohuohuo123 Aug 17, 2024
7380a0f
Resolve merge conflicts and merge upstream develop
huohuohuohuohuo123 Aug 17, 2024
170ab7e
Merge branch 'new_feature_branch' of https://github.com/huohuohuohuoh…
huohuohuohuohuo123 Aug 17, 2024
9ae0d7e
Resolve merge conflicts and merge upstream develop
huohuohuohuohuo123 Aug 17, 2024
016c31c
Resolve merge conflicts and merge upstream develop
huohuohuohuohuo123 Aug 17, 2024
6aa419c
Resolve merge conflicts and merge upstream develop
huohuohuohuohuo123 Aug 17, 2024
52eecac
Resolve merge conflicts and merge upstream develop
huohuohuohuohuo123 Aug 17, 2024
7178d01
Remove MLP folder from Git tracking
huohuohuohuohuo123 Aug 17, 2024
30c9aa4
Resolve merge conflicts and merge upstream develop
huohuohuohuohuo123 Aug 26, 2024
e16c0ae
修复 MLP_LI 文件中的尾随空格
huohuohuohuohuo123 Sep 30, 2024
221f1c1
Merge branch 'upstream_develop' into new_feature_branch
huohuohuohuohuo123 Sep 30, 2024
3cb2ae1
Save local changes to mkdocs.yml
huohuohuohuohuo123 Nov 10, 2024
7dc8268
Merge branch 'upstream_develop' into new_feature_branch
huohuohuohuohuo123 Nov 10, 2024
854707d
Update MLP_LI documentation and results images
huohuohuohuohuo123 Nov 10, 2024
fb28d61
整理代码并提交到 dev_model 分支
huohuohuohuohuo123 Nov 11, 2024
d091f24
Merge branch 'upstream_develop' into new_feature_branch
huohuohuohuohuo123 Nov 11, 2024
c44cf29
Resolve merge conflicts and merge upstream develop
huohuohuohuohuo123 Nov 11, 2024
83fc2c1
Resolve merge conflicts and merge upstream develop
huohuohuohuohuo123 Nov 11, 2024
065b0f5
Merge branch 'upstream_develop' into new_feature_branch
huohuohuohuohuo123 Dec 5, 2024
c8dc22c
整理代码,提交新增和修改的文件
huohuohuohuohuo123 Dec 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .gitattributes
Copy link
Collaborator

Choose a reason for hiding this comment

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

空文件删除

Empty file.
1 change: 1 addition & 0 deletions examples/MLP
Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. MLP是模型结构的名字,不能作为案例名
  2. 该文件夹是一个无效的submodule,请提交实际代码

Submodule MLP added at 5701a3
1 change: 1 addition & 0 deletions examples/ML_Pipeline
Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. MLP_Pipeline是模型结构的名字,不能作为案例名
  2. 该文件夹是一个无效的submodule,请提交实际代码

Submodule ML_Pipeline added at 255cea
8 changes: 7 additions & 1 deletion jointContribution/graphcast/data/graphcast-jax2paddle.csv
Copy link
Collaborator

Choose a reason for hiding this comment

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

锂离子电池案例为什么需要改动这个文件呢?

Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<<<<<<< HEAD
version https://git-lfs.github.com/spec/v1
oid sha256:7469d94c41fe78478147424b8b61e44681540f3123e1b6a62d14ede3dca82b08
size 36663
=======
params:grid2mesh_gnn/~_networks_builder/encoder_edges_grid2mesh_layer_norm:offset,graphcast.encoder.embedding.grid2mesh_edge_embedding.layer_norm.bias
params:grid2mesh_gnn/~_networks_builder/encoder_edges_grid2mesh_layer_norm:scale,graphcast.encoder.embedding.grid2mesh_edge_embedding.layer_norm.weight
params:grid2mesh_gnn/~_networks_builder/encoder_edges_grid2mesh_mlp/~/linear_0:b,graphcast.encoder.embedding.grid2mesh_edge_embedding.mlp.0.bias
Expand Down Expand Up @@ -259,4 +264,5 @@ params:mesh_gnn/~_networks_builder/processor_nodes_15_mesh_nodes_layer_norm:scal
params:mesh_gnn/~_networks_builder/processor_nodes_15_mesh_nodes_mlp/~/linear_0:b,graphcast.processor.processor.15.node_layer.mlp.0.bias
params:mesh_gnn/~_networks_builder/processor_nodes_15_mesh_nodes_mlp/~/linear_0:w,graphcast.processor.processor.15.node_layer.mlp.0.weight
params:mesh_gnn/~_networks_builder/processor_nodes_15_mesh_nodes_mlp/~/linear_1:b,graphcast.processor.processor.15.node_layer.mlp.2.bias
params:mesh_gnn/~_networks_builder/processor_nodes_15_mesh_nodes_mlp/~/linear_1:w,graphcast.processor.processor.15.node_layer.mlp.2.weight
params:mesh_gnn/~_networks_builder/processor_nodes_15_mesh_nodes_mlp/~/linear_1:w,graphcast.processor.processor.15.node_layer.mlp.2.weight
>>>>>>> upstream/develop
133 changes: 133 additions & 0 deletions ppsci/arch/MLPModel.py
Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. arch下面存放的是模型结构相关代码,请不要把整个案例代码复制进来
  2. PaddleScience是一个基于paddle深度学习框架开发的,请不要将基于tf、keras框架开发的代码提交上来

Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
from ppsci.arch import base
import tensorflow as tf
from tensorflow import keras
from sklearn.decomposition import PCA
from sklearn.preprocessing import MinMaxScaler
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import functools
import csv
import math
import os

class MLPModel(base.Arch):
def __init__(self, input_shape, learning_rate, nodes1, nodes2, nodes3, dropout_rate1, dropout_rate2, dropout_rate3):
super(MLPModel, self).__init__()
self.model = keras.Sequential([
keras.layers.Input(shape=input_shape),
keras.layers.Dense(nodes1, activation="relu"),
keras.layers.Dropout(dropout_rate1),
keras.layers.Dense(nodes2, activation="relu"),
keras.layers.Dropout(dropout_rate2),
keras.layers.Dense(nodes3, activation="relu"),
keras.layers.Dropout(dropout_rate3),
keras.layers.Dense(3, activation="sigmoid"),
])
self.model.compile(
optimizer=keras.optimizers.RMSprop(
learning_rate=learning_rate, momentum=0.9, centered=True
),
loss="mse",
)

def forward(self, x):
return self.model(x)

def train(self, x_train, y_train, x_test, y_test, epochs=1000):
history = self.model.fit(
x_train, y_train, epochs=epochs, validation_data=(x_test, y_test), verbose=0
)
self.visualize_loss(history, "Training and Validation Loss")

def visualize_loss(self, history, title):
loss = history.history["loss"]
val_loss = history.history["val_loss"]
epochs = range(len(loss))
plt.figure(figsize=(6, 4))
plt.plot(epochs, loss, "b", label="Training loss")
plt.plot(epochs, val_loss, "r", label="Validation loss")
plt.title(title)
plt.xlabel("Epochs")
plt.ylabel("Loss")
plt.legend()
plt.show(block=False) # 不阻塞程序的执行

def evaluate(self, x_test, y_test):
loss = self.model.evaluate(x_test, y_test)
return loss

# 数据预处理和模型训练示例代码
filePath = "C:/Users/ssm18/new0811/PaddleScience/ppsci/data/dataset/MP_data_down_loading(train+validate).csv"

df = pd.read_csv(filePath, header=0)

# 数据处理部分
df_charge_space_group_number = pd.get_dummies(df["charge_space_group_number"], prefix="charge_space_group_number")
df = df.join(df_charge_space_group_number)
df_discharge_space_group_number = pd.get_dummies(df["discharge_space_group_number"], prefix="discharge_space_group_number")
df = df.join(df_discharge_space_group_number)

df = df.drop(
[
"battery_id",
"battery_formula",
"framework_formula",
"adj_pairs",
"capacity_vol",
"energy_vol",
"formula_charge",
"formula_discharge",
"id_charge",
"id_discharge",
"working_ion",
"num_steps",
"stability_charge",
"stability_discharge",
"charge_crystal_system",
"charge_energy_per_atom",
"charge_formation_energy_per_atom",
"charge_band_gap",
"charge_efermi",
"discharge_crystal_system",
"discharge_energy_per_atom",
"discharge_formation_energy_per_atom",
"discharge_band_gap",
"discharge_efermi",
],
axis=1,
)

x_df = df.drop(["average_voltage", "capacity_grav", "energy_grav"], axis=1)
y_df = df[["average_voltage", "capacity_grav", "energy_grav"]]

pca = PCA(0.99)
x_df = pca.fit_transform(x_df)
x_df = pd.DataFrame(x_df)

min_max_scaler = MinMaxScaler()
x_df.columns = x_df.columns.astype(str)
x_df = min_max_scaler.fit_transform(x_df)

y_min = y_df.min()
y_max = y_df.max()
y_df = (y_df - y_min) / (y_max - y_min)

len_train_test = int(tuple(x_df.shape)[0] * 0.9)
x_train, x_test = x_df[:len_train_test], x_df[len_train_test:]
y_train, y_test = y_df[:len_train_test], y_df[len_train_test:]

# 初始化并训练模型
model = MLPModel(
input_shape=(tuple(x_train.shape)[1],),
learning_rate=0.0001,
nodes1=40,
nodes2=30,
nodes3=15,
dropout_rate1=0.2,
dropout_rate2=0.2,
dropout_rate3=0.2
)

model.train(x_train, y_train, x_test, y_test, epochs=1000)
model.evaluate(x_test, y_test)
7 changes: 7 additions & 0 deletions ppsci/arch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
from ppsci.arch.vae import AutoEncoder # isort:skip
from ppsci.utils import logger # isort:skip

from ppsci.arch.xg_optuna import MyPaddleScienceXGBoostModel
Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. PaddleScience已经集成了optuna自动调参工具:https://paddlescience-docs.readthedocs.io/zh-cn/latest/zh/user_guide/#21
  2. 问题同MLPModel.py
  3. MyPaddleScienceXGBoostModel不是一个有明确意义的文件命名,请更换成合适的名字

from .xg_optuna import MyPaddleScienceXGBoostModel
from .MLPModel import MLPModel

__all__ = [
"AFNONet",
Expand Down Expand Up @@ -93,6 +96,10 @@
"UNetEx",
"UNONet",
"USCNN",

"MyPaddleScienceXGBoostModel",
"MLPModel",

]


Expand Down
3 changes: 3 additions & 0 deletions ppsci/arch/data/predictions/XG/test_pred_xg.csv
Git LFS file not shown
3 changes: 3 additions & 0 deletions ppsci/arch/data/predictions/XG/test_true_xg.csv
Git LFS file not shown
134 changes: 134 additions & 0 deletions ppsci/arch/xg_optuna.py
Copy link
Collaborator

Choose a reason for hiding this comment

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

问题同MLPModel.py,不要将整个案例文件放到arch/下

Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
import paddle
# 导入必要的模块
import optuna
import pandas as pd
import numpy as np
from xgboost import XGBRegressor
from sklearn.metrics import mean_squared_error, mean_absolute_percentage_error, r2_score
import warnings
from pathlib import Path
from sklearn.model_selection import train_test_split

warnings.filterwarnings("ignore")
OUTPUT_TEST = True

# 获取当前脚本所在目录
current_dir = Path(__file__).resolve().parent

# 构建数据文件的完整路径
X_train_path = "C:/Users/ssm18/new0811/PaddleScience/examples/ML_Pipeline/data/data/cleaned/training.csv"
y_train_path = "C:/Users/ssm18/new0811/PaddleScience/examples/ML_Pipeline/data/data/cleaned/training_labels.csv"
X_val_path = "C:/Users/ssm18/new0811/PaddleScience/examples/ML_Pipeline/data/data/cleaned/validation.csv"
y_val_path = "C:/Users/ssm18/new0811/PaddleScience/examples/ML_Pipeline/data/data/cleaned/validation_labels.csv"
X_test_path = "C:/Users/ssm18/new0811/PaddleScience/examples/ML_Pipeline/data/data/cleaned/test.csv"
y_test_path = "C:/Users/ssm18/new0811/PaddleScience/examples/ML_Pipeline/data/data/cleaned/test_labels.csv"

import os

print("X_train_path exists:", os.path.exists(X_train_path))

# 读取数据并处理
X_train = pd.read_csv(X_train_path)
y_train = pd.read_csv(y_train_path)
X_val = pd.read_csv(X_val_path)
y_val = pd.read_csv(y_val_path)

columns = X_train.columns
for col in columns:
if "[" in col or "]" in col:
old_name = col
col = col.replace("[", "(")
col = col.replace("]", ")")
X_train = X_train.rename(columns={old_name: col})
X_val = X_val.rename(columns={old_name: col})

X_train, X_verif, y_train, y_verif = train_test_split(
X_train, y_train, test_size=0.1, random_state=42
)
X_train = X_train.reset_index(drop=True)
y_train = y_train.reset_index(drop=True)
X_verif = X_verif.reset_index(drop=True)
y_verif = y_verif.reset_index(drop=True)
X_val = X_val.reset_index(drop=True)
y_val = y_val.reset_index(drop=True)

# 使用 Optuna 进行超参数优化
def objective(trial):
params = {
"max_depth": trial.suggest_int("max_depth", 1, 15),
"learning_rate": trial.suggest_loguniform("learning_rate", 0.01, 1.0),
"n_estimators": trial.suggest_int("n_estimators", 50, 1000),
"min_child_weight": trial.suggest_int("min_child_weight", 1, 10),
"gamma": trial.suggest_loguniform("gamma", 1e-08, 1.0),
"subsample": trial.suggest_loguniform("subsample", 0.5, 0.9),
"colsample_bytree": trial.suggest_loguniform("colsample_bytree", 0.5, 0.9),
}
params["tree_method"] = "hist"
optuna_model = XGBRegressor(**params)
optuna_model.fit(X_train, y_train)
verif_pred = optuna_model.predict(X_verif)
verif_loss = mean_absolute_percentage_error(y_verif, verif_pred) * 100
verif_error = mean_squared_error(y_verif, verif_pred, squared=False)
error = verif_loss + verif_error
return error

# 开始超参数优化
sampler = optuna.samplers.CmaEsSampler()
study = optuna.create_study(sampler=sampler)
study.optimize(objective, n_trials=50)

# 获取最佳参数
best_params = study.best_trial.params
print("Best trial:")
print(" Value: ", study.best_trial.value)
print(" Params: ")
for key, value in best_params.items():
print(f" {key}: {value}")

# 使用最佳参数初始化 XGBoost 模型
model = XGBRegressor(**best_params)
model.fit(X_train, y_train)

# 预测验证集
val_preds = model.predict(X_val)
val_loss = mean_squared_error(y_val, val_preds, squared=False)
print(f"Validation RMSE: {val_loss}")

# 加载测试数据
X_test = pd.read_csv(X_test_path)
y_test = pd.read_csv(y_test_path)
# 对测试数据进行相同的列名处理,确保特征名称一致
columns_test = X_test.columns
for col in columns_test:
if "[" in col or "]" in col:
old_name = col
col = col.replace("[", "(")
col = col.replace("]", ")")
X_test = X_test.rename(columns={old_name: col})

# 检查是否与训练集的列一致
X_test = X_test[X_train.columns]

# 将测试数据转换为 Paddle Tensor
test_inputs = {"x": paddle.to_tensor(X_test.values).astype("float32")}
test_labels = {"y": paddle.to_tensor(y_test.values).astype("float32")}
# 使用模型预测测试集
test_preds = model.predict(X_test)

# 计算测试集上的评估指标
test_rmse = mean_squared_error(y_test, test_preds, squared=False)
test_r2 = r2_score(y_test, test_preds)
adjusted_percent_error = test_rmse / y_test.mean() * 100

# 打印测试集结果
print(f"Test RMSE: {test_rmse}")
print(f"Test R2 Score: {test_r2}")
print(f"Adjusted Percent Error: {adjusted_percent_error}")

# 保存预测结果
predictions_dir = current_dir / "data" / "predictions" / "XG"
predictions_dir.mkdir(parents=True, exist_ok=True)

# 保存预测和真实值
pd.DataFrame(test_preds).to_csv(predictions_dir / "test_pred_xg.csv", index=False, header=False)
pd.DataFrame(y_test).to_csv(predictions_dir / "test_true_xg.csv", index=False, header=False)
Loading