argilla-io / argilla

Argilla is a collaboration tool for AI engineers and domain experts to build high-quality datasets
https://docs.argilla.io
Apache License 2.0
3.8k stars 355 forks source link

bug #768

Closed ddy-ddy closed 2 years ago

ddy-ddy commented 2 years ago

hello authors. I have this error while running the following code. How to solve it? I ran it using Docker, and then i imported the data using this code in PyCharm, and there was an error. thank you so much..

Code:

import rubrix as rb

rb.init("http://localhost:6900/", api_key="<YOUR_API_KEY>")
rb.set_workspace("rubrix")

rb.log(
  rb.TextClassificationRecord(inputs="my first rubrix example"),
  name='example-dataset'
)

Error:

TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

截屏2021-12-08 下午3 33 37

dvsrepo commented 2 years ago

Hi @ddy-ddy:

If you are running the default Docker install you can skip the rb.init("http://localhost:6900/", api_key="<YOUR_API_KEY>") and rb.set_workspace statements.

You can do the following:

import rubrix as rb
rb.log(
    rb.TextClassificationRecord(inputs="my first rubrix example"),
    name='example-dataset'
)

After that I recommend you to take a look at the cookbook for more examples:

https://rubrix.readthedocs.io/en/stable/guides/cookbook.html

ddy-ddy commented 2 years ago
import rubrix as rb
rb.log(
rb.TextClassificationRecord(inputs="my first rubrix example"),
name='example-dataset'
)

I did what you said. but it still made the same mistake. 截屏2021-12-08 下午3 48 33

dvsrepo commented 2 years ago

Thanks, are you installing with pip install rubrix?

ddy-ddy commented 2 years ago

Yes. My version of Python is 3.6

截屏2021-12-08 下午3 58 15
dvsrepo commented 2 years ago

Thanks so much @ddy-ddy , we'll look into this

ddy-ddy commented 2 years ago

Ok. I look forward to your solving this problem. Have a good day.

frascuchon commented 2 years ago

Hi @ddy-ddy , thanks for reporting the issue.

You should use at least Python 3.7. There is a compatibility problem with pydantic and python 3.6 https://github.com/samuelcolvin/pydantic/issues/1513

ddy-ddy commented 2 years ago

Hi @ddy-ddy , thanks for reporting the issue.

You should use at least Python 3.7. There is a compatibility problem with pydantic and python 3.6 samuelcolvin/pydantic#1513

Thank you so much! I resolve my problem. I saw in your tutorial that Rubrix can used in Python3.6.

Maybe you should change it or add a comment.

Finally, I want to say that Rubrix is very useful.o( ̄▽ ̄)d

截屏2021-12-08 下午7 31 29