Skip to content

Commit

Permalink
fix for cli loaded metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
scopatz committed Jan 29, 2015
1 parent 90b3513 commit b453228
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cymetric/execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ def __init__(self, evaler=None, db=None, *args, **kwargs):
"""
self._ctx = ctx = {}
self.evaler = evaler or evaluator.Evaluator(db)
for metric in METRIC_REGISTRY:
ctx[metric] = MetricProxy(metric, evaler)
import cymetric as cym # lazy import needed
ctx['cym'] = cym
ctx['np'] = np
Expand All @@ -160,6 +158,8 @@ def __init__(self, evaler=None, db=None, *args, **kwargs):
def __getitem__(self, key):
if key in __builtins__:
raise KeyError
elif key in METRIC_REGISTRY:
self._ctx[key] = MetricProxy(key, self.evaler)
elif key not in self._ctx:
self._ctx[key] = ColumnProxy(key)
return self._ctx[key]
Expand Down

0 comments on commit b453228

Please sign in to comment.