Skip to content

[BUG] AttributeError in conver the wandb log into swanlab logΒ #852

@zhanglixuan0720

Description

@zhanglixuan0720

πŸ› Bug description

I encounter the AttributeError in conver the wandb log into swanlab log

πŸ§‘β€πŸ’» Step to reproduce

  1. In a python environment with wandb and swanlab installed, run the convert program
swanlab convert -t wandb --wb-project [project_name] --wb-entity [username] --wb-runid [runid]
  1. raise AttributeError and get nothing in the workspace of swanlab.
  File "python_env/bin/swanlab", line 8, in <module>
    sys.exit(cli())
  File "python_env/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "python_env/lib/python3.9/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "python_env/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "python_env/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "python_env/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "python_env/lib/python3.9/site-packages/swanlab/cli/commands/converter/__init__.py", line 105, in convert
    wb_converter.run(
  File "python_env/lib/python3.9/site-packages/swanlab/converter/wb/wb_converter.py", line 97, in run
    self.parse_wandb_logs(
  File "python_env/lib/python3.9/site-packages/swanlab/converter/wb/wb_converter.py", line 67, in parse_wandb_logs
    "wandb_metadata": wb_run.metadata,
  File "python_env/lib/python3.9/site-packages/wandb/apis/public.py", line 960, in __getattr__
    raise AttributeError(f"'{repr(self)}' object has no attribute '{name}'")
'<Run username/project_name/run_id (finished)>' object has no attribute 'metadata'

Image

πŸ‘Ύ Expected result

The above command can successfully convert the wandb log into swanlab log so that I can see all logs in the swanlab workspace.

πŸš‘ Any additional [like screenshots]

  • SwanLab Version: 0.4.9

  • Platform: ubuntu 20.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions