Skip to content

AttributeError: 'NoneType' object has no attribute 'cuda' #2

@tuxophone

Description

@tuxophone

Describe the bug

Ubuntu 20.04.6 LTS

python3 -V
Python 3.8.10

install
pip install basedai

nvidia-smi
NVIDIA-SMI 535.129.03 Driver Version: 535.129.03 CUDA Version: 12.2

error after run "basedcli wallet faucet":
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /usr/local/bin/basedcli:32 in │
│ │
│ 29 │
│ 30 │
│ 31 if name == 'main': │
│ ❱ 32 │ main() │
│ 33 │
│ 34 # The MIT License (MIT) │
│ 35 # Copyright © 2024 Saul Finney │
│ │
│ /usr/local/bin/basedcli:21 in main │
│ │
│ 18 │ │ return │
│ 19 │ │
│ 20 │ try: │
│ ❱ 21 │ │ cli_instance = basedcli(args=sys.argv[1:]) │
│ 22 │ │ cli_instance.run() │
│ 23 │ except KeyboardInterrupt: │
│ 24 │ │ print('KeyboardInterrupt') │
│ │
│ /usr/local/lib/python3.8/dist-packages/basedai/cli.py:239 in init
│ │
│ 236 │ │ │ sys.exit() │
│ 237 │ │ │
│ 238 │ │ # Check if the config is valid. │
│ ❱ 239 │ │ cli.check_config(self.config) │
│ 240 │ │ │
│ 241 │ │ # If no_version_checking is not set or set as False in the config, version check │
│ 242 │ │ if not self.config.get("no_version_checking", d=False): │
│ │
│ /usr/local/lib/python3.8/dist-packages/basedai/cli.py:328 in check_config │
│ │
│ 325 │ │ │ │
│ 326 │ │ │ if isinstance(command_data, dict): │
│ 327 │ │ │ │ if config["subcommand"] != None: │
│ ❱ 328 │ │ │ │ │ command_data["commands"][config["subcommand"]].check_config(config) │
│ 329 │ │ │ │ else: │
│ 330 │ │ │ │ │ console.print( │
│ 331 │ │ │ │ │ │ f":cross_mark:[red]Missing subcommand for: {config.command}[/red │
│ │
│ /usr/local/lib/python3.8/dist-packages/basedai/commands/memorize.py:515 in check_config │
│ │
│ 512 │ │ │ wallet_name = Prompt.ask("Enter wallet name", default=defaults.wallet.name) │
│ 513 │ │ │ config.wallet.name = str(wallet_name) │
│ 514 │ │ if not config.no_prompt: │
│ ❱ 515 │ │ │ check_for_cuda_reg_config(config) │
│ 516 │
│ 517 │
│ 518 class SwapComputekeyCommand: │
│ │
│ /usr/local/lib/python3.8/dist-packages/basedai/commands/utils.py:83 in check_for_cuda_reg_config │
│ │
│ 80 │ """Checks, when CUDA is available, if the user would like to register with their CUD │
│ 81 │ if torch.cuda.is_available(): │
│ 82 │ │ if not config.no_prompt: │
│ ❱ 83 │ │ │ if config.pow_register.cuda.get("use_cuda") == None: # flag not set │
│ 84 │ │ │ │ # Ask about cuda registration only if a CUDA device is available. │
│ 85 │ │ │ │ cuda = Confirm.ask("Detected CUDA device, use CUDA for registration?\n") │
│ 86 │ │ │ │ config.pow_register.cuda.use_cuda = cuda │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'NoneType' object has no attribute 'cuda'

To Reproduce

pip install basedai
basedcli wallet faucet

Expected behavior

How to solve this problem?

Screenshots

No response

Environment

Ubuntu 20.04.6 LTS, basedcli v1.0.5

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions