Standardize dependency warning messages in deepchem/models/init.py
- Dominant language
- Python
- Stars
- 7k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
Research direction
Read deepchem/models/__init__.py and compare the optional dependency import blocks that use formatted warnings with those that log the exception directly. Standardize the warning messages for consistency and readability, while preserving the existing import behavior and avoiding functional changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100