You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
f"TensorFlow was imported before {__name__} could set {env_key}={target_val}. "
20
+
"The flag may be ignored. Please import this package first or continue at your own risk.",
21
+
RuntimeWarning,
22
+
stacklevel=2
23
+
)
24
+
return
25
+
26
+
ifexisting_valisNoneorexisting_val=='':
27
+
# It is missing, set it and inform.
28
+
os.environ[env_key] =target_val
29
+
ifverbose:
30
+
msg=f"[{__name__}] Info: Environment variable {env_key} is automatically set to '{target_val}'."
31
+
print(msg)
32
+
elifexisting_valnotin [target_val, 'true']:
33
+
ifverbose:
34
+
msg=f"[{__name__}] Warning: Environment variable {env_key} is already set to '{existing_val}', but tensorpotential requires '{target_val}'. Do it at your own risk"
0 commit comments