`self.perf_patterns` as a dictionary
See original GitHub issueHi, I would like to run the osu-micro-benchmark from size 1 to 4194304 in a single run.
To get the performance metric I am using:
@run_before("performance")
def set_perf_patterns(self):
regex = r"^(?P<size>\d+)\s+(?P<perf>\S+)"
sizes = sn.extractall(regex, self.stdout, "size", int)
perfs = sn.extractall(regex, self.stdout, "perf", float)
self.perf_patterns = dict(zip(sizes, perfs))
But reFrame errors as the dictionary keys are not hashable. Is there a better way to defer this operation?
Thanks
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Self-perpetuating Definition & Meaning - Dictionary.com
Self -perpetuating definition, continuing oneself in office, rank, etc., beyond the normal limit. See more.
Read more >Self-perpetuating Definition & Meaning - Merriam-Webster
The meaning of SELF-PERPETUATING is capable of continuing or renewing oneself indefinitely : capable of perpetuating oneself or itself.
Read more >how to pass self to function inside python dictionary
I'm trying to store a function in python dictionary that minipulates some ranges from the dictionary it self, but I don't how to...
Read more >Get a dictionary from an Objects Fields - GeeksforGeeks
In this article, we will discuss how to get a dictionary from object's field i.e. how to get the class members in the...
Read more >Create a Dictionary in Python – Python Dict Methods
You will learn how to create dictionaries, access the elements inside them, and how to modify them depending on your needs.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @yellowhat ! I can see a few things that could help here.
osext
module underutility
.sn.extractall
builds a deferrable expression (i.e. it captures the arguments passed to the function and it does not evaluate the actual function until you callsn.evaluate
on the returning object). The return object is not hashable, so you can’t use it as keys in any kind of dictionary.Yup, the keys of
perf_patterns
must be strings 👇 https://github.com/eth-cscs/reframe/blob/152d697d59250f30664e7c7502ebf3680fd8af37/reframe/core/pipeline.py#L645