drprojects / superpoint_transformer

Official PyTorch implementation of Superpoint Transformer introduced in [ICCV'23] "Efficient 3D Semantic Segmentation with Superpoint Transformer" and SuperCluster introduced in [3DV'24 Oral] "Scalable 3D Panoptic Segmentation As Superpoint Graph Clustering"
MIT License
601 stars 75 forks source link

run train.py #5

Closed jing-zhao9 closed 1 year ago

jing-zhao9 commented 1 year ago

Hi,When I ran train.py, I encountered the following error

[2023-07-01 22:16:13,128][src.utils.utils][INFO] - Instantiating logger <pytorch_lightning.loggers.wandb.WandbLogger>
Error executing job with overrides: []
[2023-07-01 22:16:13,822][src.utils.utils][ERROR] - 
Traceback (most recent call last):
  File "/home/zhaojing/anaconda3/envs/spt/lib/python3.8/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 92, in _call_target
    return _target_(*args, **kwargs)
  File "/home/zhaojing/anaconda3/envs/spt/lib/python3.8/site-packages/pytorch_lightning/loggers/wandb.py", line 358, in __init__
    _ = self.experiment
  File "/home/zhaojing/anaconda3/envs/spt/lib/python3.8/site-packages/lightning_fabric/loggers/logger.py", line 114, in experiment
    return fn(self)
  File "/home/zhaojing/anaconda3/envs/spt/lib/python3.8/site-packages/pytorch_lightning/loggers/wandb.py", line 406, in experiment
    self._experiment = wandb.init(**self._wandb_init)
  File "/home/zhaojing/anaconda3/envs/spt/lib/python3.8/site-packages/wandb/sdk/wandb_init.py", line 1171, in init
    raise e
  File "/home/zhaojing/anaconda3/envs/spt/lib/python3.8/site-packages/wandb/sdk/wandb_init.py", line 1148, in init
    wi.setup(kwargs)
  File "/home/zhaojing/anaconda3/envs/spt/lib/python3.8/site-packages/wandb/sdk/wandb_init.py", line 289, in setup
    wandb_login._login(
  File "/home/zhaojing/anaconda3/envs/spt/lib/python3.8/site-packages/wandb/sdk/wandb_login.py", line 298, in _login
    wlogin.prompt_api_key()
  File "/home/zhaojing/anaconda3/envs/spt/lib/python3.8/site-packages/wandb/sdk/wandb_login.py", line 228, in prompt_api_key
    raise UsageError("api_key not configured (no-tty). call " + directive)
wandb.errors.UsageError: api_key not configured (no-tty). call wandb.login(key=[your_api_key])

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/zhaojing/code/superpoint_transformer-master/src/utils/utils.py", line 45, in wrap
    metric_dict, object_dict = task_func(cfg=cfg)
  File "/home/zhaojing/code/superpoint_transformer-master/src/train.py", line 88, in train
    logger: List[Logger] = utils.instantiate_loggers(cfg.get("logger"))
  File "/home/zhaojing/code/superpoint_transformer-master/src/utils/utils.py", line 132, in instantiate_loggers
    logger.append(hydra.utils.instantiate(lg_conf))
  File "/home/zhaojing/anaconda3/envs/spt/lib/python3.8/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 226, in instantiate
    return instantiate_node(
  File "/home/zhaojing/anaconda3/envs/spt/lib/python3.8/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 347, in instantiate_node
    return _call_target(_target_, partial, args, kwargs, full_key)
  File "/home/zhaojing/anaconda3/envs/spt/lib/python3.8/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 97, in _call_target
    raise InstantiationException(msg) from e
hydra.errors.InstantiationException: Error in call to target 'pytorch_lightning.loggers.wandb.WandbLogger':
UsageError('api_key not configured (no-tty). call wandb.login(key=[your_api_key])')
full_key: logger.wandb
[2023-07-01 22:16:13,824][src.utils.utils][INFO] - Closing loggers...
Error in call to target 'pytorch_lightning.loggers.wandb.WandbLogger':
UsageError('api_key not configured (no-tty). call wandb.login(key=[your_api_key])')
full_key: logger.wandb

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
drprojects commented 1 year ago
Error in call to target 'pytorch_lightning.loggers.wandb.WandbLogger':
UsageError('api_key not configured (no-tty). call wandb.login(key=[your_api_key])')
full_key: logger.wandb

Seems like you have not configured wandb (ie Weights&Biases) with your API key. When running from the CLI for the first time, you should normally be prompted a message asking you to provide your API key. See W&B documentation for more information.

If you do not want to use the wandb logger, you can disable it in your train.yaml config:

logger: null

Or by specifying it from the CLI:

python src/train.py experiment=s3dis logger=null
drprojects commented 1 year ago

Please let me know if this solves your problem.

drprojects commented 1 year ago

I consider this issue closed. Feel free to re-open it if necessary.