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

benchmark: analyze and py36-friendliness #569

Closed
tiborsimko opened this issue Oct 28, 2021 · 0 comments · Fixed by #570
Closed

benchmark: analyze and py36-friendliness #569

tiborsimko opened this issue Oct 28, 2021 · 0 comments · Fixed by #570
Assignees

Comments

@tiborsimko
Copy link
Member

The benchmark script is being run on CentOS7/CentOS8 boxes where python3 version is still 3.6.

All commands work except for analyze:

$ python reana_bench.py analyze -w susyewkfullhad-boosted-nosys-run-10
...
File "/reana_bench.py", line 433, in analyze
  processed_results = _derive_metrics(original_results)
File "/reana_bench.py", line 223, in _derive_metrics
  df = _pre_process_results(df)
File "/reana_bench.py", line 215, in _pre_process_results
  df["started"] = _convert_str_date_to_epoch(df["started"])
File "/reana_bench.py", line 181, in _convert_str_date_to_epoch
  lambda x: int(time.mktime(datetime.fromisoformat(x).timetuple()))
File "/_venv/lib64/python3.6/site-packages/pandas/core/series.py", line 4213, in apply
  mapped = lib.map_infer(values, f, convert=convert_dtype)
File "pandas/_libs/lib.pyx", line 2403, in pandas._libs.lib.map_infer
File "/reana_bench.py", line 181, in <lambda>
  lambda x: int(time.mktime(datetime.fromisoformat(x).timetuple()))
AttributeError: type object 'datetime.datetime' has no attribute 'fromisoformat'
$ python -V
Python 3.6.8

It would be good to amend the script to make it py36 friendly so that all the benchmarking steps will be runnable.

@VMois VMois self-assigned this Oct 29, 2021
VMois pushed a commit to VMois/reana that referenced this issue Oct 29, 2021
- replaces datetime.fromisoformat with datetime.strptime as former is not supported in py36

closes reanahub#569
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants