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

Add detailed_job_info #21

Merged
merged 1 commit into from
Jul 17, 2024
Merged

Conversation

t-reents
Copy link
Contributor

Adding the command to retrieve the detailed_job_info. Since this was missing until now, jobs run via HQ didn't have the detailed job info. I only parse the output of hq job info <id> (transformed into a one-line json using jq) for logging purposes. The data can be analyzed with json.loads().

@unkcpz
Copy link
Member

unkcpz commented Jul 17, 2024

Hi @t-reents, can you describe the use case how you use the return value of detailed_job_info, I thought it only consumed by scheduler.parse_output which we not yet implement. Once we have it, it will read from detailed_job_info and get information such as walltime exceed or OOM error and set the exit_code to calcjob, is this what you have in your code?

@t-reents
Copy link
Contributor Author

Hi @unkcpz, you are right. As I also mentioned in #24, ideally we also implement parse_output here. This PR was just to implement at least the detailed_job_info command, since we were considering to use HQ for the hero run. We wanted to have at least the raw info when calling get_detailed_job_info() on a CalcJob, potentially enabling some kind of debugging afterwards

@unkcpz
Copy link
Member

unkcpz commented Jul 17, 2024

Make sense @t-reents
Can you move the implementation to the end where I put a TODO in the function, now it has to methods with same names.
Besides it, all good to me, we can then merge it.

Here, I add the command to retrieve the `detailed_job_info`, which wasn't
implemented before. This caused jobs run with HQ have no
information about the job in their attributes.
The `hq job info <id>` command is used and transformed into a one-line
JSON string using jq. This string is stored in the attributes and can be
transformed into a proper dictionary using `json.loads`.
@t-reents
Copy link
Contributor Author

Thanks, I thought that I removed it. Now it's done

Copy link
Member

@unkcpz unkcpz left a comment

Choose a reason for hiding this comment

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

Thanks! @t-reents

@unkcpz unkcpz merged commit f7bb524 into aiidateam:main Jul 17, 2024
3 checks passed
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