Fix tensorflow issues with a few hacks (temporary), fixes #1195

This commit is contained in:
Dave Halter
2018-10-02 00:51:51 +02:00
parent 862f611829
commit c24eb4bd67
4 changed files with 26 additions and 4 deletions

View File

@@ -105,6 +105,9 @@ class Evaluator(object):
self.is_analysis = False
self.project = project
self.access_cache = {}
# This setting is only temporary to limit the work we have to do with
# tensorflow and others.
self.infer_enabled = True
self.reset_recursion_limitations()
self.allow_different_encoding = True
@@ -123,6 +126,9 @@ class Evaluator(object):
return self.project._get_sys_path(self, environment=self.environment)
def eval_element(self, context, element):
if not self.infer_enabled:
return NO_CONTEXTS
if isinstance(context, CompForContext):
return eval_node(context, element)