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

Make "name" specifier of parser_outputs optional #167

Open
GeigerJ2 opened this issue Jul 16, 2024 · 2 comments
Open

Make "name" specifier of parser_outputs optional #167

GeigerJ2 opened this issue Jul 16, 2024 · 2 comments

Comments

@GeigerJ2
Copy link
Contributor

GeigerJ2 commented Jul 16, 2024

From the same discussion as #166 with @mbercx and @superstar54, also came this issue: I'm getting quite confused these days with all the string annotations one needs to correctly set up. They seem a bit cumbersome and repetetive, e.g., having to specify:

parser_outputs=[{"name": "energy"}, {"name": "structure"}, {"name": "forces"}]

for using a custom parser when running a ShellJob. In this case, I propose we make the "name" key optional, and allow users to just specify a list (or, make the argument fully optional and inspect from the parser actual outputs of the parser function, though, that might be just wishful thinking, as it's passed as PickledData). I understand that other options could be specified here, e.g. data type, so we need to find a balance between extensibility and ease of use, so the default could be "name", while other/multiple identifiers can still be used.

There are more places where one has to add such string identifiers, the "General" comes to mind, e.g., from here:

SeekpathTask = build_task(
    seekpath_structure_analysis,
    outputs=[["General", "primitive_structure"], ["General", "explicit_kpoints"]],
)

where "General" could also be the default and users could just provide a simple list, as I think came already up on our first WorkGraph coding day

@superstar54
Copy link
Member

May I ask where do you find the SeekpathTask example code?

outputs=[["General", "primitive_structure"], ["General", "explicit_kpoints"]],

The General keyword has been dropped in the latest version.

@GeigerJ2
Copy link
Contributor Author

GeigerJ2 commented Jul 16, 2024

In principle, it's from the RTD on Transferring WorkChain to WorkGraph, but I just checked, and actually it uses "name", not "General". Might have been an older version I still hadn't updated on my laptop. In any case, then the "General" issue is void if it's dropped 👍🏽

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

No branches or pull requests

2 participants