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.81k stars 357 forks source link

`rb.load` not working for TokenClassification dataset #1650

Closed merionum closed 1 year ago

merionum commented 2 years ago

Not sure how to help you reproduce the error. We just load normal text and it fails. Version 0.14.0. However, doesn't work on 0.16.0> either

Looks similar to https://github.com/recognai/rubrix/issues/319

---------------------------------------------------------------------------
JSONDecodeError                           Traceback (most recent call last)
/tmp/ipykernel_121607/1882740307.py in <module>
----> 1 dataset_rb = rb.load("mis_experiment")

~/miniconda3/lib/python3.7/site-packages/rubrix/client/api.py in wrapped_func(*args, **kwargs)
    556             @wraps(api_method)
    557             def wrapped_func(*args, **kwargs):
--> 558                 return func(*args, **kwargs)
    559 
    560         sign = signature(api_method)

~/miniconda3/lib/python3.7/site-packages/rubrix/client/api.py in load(*args, **kwargs)
    605 @api_wrapper(Api.load)
    606 def load(*args, **kwargs):
--> 607     return active_api().load(*args, **kwargs)
    608 
    609 

~/miniconda3/lib/python3.7/site-packages/rubrix/client/api.py in load(self, name, query, ids, limit, as_pandas)
    445             name=name,
    446             request=request_class(ids=ids, query_text=query),
--> 447             limit=limit,
    448         )
    449 

~/miniconda3/lib/python3.7/site-packages/rubrix/client/sdk/token_classification/api.py in data(client, name, request, limit)
     49     ) as response:
     50         return build_data_response(
---> 51             response=response, data_type=TokenClassificationRecord
     52         )

~/miniconda3/lib/python3.7/site-packages/rubrix/client/sdk/commons/api.py in build_data_response(response, data_type)
    122 
    123     content = next(response.iter_lines())
--> 124     data = json.loads(content)
    125     return handle_response_error(response, **data, parse_response=False)
    126 

~/miniconda3/lib/python3.7/json/__init__.py in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
    346             parse_int is None and parse_float is None and
    347             parse_constant is None and object_pairs_hook is None and not kw):
--> 348         return _default_decoder.decode(s)
    349     if cls is None:
    350         cls = JSONDecoder

~/miniconda3/lib/python3.7/json/decoder.py in decode(self, s, _w)
    335 
    336         """
--> 337         obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    338         end = _w(s, end).end()
    339         if end != len(s):

~/miniconda3/lib/python3.7/json/decoder.py in raw_decode(self, s, idx)
    353             obj, end = self.scan_once(s, idx)
    354         except StopIteration as err:
--> 355             raise JSONDecodeError("Expecting value", s, err.value) from None
    356         return obj, end

JSONDecodeError: Expecting value: line 1 column 1 (char 0)
frascuchon commented 2 years ago

hi @merionum and thanks for reporting.

Could you share some info about the dataset?? Any error found in the server part when requesting the loading? Also, the dataset is accessible from the UI?

Thanks and sorry for the late response.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.