hyperdashio / hyperdash-sdk-py

Official Python SDK for Hyperdash
https://hyperdash.io
198 stars 26 forks source link

Error from Hyperdash server: api_key_required #104

Closed tokestermw closed 6 years ago

tokestermw commented 6 years ago

Hi,

I can successfully run hyperdash after logging in. But it doesn't seem to be able to take the environmental variable. I'm using the api key stored in ~/.hyperdash/hyperdash.json.

HYPERDASH_API_KEY = os.environ.get('HYPERDASH_API_KEY', None)

def get_api_key():
    if HYPERDASH_API_KEY:
        print(HYPERDASH_API_KEY)
        def getter():
            return HYPERDASH_API_KEY
        return getter
    else:
        return None

exp = Experiment(model_name, api_key_getter=get_api_key())
exp.end()

Returns an error:

Error from Hyperdash server: api_key_required

Thanks!

richardartoul commented 6 years ago

Thanks for finding this bug, thats our mistake. It was an easy fix: https://github.com/hyperdashio/hyperdash-sdk-py/pull/105

Just run

pip install --upgrade hyperdash

to upgrade to 0.12.7 and it should work now :)