You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ASV Profiling doesn't work with multiply file resolutions #2
In some of our benchmarks (mpas_ocean specifically) there is a test of two files, 120km and 480km. Profiling fails when this is the case. Changing the code to only use one file allows profiling to work again:
class ConstructTreeStructures:
def setup(self):
self.uxds = ux.open_dataset(file_path_dict['120km'][0], file_path_dict['120km'][1])
def teardown(self):
del self.uxds
def time_kd_tree(self):
self.uxds.uxgrid.get_kd_tree()
def time_ball_tree(self):
self.uxds.uxgrid.get_ball_tree()
Running asv profile mpas_ocean.ConstructTreeStructures.time_kd_tree --python=same --gui=snakeviz with the normal unchanged class gives an error: mpas_ocean.ConstructTreeStructures.time_kd_tree' benchmark not found. Is there a way around this, or is this a problem on our end?
The benchmarks with two resolutions are parameterized, which makes sense that it fail with asv profile since it expects a single run of a benchmark (i.e. only one of the parameters)
Activity
philipc2 commentedon Sep 9, 2024
Hi @aaronzedwick
The benchmarks with two resolutions are parameterized, which makes sense that it fail with
asv profilesince it expects a single run of a benchmark (i.e. only one of the parameters)You may find this usefull.
Can you try running the following:
asv profile mpas_ocean.ConstructTreeStructures.time_kd_tree("120km") --python=same --gui=snakevizEDIT: the following might work:
asv profile 'mpas_ocean.ConstructTreeStructures.time_kd_tree\("120km"\)' --python=same --gui=snakevizaaronzedwick commentedon Sep 10, 2024
Hey @philipc2,
It still says
'mpas_ocean.ConstructTreeStructures.time_kd_tree\("120km"\)' benchmark not found.philipc2 commentedon Sep 10, 2024
Interesting, I'll look into it.