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

fix: check the number of collected data in post_fp_check_fail #882

Merged
merged 9 commits into from
Sep 1, 2022

Conversation

HuangJiameng
Copy link
Collaborator

see #737
dpdispatcher use flag_if_job_task_fail to mark the failed jobs, so post_fp_check_fail can be used before checking the frames. If we use the alternative way the issue mentioned, we should consider different representative outputs according to fp_style. I am wondering if it is a repeat of the following frame checks. However, since flag_if_job_task_fail will be marked as True if one task in the group is failed, I am afraid that rfail could be high when only a few tasks fail. I'd like to ask for some suggestions.

@codecov-commenter
Copy link

codecov-commenter commented Aug 17, 2022

Codecov Report

Merging #882 (f2df1af) into devel (d55d400) will increase coverage by 0.09%.
The diff coverage is 91.66%.

@@            Coverage Diff             @@
##            devel     #882      +/-   ##
==========================================
+ Coverage   38.12%   38.22%   +0.09%     
==========================================
  Files          99       99              
  Lines       17782    17823      +41     
==========================================
+ Hits         6779     6812      +33     
- Misses      11003    11011       +8     
Impacted Files Coverage Δ
dpgen/generator/run.py 62.24% <91.66%> (+0.02%) ⬆️
dpgen/dispatcher/AWS.py 25.26% <0.00%> (-2.87%) ⬇️
dpgen/auto_test/Elastic.py 62.69% <0.00%> (-0.33%) ⬇️
dpgen/tools/relabel.py 14.60% <0.00%> (-0.14%) ⬇️
dpgen/generator/arginfo.py 100.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@wanghan-iapcm wanghan-iapcm requested review from AnguseZhang and njzjz and removed request for AnguseZhang August 17, 2022 12:41
@njzjz
Copy link
Member

njzjz commented Aug 17, 2022

This is not correct as dpdispatcher does not allow a command to fail. It will retry and raise RuntimeError. If you want to allow some command to return a non-zero exit code, you can consider executing some_command || touch some_flag and then count some_flag instead.

@HuangJiameng
Copy link
Collaborator Author

How about counting *_task_tag_finished? Each task has task_tag_finished. $rfail = 1 - \frac{nfinished}{ntasks}$
Creating a new tag seems cumbersome.

@njzjz
Copy link
Member

njzjz commented Aug 18, 2022

Dpdispatcher expects all tasks finished.

@HuangJiameng
Copy link
Collaborator Author

Then post_fp_check_fail seems useless? Is it reasonable to discard it? It doesn't work now in fact.

@njzjz
Copy link
Member

njzjz commented Aug 18, 2022

It is used with the old dispatcher.

@njzjz
Copy link
Member

njzjz commented Aug 18, 2022

Also, I think the tag will not be backward unless it is added into the list of backward files.

@HuangJiameng
Copy link
Collaborator Author

Since dpdispatcher will raise an error if any task fails, while the ratio of fail frames shows available data, shall we deprecate post_fp_check_fail?

@njzjz
Copy link
Member

njzjz commented Aug 23, 2022

One can use some_command || : in the command to allow some_command to fail (but the whole command still successes). And dpdata will skip non-coverage data. After new data is collected, we can count the number of data. The failed ratio can be calculated as what I mentioned in #737.

@HuangJiameng
Copy link
Collaborator Author

HuangJiameng commented Aug 24, 2022

check fail according to the number of collected data

@HuangJiameng
Copy link
Collaborator Author

image
Weirdly, unit tests are passed locally. @njzjz Do you have any idea?

dpgen/generator/run.py Outdated Show resolved Hide resolved
@njzjz
Copy link
Member

njzjz commented Aug 29, 2022

It looks like the failed unit test outputs a MultiSystems directory. Your method does not cover this situation. You may use dpgen.util.expand_sys_str.

dpgen/generator/run.py Outdated Show resolved Hide resolved
Copy link
Member

@njzjz njzjz left a comment

Choose a reason for hiding this comment

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

LGTM

@njzjz njzjz linked an issue Aug 29, 2022 that may be closed by this pull request
@HuangJiameng HuangJiameng changed the title Check failed tasks fix: check the number of collected data in post_fp_check_fail Sep 1, 2022
@AnguseZhang AnguseZhang merged commit dba436a into deepmodeling:devel Sep 1, 2022
@HuangJiameng HuangJiameng deleted the check_failed_tasks branch September 26, 2022 08:22
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.

[BUG] post_fp_check_fail does not work for dpdispatcher
4 participants