uncharted-distil / distil-primitives

Distil AutoML primitives
Apache License 2.0
2 stars 1 forks source link

d3m.primitives.learner.text_classifier.DistilTextClassifier cannot be initialized with default hyper-parameters #41

Closed cdbethune closed 4 years ago

cdbethune commented 5 years ago
Traceback (most recent call last):
  File "./test-primitives.py", line 85, in <module>
    instance = primitive(hyperparams=primitive.metadata.get_hyperparams().defaults())
  File "/src/distil-primitives/distil/primitives/text_classifier.py", line 100, in __init__
    self._model = TextClassifierCV(self.hyperparams['metric'], param_grid=self._grid)
  File "/src/distil-primitives/distil/modeling/text_classification.py", line 20, in __init__
    assert target_metric in classification_metrics
AssertionError
cdbethune commented 4 years ago

So the specific problem here is that the hyperparam has a default value of '' defined, which isn't handled properly within the primitive. We should set a default in the hyperparam value so its explicit.