Closed jdakka closed 4 years ago
the following seems to work for me out of the box:
test.py:
#!/usr/bin/env python
import sys
import pprint
import radical.analytics as ra
session = ra.Session(sys.argv[1], 'radical.pilot')
pilots = session.filter(etype='pilot', inplace=False)
for pilot in pilots.get():
pprint.pprint(pilot.events)
with:
$ tar zxvf rp.session.two.jdakka.017529.0001.zip
$ virtualenv ve
$ source ve/bin/activate
(ve) $ pip install radical.pilot radical.analytics
(ve) $ python test.py rp.session.two.jdakka.017529.0001
Can you give this a try, please?
I tried with the events that I mentioned earlier i.e. bootstrap_1_start
:
for pilot in pilots.get():
for event in pilot.events:
assert 'bootstrap_1_start' in event
I get this error:
Traceback (most recent call last):
File "test.py", line 13, in <module>
assert 'bootstrap_1_start' in event
AssertionError
however if you look inside pilot.0000/bootstrap.prof
you will see:
0.0083,bootstrap_1_start,bootstrap_1,MainThread,pilot.0000,PMGR_ACTIVE_PENDING,
...
2193.5819,bootstrap_1_stop,bootstrap_1,MainThread,pilot.0000,PMGR_ACTIVE_PENDING,
Your loop above will check that all events have a bootstrap_1_start
field - which will fail. You probably want:
found = False
for pilot in pilots.get():
for event in pilot.events:
if 'bootstrap_1_start' in event:
found = True
break
assert(found)
But I get your point - that event is missing indeed. Am I reading this correct though that with this stack, the pilot.events
set is not empty anymore?
This has been resolved via radical-cybertools/radical.utils@5656c60be
I was looking for the following events:
I am able to see these events in the
pilot.0000/*
agent files. However when I run my notebook and tryI do not see the events that I need. All I can retrieve are the
STATES
.Running notebook with
radical-stack
:Running application with RCT
master
rp.session.two.jdakka.017529.0001.zip