You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This feature is similar to #1725 but for file_regex where we want to extract a line number from file instead of stdout/stderr.
Here is an example of metrics declaration for file_regex that will simply write one line to file.
buildspecs:
metric_file_regex:
executor: generic.local.bashtype: scriptdescription: capture result metric from file pathrun: echo "HPCG result is VALID with a GFLOP/s rating of=63.6515" > hpcg.txttags: tutorialsmetrics:
hpcg_rating_file:
type: floatfile_regex:
exp: '(\d+\.\d+)$'file: hpcg.txthpcg_state_file:
type: strfile_regex:
exp: '(VALID)'file: hpcg.txt
We can add a field linenum that will extract the line from file and apply regex so we can do the following
metric_file_regex:
executor: generic.local.bashtype: scriptdescription: capture result metric from file pathrun: echo "HPCG result is VALID with a GFLOP/s rating of=63.6515" > hpcg.txttags: tutorialsmetrics:
hpcg_rating_file:
type: floatfile_regex:
exp: '(\d+\.\d+)$'linenum: 0file: hpcg.txthpcg_state_file:
type: strfile_regex:
exp: '(VALID)'file: hpcg.txt
If there is an index error due to invalid line number the metrics would be undefined. This would be the default behavior of any metric if regex is not found then it will be not defined.
Suggest potential solution
No response
Additional Information
No response
Post question in Slack
I agree that I posted my question in slack before creating this issue
Is there an existing issue
I confirm there is no existing issue for this issue
The text was updated successfully, but these errors were encountered:
Please describe your feature
This feature is similar to #1725 but for
file_regex
where we want to extract a line number from file instead of stdout/stderr.Here is an example of metrics declaration for
file_regex
that will simply write one line to file.We can add a field
linenum
that will extract the line from file and apply regex so we can do the followingIf there is an index error due to invalid line number the metrics would be undefined. This would be the default behavior of any metric if regex is not found then it will be not defined.
Suggest potential solution
No response
Additional Information
No response
Post question in Slack
Is there an existing issue
The text was updated successfully, but these errors were encountered: