asv icon indicating copy to clipboard operation
asv copied to clipboard

Several issues with setting machine info

Open thomasaarholt opened this issue 5 years ago • 3 comments
trafficstars

I've been setting up / debugging a github action to run a benchmark on a repo, and then push the html and results to a separate repo. Since the github action runs on a fresh server instance each time, the following may be related to that:

  1. Calling asv machine --name test results in the following response when ~/.asv-machine.json does not exist. The hostname in this case is smnpc-fp58, and this happens both in PowerShell and bash. The file is created with the correct machine name. The same response occurs if I specify all other options as well.
 $ asv machine --machine test
· No information stored about machine 'smnpc-fp58'. I know about nothing.
  1. Calling asv machine --"specifying all options and setting --machine hostname results in the following error and no file generated, when ~/.asv-machine.json does not exist.
$ asv machine --machine smnpc-fp58 --os test --arch test --cpu test --num_cpu 1 --ram '1GB'

· No information stored about machine 'smnpc-fp58'. I know about nothing.


Traceback (most recent call last):
  File "c:\users\thomasaar\.conda\envs\py7\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\thomasaar\.conda\envs\py7\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\thomasaar\.conda\envs\py7\Scripts\asv.exe\__main__.py", line 7, in <module>
  File "c:\users\thomasaar\.conda\envs\py7\lib\site-packages\asv\main.py", line 38, in main
    result = args.func(args)
  File "c:\users\thomasaar\.conda\envs\py7\lib\site-packages\asv\commands\__init__.py", line 49, in run_from_args
    return cls.run_from_conf_args(conf, args)
  File "c:\users\thomasaar\.conda\envs\py7\lib\site-packages\asv\commands\machine.py", line 40, in run_from_conf_args
    return cls.run(**vars(args))
  File "c:\users\thomasaar\.conda\envs\py7\lib\site-packages\asv\commands\machine.py", line 54, in run
    use_defaults=use_defaults, **different)
  File "c:\users\thomasaar\.conda\envs\py7\lib\site-packages\asv\machine.py", line 205, in load
    machine_name = d['machine']
KeyError: 'machine'

thomasaarholt avatar Aug 09 '20 19:08 thomasaarholt

@thomasaarholt did you figure this out? I'm having the same issue on github actions

patrick91 avatar Apr 13 '22 05:04 patrick91

Sorry, I did not. :( I don't think I learnt anything more than is written above

thomasaarholt avatar Apr 13 '22 07:04 thomasaarholt

@thomasaarholt thanks for the answers, I think I worked around this by creating the ~/.asv-machine.json file by hand :)

patrick91 avatar Apr 14 '22 17:04 patrick91