rapidsai / asvdb

Apache License 2.0
9 stars 4 forks source link

Cannot open ASV results #11

Open kevingerman opened 2 years ago

kevingerman commented 2 years ago

Given a set of results generated by ASV.

run asvdb --read-from .asv/results

Traceback (most recent call last):
  File "/raid/kgerman/miniconda/envs/cuml_integrations/bin/asvdb", line 10, in <module>
    sys.exit(main())
  File "/raid/kgerman/miniconda/envs/cuml_integrations/lib/python3.7/site-packages/asvdb/__main__.py", line 210, in main
    results = fromDb.getResults()
  File "/raid/kgerman/miniconda/envs/cuml_integrations/lib/python3.7/site-packages/asvdb/asvdb.py", line 314, in getResults
    retList = self.__readResults(filterByInfoObjs=filterInfoObjList)
  File "/raid/kgerman/miniconda/envs/cuml_integrations/lib/python3.7/site-packages/asvdb/asvdb.py", line 430, in __readResults
    paramValues = benchmarkResults["params"]
TypeError: 'NoneType' object is not subscriptable
kevingerman commented 2 years ago

Use get(...) rather than a subscript operator for dictionaries that are not guaranteed.

kevingerman commented 2 years ago

resultsDict as loaded in asvdb.__readResults from example asv repo after running tests on 2 commits.

{'benchmarks.TimeSuite.time_iterkeys': None, 
 'benchmarks.TimeSuite.time_keys': {'result': [4.48418541860542e-06], 
                                    'stats': [{'ci_99': [4.419229513591593e-06, 4.511339304142789e-06], 
                                    'q_25': 4.4214059128019056e-06, 
                                    'q_75': 4.500477187308486e-06, 
                                    'min': 4.419229513591593e-06, 
                                    'max': 4.511339304142789e-06, 
                                    'mean': 4.4668072319251605e-06, 
                                    'std': 3.871945876470857e-08, 
                                    'repeat': 10, 'number':
2483}]}, 
 'benchmarks.TimeSuite.time_range': {'result': [1.892170005048495e-05], 
                                     'stats': [{'ci_99': [1.8832339729875686e-05, 1.9068647954542195e-05], 
                                                'q_25': 1.8857343891226977e-05,
                                                'q_75': 1.8994659281919657e-05,
                                                'min': 1.8832339729875686e-05,
                                                'max': 1.9068647954542195e-05,
                                                'mean': 1.8935457566859186e-05,
                                                'std': 8.450629048853587e-08,
                                                'repeat': 10, 'number': 579}]},
 'benchmarks.TimeSuite.time_xrange': None, 
 'benchmarks.MemSuite.mem_list': 2120}