issue-tracking icon indicating copy to clipboard operation
issue-tracking copied to clipboard

API Init Requires api_key

Open msharp-shop opened this issue 2 years ago • 0 comments

Describe the Bug

Running API() throws an error despite all the inputs being optional.

Expected behavior

The docs show that api_key is optional. https://www.comet.com/docs/v2/api-and-sdk/python-sdk/reference/API/#api__init__

Where is the issue?

  • [x] Comet Python SDK
  • [ ] Comet UI
  • [ ] Third Party Integrations (Huggingface, TensorboardX, Pytorch Lighting etc)

To Reproduce

Simply run the following in a python session:

from comet_ml import API
api = API()

Stack Trace

>>> from comet_ml import API
>>> api = API()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "../3.9.8/lib/python3.9/site-packages/comet_ml/api.py", line 2738, in __init__
    self._client = get_rest_api_client(
  File "../3.9.8/lib/python3.9/site-packages/comet_ml/connection.py", line 1799, in get_rest_api_client
    raise ValueError("get_rest_api_client requires an api_key")
ValueError: get_rest_api_client requires an api_key

msharp-shop avatar Oct 18 '22 22:10 msharp-shop