Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix benchmark comparing script for mismatching ranges #2914

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

siddarthkay
Copy link
Contributor

@siddarthkay siddarthkay commented Dec 5, 2024

Summary

This PR modifies the benchmark comparing script.

I faced the following issue initially on bench-01

python /home/data/nimbus-eth1-mainnet-master-short-benchmark/
repo/scripts/block-import-stats.py /home/data/nimbus-eth1-benchmarks/blocks-import-benchmark.csv 
/home/data/nimbus-eth1-benchmarks/short-benchmark/20241205T134425_3878071/blocks-import-benchmark.csv
Traceback (most recent call last):
  File "/home/data/nimbus-eth1-mainnet-master-short-benchmark/repo/scripts/block-import-stats.py", 
  line 80, in <module>
    baseline = baseline.loc[baseline.index >= start and baseline.index <= end]
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

update: I later learnt that this issue was caused because of mismatching ranges in csv files that were being passed as the arguments to this script.

We now warn about the error and exit gracefully with a code of 1 instead of crashing.

@siddarthkay siddarthkay self-assigned this Dec 5, 2024
@siddarthkay siddarthkay force-pushed the update-import-stats-script branch from ca63f8b to afbbfb8 Compare December 6, 2024 08:24
@siddarthkay siddarthkay changed the title fix benchmark comparing script for numpy arrays fix benchmark comparing script for mismatching ranges Dec 6, 2024
@siddarthkay siddarthkay force-pushed the update-import-stats-script branch from afbbfb8 to ac53a53 Compare December 6, 2024 09:58
@arnetheduck arnetheduck merged commit 72d0803 into master Dec 6, 2024
10 checks passed
@arnetheduck arnetheduck deleted the update-import-stats-script branch December 6, 2024 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants