8000 Filter/squash error on HPCToolkit database: `AttributeError: 'int' object has no attribute '_hatchet_nid'` · Issue #481 · hatchet/hatchet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Filter/squash error on HPCToolkit database: AttributeError: 'int' object 8000 has no attribute '_hatchet_nid' #481
Open
@jhdavis8

Description

@jhdavis8

After reading in an HPCToolkit database, I attempt to call filter on the resulting GraphFrame. This results in an AttributeError, apparently coming from the squash call within filter.

I am using the develop branch of Hatchet with Python 3.7, pandas 1.3.5, numpy 1.21.6, multiprocess 0.70.13, matplotlib 3.5.3, textX 3.0.0.

Complete error output:

Traceback (most recent call last):
  File "hatchet-filter-hpctoolkit.py", line 8, in <module>
    fgf = gf.filter(lambda x: "mpi" in x['name'].lower())
  File "/home/jhdavis/repos/hatchet/hatchet/util/logger.py", line 130, in inner
    return function(*args, **kwargs)
  File "/home/jhdavis/repos/hatchet/hatchet/graphframe.py", line 435, in filter
    return filtered_gf.squash()
  File "/home/jhdavis/repos/hatchet/hatchet/util/logger.py", line 130, in inner
    return function(*args, **kwargs)
  File "/home/jhdavis/repos/hatchet/hatchet/graphframe.py", line 528, in squash
    new_gf.update_inclusive_columns()
  File "/home/jhdavis/repos/hatchet/hatchet/graphframe.py", line 677, in update_inclusive_columns
    self.subgraph_sum(self.exc_metrics, self.inc_metrics)
  File "/home/jhdavis/repos/hatchet/hatchet/graphframe.py", line 659, in subgraph_sum
    function(self.dataframe.loc[df_index2, col])
  File "/home/jhdavis/.local/lib/python3.7/site-packages/pandas/core/indexing.py", line 719, in __setitem__
    indexer = self._get_setitem_indexer(key)
  File "/home/jhdavis/.local/lib/python3.7/site-packages/pandas/core/indexing.py", line 656, in _get_setitem_indexer
    return ax.get_loc(key)
  File "/home/jhdavis/.local/lib/python3.7/site-packages/pandas/core/indexes/multi.py", line 2941, in get_loc
    self.slice_locs(lead_key, lead_key) if lead_key else (0, len(self))
  File "/home/jhdavis/.local/lib/python3.7/site-packages/pandas/core/indexes/multi.py", line 2793, in slice_locs
    return super().slice_locs(start, end, step)
  File "/home/jhdavis/.local/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 5887, in slice_locs
    start_slice = self.get_slice_bound(start, "left")
  File "/home/jhdavis/.local/lib/python3.7/site-packages/pandas/core/indexes/multi.py", line 2737, in get_slice_bound
    return self._partial_tup_index(label, side=side)
  File "/home/jhdavis/.local/lib/python3.7/site-packages/pandas/core/indexes/multi.py", line 2813, in _partial_tup_index
    loc = lev.searchsorted(lab, side=side)
  File "/home/jhdavis/.local/lib/python3.7/site-packages/pandas/core/base.py", line 1221, in searchsorted
    return algorithms.searchsorted(self._values, value, side=side, sorter=sorter)
  File "/home/jhdavis/.local/lib/python3.7/site-packages/pandas/core/algorithms.py", line 1601, in searchsorted
    return arr.searchsorted(value, side=side, sorter=sorter)
  File "/home/jhdavis/repos/hatchet/hatchet/node.py", line 153, in __lt__
    return self._hatchet_nid < other._hatchet_nid
AttributeError: 'int' object has no attribute '_hatchet_nid'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0