Giter Club home page Giter Club logo

zeno-client's People

Contributors

cabreraalex avatar dependabot[bot] avatar neubig avatar sparkier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

zeno-client's Issues

TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

Unable to import zeno due to mismatch in Python dependency.

File "/datadrive5/dungnm31/data/zeno_visualize.py", line 2, in <module>
    from zeno_client import ZenoClient, ZenoMetric
  File "/datadrive5/dungnm31/miniconda3/envs/dev/lib/python3.9/site-packages/zeno_client/__init__.py", line 2, in <module>
    from .client import ZenoClient, ZenoMetric, ZenoProject
  File "/datadrive5/dungnm31/miniconda3/envs/dev/lib/python3.9/site-packages/zeno_client/client.py", line 267, in <module>
    class ZenoClient:
  File "/datadrive5/dungnm31/miniconda3/envs/dev/lib/python3.9/site-packages/zeno_client/client.py", line 308, in ZenoClient
    description: str | None = None,
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

As far as I know, the str | None in zeno_client/client.py#L308 required at least python=3.10 which is not available in python=3.8

JSON Decoding Error on upload_dataset

I'm getting the following error when I do upload dataset:

project.upload_dataset(df, id_column="example_id", label_column="label", data_column="context")

I have a jupyter notebook to reproduce, which I will share privately.

---------------------------------------------------------------------------
JSONDecodeError                           Traceback (most recent call last)
File [~/anaconda3/envs/zeno-build/lib/python3.10/site-packages/requests/models.py:971](https://file+.vscode-resource.vscode-cdn.net/Users/gneubig/sand/~/anaconda3/envs/zeno-build/lib/python3.10/site-packages/requests/models.py:971), in Response.json(self, **kwargs)
    970 try:
--> 971     return complexjson.loads(self.text, **kwargs)
    972 except JSONDecodeError as e:
    973     # Catch JSON-related errors and raise as requests.JSONDecodeError
    974     # This aliases json.JSONDecodeError and simplejson.JSONDecodeError

File [~/anaconda3/envs/zeno-build/lib/python3.10/json/__init__.py:346](https://file+.vscode-resource.vscode-cdn.net/Users/gneubig/sand/~/anaconda3/envs/zeno-build/lib/python3.10/json/__init__.py:346), in loads(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
    343 if (cls is None and object_hook is None and
    344         parse_int is None and parse_float is None and
    345         parse_constant is None and object_pairs_hook is None and not kw):
--> 346     return _default_decoder.decode(s)
    347 if cls is None:

File [~/anaconda3/envs/zeno-build/lib/python3.10/json/decoder.py:337](https://file+.vscode-resource.vscode-cdn.net/Users/gneubig/sand/~/anaconda3/envs/zeno-build/lib/python3.10/json/decoder.py:337), in JSONDecoder.decode(self, s, _w)
    333 """Return the Python representation of ``s`` (a ``str`` instance
    334 containing a JSON document).
    335 
    336 """
--> 337 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    338 end = _w(s, end).end()

File [~/anaconda3/envs/zeno-build/lib/python3.10/json/decoder.py:355](https://file+.vscode-resource.vscode-cdn.net/Users/gneubig/sand/~/anaconda3/envs/zeno-build/lib/python3.10/json/decoder.py:355), in JSONDecoder.raw_decode(self, 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)

During handling of the above exception, another exception occurred:

JSONDecodeError                           Traceback (most recent call last)
[/Users/gneubig/sand/web_arena_zeno.ipynb](https://file+.vscode-resource.vscode-cdn.net/Users/gneubig/sand/web_arena_zeno.ipynb) Cell 9 line 1
----> [1](vscode-notebook-cell:/Users/gneubig/sand/web_arena_zeno.ipynb#X23sZmlsZQ%3D%3D?line=0) project.upload_dataset(df, id_column="example_id", label_column="label", data_column="context")

File [~/anaconda3/envs/zeno-build/lib/python3.10/site-packages/zeno_client/client.py:93](https://file+.vscode-resource.vscode-cdn.net/Users/gneubig/sand/~/anaconda3/envs/zeno-build/lib/python3.10/site-packages/zeno_client/client.py:93), in ZenoProject.upload_dataset(self, df, id_column, label_column, data_column)
     91     print("Successfully uploaded data")
     92 else:
---> 93     raise Exception(response.json()["detail"])

File [~/anaconda3/envs/zeno-build/lib/python3.10/site-packages/requests/models.py:975](https://file+.vscode-resource.vscode-cdn.net/Users/gneubig/sand/~/anaconda3/envs/zeno-build/lib/python3.10/site-packages/requests/models.py:975), in Response.json(self, **kwargs)
    971     return complexjson.loads(self.text, **kwargs)
    972 except JSONDecodeError as e:
    973     # Catch JSON-related errors and raise as requests.JSONDecodeError
    974     # This aliases json.JSONDecodeError and simplejson.JSONDecodeError
--> 975     raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

get_project() failing with APIError

Looks like the project-uuid is getting trimmed on both ends in get_project():

if response.status_code == 200:
            return ZenoProject(self.api_key, response.text[1:-1], self.endpoint)

I don't think this should be necessary and is leading to this error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.