radical-cybertools / radical.analytics

Analytics for RADICAL-Cybertools
Other
1 stars 1 forks source link

Error could not convert string to float: '198.202.119.32' #136

Closed AymenFJA closed 3 years ago

AymenFJA commented 3 years ago

Using radical.analytics to read RP session fails with the following:


ValueError                                Traceback (most recent call last)
<ipython-input-9-b59662cf0eff> in <module>
      2 for sid in suds:
      3     sp = sdir+sid
----> 4     ss[sid] = {'s': ra.Session(sp, 'radical.pilot')}
      5     ss[sid].update({'p': ss[sid]['s'].filter(etype='pilot'   , inplace=False),
      6                     'u': ss[sid]['s'].filter(etype='unit'    , inplace=False)})

~/anaconda3/envs/conda-env/lib/python3.6/site-packages/radical/analytics/session.py in __init__(self, src, stype, sid, _entities, _init)
    105 
    106             self._profile, accuracy, hostmap \
--> 107                               = rpu.get_session_profile    (sid=sid, src=self._src)
    108             self._description = rpu.get_session_description(sid=sid, src=self._src)
    109 

~/anaconda3/envs/conda-env/lib/python3.6/site-packages/radical/pilot/utils/prof_utils.py in get_session_profile(sid, src)
    591                          ]}
    592 
--> 593     profiles          = ru.read_profiles(profiles, sid, efilter=efilter)
    594     profile, accuracy = ru.combine_profiles(profiles)
    595     profile           = ru.clean_profile(profile, sid, s.FINAL, s.CANCELED)

~/anaconda3/envs/conda-env/lib/python3.6/site-packages/radical/utils/profile.py in read_profiles(profiles, sid, efilter)
    388                     row.extend([None] * (PROF_KEY_MAX - len(row)))
    389 
--> 390                     row[TIME] = float(row[TIME])
    391 
    392                     # we derive entity type from the uid -- but funnel

ValueError: could not convert string to float: '198.202.119.32'

My Radical-Stack:

  python               : /home/aymen/anaconda3/envs/conda-env/bin/python3
  pythonpath           : 
  version              : 3.6.10
  virtualenv           : conda-env

  radical.analytics    : 1.5.0
  radical.gtod         : 1.5.0
  radical.pilot        : 1.5.11
  radical.saga         : 1.5.9
  radical.utils        : 1.5.9

I have no idea how an IP address ended up here. The session file is attached below. rp.session.comet-ln2.sdsc.edu.aymen.018659.0001.zip

mtitov commented 3 years ago

@AymenFJA hotfix/stage_bs_0 RP branch resolves this issue (link). But to fix the current profiles need to edit file <sid>/pilot.0000/bootstrap_0.prof manually:

1612209054.0000,sync_abs,bootstrap_0,MainThread,pilot.0000,PMGR_ACTIVE_PENDING,comet-17-16.sdsc.edu:10.22.251.183
198.202.119.32
10.21.251.183:1612209054:1612209054:1612209054

convert into one line

1612209054.0000,sync_abs,bootstrap_0,MainThread,pilot.0000,PMGR_ACTIVE_PENDING,comet-17-16.sdsc.edu:10.22.251.183:1612209054:1612209054
AymenFJA commented 3 years ago

Indeed, worked like a charm. Thank you so much @mtitov 💯 . I will close this ticket now.