-
Notifications
You must be signed in to change notification settings - Fork 301
Closed
Labels
type:BugSomething isn't workingSomething isn't working
Description
In https://github.com/keras-team/keras-nlp/blob/master/API_DESIGN_GUIDE.md#avoid-new-dependencies,
try:
import rouge_score
except ImportError:
pass
class RougeL(keras.metrics.Metric):
def __init__(self):
if rouge_score is None:
raise ImportError(
'RougeL metrics requires the rouge_score package. '
'`pip install rouge-score`.')
raises a NameError
if rouge_score
is not installed. We can change this to
try:
import rouge_score
except ImportError:
pass
class RougeL(keras.metrics.Metric):
def __init__(self):
if "rouge_score" not in sys.modules:
raise ImportError(
'RougeL metrics requires the rouge_score package. '
Also, all the tests fail because we haven't added rouge_score
to setup.py
. How do we deal with this issue?
Metadata
Metadata
Assignees
Labels
type:BugSomething isn't workingSomething isn't working