diff --git a/src/transformers/integrations.py b/src/transformers/integrations.py index c5f4442c563594..d14e6e7ce13522 100644 --- a/src/transformers/integrations.py +++ b/src/transformers/integrations.py @@ -14,7 +14,7 @@ # Comet needs to be imported before any ML frameworks import comet_ml # noqa: F401 - if comet_ml.config.get_config("comet.api_key"): + if hasattr(comet_ml, "config") and comet_ml.config.get_config("comet.api_key"): _has_comet = True else: if os.getenv("COMET_MODE", "").upper() != "DISABLED":