Skip to content

Conversation

@copybara-service
Copy link

Attempt to fix XManager cli

PiperOrigin-RevId: 588033997
Copy link

@CoderOggy78 CoderOggy78 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import functools
import importlib.util
import os

@functools.cache
def _is_tf_installed() -> bool:
if os.environ.get('EPATH_USE_TF', '').lower() in ['false', 'no', 'f', '0']:
return False
return importlib.util.find_spec('tensorflow') is not None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants