PennLINC / babs

BIDS App Bootstrap (BABS)
https://pennlinc-babs.readthedocs.io
MIT License
5 stars 5 forks source link

[ENH] `babs-status`: parse keywords of "Error" and "Warning" automatically without pre-definition from the user #145

Closed zhao-cy closed 8 months ago

zhao-cy commented 9 months ago

Suggestions from the reviewer: re: babs-status:

Currently, it seems that "expected errors" must be predefined and explicitly stated in the configuration file. However, it might be valuable to explore the possibility of parsing lines containing keywords such as "Error" or "Warning" to automatically gather relevant error messages, reducing subjectivity and potential human error in the process.

zhao-cy commented 8 months ago

Response: We tested such keyword based approach but we realized that it was not tractable, because these keywords are often not used consistently by software. Two examples below.

Example 1: fMRIPrep may output this message at the beginning of the job: > Telemetry system to collect crashes and errors is enabled - thanks for your feedback!. Use option ``--notrack`` to opt out. Although this message includes the keyword “error”, this does not mean there is any real error here.
Example 2: Similarly, FreeSurfer may output this message: > ERROR: talairach_afd: Talairach Transform: transforms/talairach.xfm `***FAILED***` However, the job moved on to the next step and did not in fact fail.

Therefore, we have not included such automatic keyword dection, but instead ask users to provide alerting messages in the container configuration YAML file. To reduce potential human error, users may copy the message from existing log files where they saw such alerting messages, and directly paste the string into the container configuration YAML file for BABS.