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

feat(Config): add yaml parser for complicated parametrization #4147

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Tang-Haojin
Copy link
Member

No description provided.

@Tang-Haojin Tang-Haojin marked this pull request as draft January 8, 2025 02:12
@poemonsense
Copy link
Member

Scala case class can be easily parsed into/from Json strings. Do we need to write the yml parser manully?

@XiangShanRobot
Copy link

[Generated by IPC robot]
commit: 5e40379

commit astar copy_and_run coremark gcc gromacs lbm linux mcf microbench milc namd povray wrf xalancbmk
5e40379 1.814 0.442 2.639 1.231 2.152 2.141 2.361 0.933 1.406 1.985 3.107 2.548 2.267 3.308

master branch:

commit astar copy_and_run coremark gcc gromacs lbm linux mcf microbench milc namd povray wrf xalancbmk
23767fc 2.640 1.231 2.152 2.141 0.933 1.403 1.985 3.107 2.267 3.308
14651e9 1.814 0.442 2.639 1.231 2.152 2.142 2.361 0.933 1.406 1.985 3.107 2.558 2.267 3.308
77733a7 1.814 0.442 2.640 1.231 2.152 2.141 2.361 0.933 1.403 1.985 3.107 2.558 2.267 3.308
da51a7a 1.814 0.442 2.639 1.231 2.152 2.141 2.361 0.933 1.407 1.985 3.107 2.558 2.267 3.308
c75efc0 1.814 0.442 2.639 1.231 2.152 2.141 2.361 0.933 1.403 1.985 3.107 2.558 2.267 3.308

@Tang-Haojin
Copy link
Member Author

Scala case class can be easily parsed into/from Json strings. Do we need to write the yml parser manully?

Yes we have, but have several problems. For example, for an integer in json/yaml file, when we parse it to Scala type, we may get Int or Long in Scala according to its length. So simply parse a json to case class will cause some issues. So I wrote a semi-automatic parser to solve this issue.

@Tang-Haojin
Copy link
Member Author

For example, 0x3A000000 will be converted to Int and 0x800000000 will be converted to Long.

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.

3 participants