asv
asv copied to clipboard
Several issues with setting machine info
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:
- Calling
asv machine --name testresults in the following response when~/.asv-machine.jsondoes not exist. The hostname in this case issmnpc-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.
- Calling
asv machine --"specifying all options and setting --machine hostnameresults in the following error and no file generated, when~/.asv-machine.jsondoes 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 did you figure this out? I'm having the same issue on github actions
Sorry, I did not. :( I don't think I learnt anything more than is written above
@thomasaarholt thanks for the answers, I think I worked around this by creating the ~/.asv-machine.json file by hand :)