While reviewing the file deepchem/models/init.py, I noticed that optional dependency imports use slightly inconsistent logging formats.
In some cases, the code uses formatted warning messages such as:
logger.warning(f"Skipped loading some TensorFlow models, missing a dependency. {e}")
In other cases, it directly logs the exception object:
logger.warning(e)
For better consistency and readability, it would be helpful to standardize the warning messages across all optional dependency import blocks.
I would like to refactor the logging statements to follow a consistent and clear format while ensuring no functional behavior changes.
Please let me know if this would be a suitable improvement.
Thank you.
Vinit Jain
Github:- @vinitjain2005
While reviewing the file deepchem/models/init.py, I noticed that optional dependency imports use slightly inconsistent logging formats.
In some cases, the code uses formatted warning messages such as:
logger.warning(f"Skipped loading some TensorFlow models, missing a dependency. {e}")
In other cases, it directly logs the exception object:
logger.warning(e)
For better consistency and readability, it would be helpful to standardize the warning messages across all optional dependency import blocks.
I would like to refactor the logging statements to follow a consistent and clear format while ensuring no functional behavior changes.
Please let me know if this would be a suitable improvement.
Thank you.
Vinit Jain
Github:- @vinitjain2005