usc-isi-i2 / dsbox-cleaning

The data cleaning TA1 component of DSBox
MIT License
6 stars 4 forks source link

What version of metadata and primitive-interfaces does this work with? #25

Closed remram44 closed 6 years ago

remram44 commented 6 years ago

I'm using primitive-interfaces v2018.1.5 and getting:

<ipython-input-1-2c2aa27b5fbe> in <module>()
----> 1 from dsbox.datapreprocessing.cleaner import Encoder
      2 from dsbox.datapreprocessing.cleaner import Imputation

~/Documents/programming/_venvs/d3m/lib/python3.6/site-packages/dsbox/datapreprocessing/cleaner/__init__.py in <module>()
----> 1 from .Iterative_regress import IterativeRegressionImputation
      2 from .greedy import GreedyImputation
      3 from .encoder import Encoder
      4 from .mice import MICE
      5 from .knn import KNNImputation, KnnHyperparameter

~/Documents/programming/_venvs/d3m/lib/python3.6/site-packages/dsbox/datapreprocessing/cleaner/Iterative_regress.py in <module>()
     19 
     20 
---> 21 class IterativeRegressionImputation(UnsupervisedLearnerPrimitiveBase[Input, Output, Params, None]):
     22     __author__ = "USC ISI"
     23     __metadata__ = {

~/Documents/programming/_venvs/d3m/src/primitive-interfaces/primitive_interfaces/base.py in __new__(mcls, class_name, bases, namespace, **kwargs)
     73 
     74         if not isinstance(cls.metadata, metadata_module.PrimitiveMetadata):
---> 75             raise TypeError("'metadata' attribute is not an instance of PrimitiveMetadata.")
     76 
     77         cls.metadata.contribute_to_class(cls)

TypeError: 'metadata' attribute is not an instance of PrimitiveMetadata.
luofanghao commented 6 years ago

Hi seems like you have not updated dsbox-cleaning module to the newest version. The newest version should work fine. (Tested using primitive-interfaces version Dec 30, devel branch)

remram44 commented 6 years ago

I am using v2018.1.5 which is more recent than Dec 30.

kyao commented 6 years ago

Are you pulling our code from git hub? Or, using PyPI package with pip install? I will release a new version of the PyPI package later today.

mitar commented 6 years ago

Can you please submit primitive annotation to primitives_repo so that it is validated automatically that it works with a particular interface version?

remram44 commented 6 years ago

I was using pip (0.3.0). I can try your master tonight.

remram44 commented 6 years ago

master seems to import fine. It shows up in d3m.index as well.