Skip to content

Standardize dependency warning messages in deepchem/models/init.py #4772

@vinitjain2005

Description

@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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions