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

generate_gantt_chart fails on logfile #2982

Open
SiegfriedWagner opened this issue Aug 1, 2019 · 2 comments · May be fixed by #3290
Open

generate_gantt_chart fails on logfile #2982

SiegfriedWagner opened this issue Aug 1, 2019 · 2 comments · May be fixed by #3290

Comments

@SiegfriedWagner
Copy link

SiegfriedWagner commented Aug 1, 2019

Summary

generate_gantt_chart fails on generating charts based on profiler log file

Actual behavior

Exception occurs:

Traceback (most recent call last):
File "./profiler_chart.py", line 2, in
generate_gantt_chart('/mnt/connectomics/profiler.log', cores=4)
File "/home/siegfriedwagner/.local/lib/python3.6/site-packages/nipype-1.2.0-py3.6.egg/nipype/utils/draw_gantt_chart.py", line 507, in generate_gantt_chart
duration = (last_node['finish'] - start_node['start']).total_seconds()
TypeError: unsupported operand type(s) for -: 'str' and 'str'

Expected behavior

Graph generates flawlessly

How to replicate the behavior

Run script presented bellow on log from https://gist.github.com/SiegfriedWagner/891bb05bff3cb8224f23915634672a83

Script/Workflow details

from nipype.utils.draw_gantt_chart import generate_gantt_chart
generate_gantt_chart('profiler.log', cores=4)

Platform details:

{'commit_hash': 'a0f756d1c',
 'commit_source': 'installation',
 'networkx_version': '2.3',
 'nibabel_version': '2.4.1',
 'nipype_version': '1.2.0',
 'numpy_version': '1.17.0',
 'pkg_path': '/home/siegfriedwagner/.local/lib/python3.6/site-packages/nipype-1.2.0-py3.6.egg/nipype',
 'scipy_version': '1.3.0',
 'sys_executable': '/usr/bin/python',
 'sys_platform': 'linux',
 'sys_version': '3.6.8 (default, Jan 14 2019, 11:02:34) \n'
                '[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]]',
 'traits_version': '5.1.2'}

Execution environment

Choose one

  • My python environment outside container
@shnizzedy
Copy link
Member

shnizzedy commented Jan 8, 2021

I ran into this issue as well and fixed it for my own purpose. I'll put in a PR with the fix.

@shnizzedy shnizzedy linked a pull request Jan 8, 2021 that will close this issue
9 tasks
@shnizzedy
Copy link
Member

With the changes in #3290,

from nipype.utils.draw_gantt_chart import generate_gantt_chart
generate_gantt_chart('profiler.log', cores=4)

with profiler.log from this issue results in a chart like this:
profiler.log.html

In the PR's comments, the issue of the large values in runtime_threads in the logfile is noted.

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 a pull request may close this issue.

2 participants