neptune-ai / neptune-tensorboard

Neptune - TensorBoard integration 🧩 Experiment tracking with advanced UI, collaborative features, and user access management.
https://docs.neptune.ai/integrations/tensorboard/
Apache License 2.0
13 stars 6 forks source link

Keep getting missing API token in Google Colab #38

Closed srujanreddyj closed 2 years ago

srujanreddyj commented 4 years ago

Hello, I am running a pytorch code with tensorboard in google colab and I wanted to track experiments. So, I have created a project and given api token as (gave it two ways). None works.

!env = ' '
import neptune
neptune.init(
api_token=" ",
    project_qualified_name=" "
)

But when I run this !neptune tensorboard '/logdir' --project name

I keep this issue neptune.exceptions.MissingApiToken: Missing API token. Use "NEPTUNE_API_TOKEN" environment variable or pass it as an argument to neptune.init. Open this link to get your API token https://ui.neptune.ai/get_my_api_token

Any guidance or help?? Thank you

szymon-kuklewicz commented 4 years ago

Hi there,

Google Colab limits ways, how environment variables can be set.

According to StackOverflow (https://stackoverflow.com/questions/49684495/is-it-possible-to-set-environment-variables-in-googles-colaboratory) the preferred way to set environment variable in Google Colab is:

import os os.environ["NEPTUNE_API_TOKEN"] = " "

Try to run this code before starting "!neptune tensorboard ..."

Hope this helps. Good Luck, Szymon

kamil-kaczmarek commented 2 years ago

closing as it is stale issue.