Skip to content

Attempt to fix XManager cli#494

Open
copybara-service[bot] wants to merge 1 commit intomainfrom
test_588033997
Open

Attempt to fix XManager cli#494
copybara-service[bot] wants to merge 1 commit intomainfrom
test_588033997

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