8000 Release v1.2.0 by slabasan · Pull Request #200 · hatchet/hatchet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Release v1.2.0 #200

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

Merged
merged 1 commit into from
Jul 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
# v1.2.0 (2020-07-07)

This release adds a syntax query language as an alternative method for
filtering the graph. It also refreshes the tree printout with an updated
format and legend.

### New features

* Add graph syntax query language to filter the graph
* Update HPCToolkit reader to handle sec or usec time units

### Changes to existing APIs

* Add squash parameter to filter function to perform filter and squash in a
single call
* Filter function takes an object, which can be a user-supplied function or a
query object
* Tree printout format updated
* Tree printout API parameter changes:
- Removed parameters: ``color`` deprecated (color determined based on terminal support),
``threshold``, and ``unicode``
- Changed parameters: ``metric`` changed to ``metric_column``, ``name`` changed to
``name_column``, ``invert_colors`` changed to ``invert_colormap``,
``expand_names`` changed to ``expand_name``, and ``context`` changed to
``context_column``
- added ``highlight_name`` to highlight user code (from non-user code)

### Bugfixes

* Sort nodes in union and tree printout by their frame
* Fix squash edge case where multiple parents are the same

# v1.1.0 (2020-05-07)

This release adds new analysis operators, as well as some bugfixes and minor
Expand All @@ -8,7 +40,7 @@ changes.
* Add GraphFrame reindex operator
* Query hatchet module version

### Changes to existing APIs changes
### Changes to existing APIs

* Add depth parameter to tree printout

Expand Down
4 changes: 2 additions & 2 deletions docs/advanced_examples.rst
10000
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ biggest offenders.
squashed_gf2 = filtered_gf2.squash()

diff_gf = squashed_gf2 - squashed_gf1

sorted_df = diff_gf.dataframe.sort_values(by=['time'], ascending=False)
print(sorted_df)
print(sorted_df)

.. image:: images/lulesh-mpi.png
:scale: 40 %
Expand Down
Binary file added docs/images/query-dataframe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 29 additions & 6 deletions docs/user_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ When the graph represented by the input dataset is small, the user may be intere

.. code-block:: python

print(gf.tree(color=True))
print(gf.tree())

One can also use the ``to_dot()`` function to output the tree as a string in the Graphviz' DOT format. This can be written to a file and then used to display a tree using the ``dot`` or ``neato`` program.

Expand Down Expand Up @@ -149,26 +149,49 @@ Dataframe operations
:scale: 40 %
:align: right

**filter**: ``filter`` takes a user-supplied function and applies that to all
rows in the DataFrame. The resulting Series or DataFrame is used to filter the
DataFrame to only return rows that are true. The returned GraphFrame preserves
the original graph provided as input to the filter operation. The images on the
right show a DataFrame before and after a filter operation.
**filter**: ``filter`` takes a user-supplied function or query object and
applies that to all rows in the DataFrame. The resulting Series or DataFrame is
used to filter the DataFrame to only return rows that are tru 8000 e. The returned
GraphFrame preserves the original graph provided as input to the filter
operation.

.. code-block:: python

filtered_gf = gf.filter(lambda x: x['time'] > 10.0)

The images on the right show a DataFrame before and after a filter
operation.

.. image:: images/filter-dataframe.png
:scale: 40 %
:align: right

An alternative way to filter the DataFrame is to supply a query object. The
example below looks for a path that matches first a single node with name
`solvers`, followed by 0 or more nodes with an inclusive time greater than 10,
followed by a single node with name that starts with `p` and ends in an integer
and has an inclusive time greater than or equal to 10.

Filter is one of the operations that leads to the graph object and DataFrame
object becoming inconsistent. After a filter operation, there are nodes in the
graph that do not return any rows when used to index into the DataFrame.
Typically, the user will perform a squash on the GraphFrame after a filter
operation to make the graph and DataFrame objects consistent again.

.. image:: images/query-dataframe.png
:scale: 35 %
:align: right

.. code-block:: python

query = [
{"name": "solvers"},
("*", {"time (inc)": "> 10"}),
{"name": "p[a-z]+[0-9]", "time (inc)": ">= 10"}
]

filtered_gf = gf.filter(query)

**drop_index_levels**: When there is per-MPI process or per-thread
data in the DataFrame, a user might be interested in aggregating the data in
some fashion to analyze the graph at a coarser granularity. This function
Expand Down
B6C7 2 changes: 1 addition & 1 deletion hatchet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
from .graphframe import GraphFrame
from .query_matcher import QueryMatcher

__version_info__ = ("1", "1", "0")
__version_info__ = ("1", "2", "0")
__version__ = ".".join(__version_info__)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "hatchet"
version = "1.1.0"
version = "1.2.0"
description = "A Python library for analyzing hierarchical performance data."
authors = [
"Abhinav Bhatele <bhatele@cs.umd.edu>",
Expand Down
0