Skip to content
Open
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
51 changes: 49 additions & 2 deletions notebooks/01_thicket_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,55 @@
"tags": []
},
"source": [
"## 4. Thicket Components\n",
"## 4. Thicket Components"
]
},
{
"cell_type": "markdown",
"id": "3fe4f805",
"metadata": {},
"source": [
"### 4.i Profiles\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is section 4.i? I see that you're using 4.1, 4.2, .. going forward.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to distinguish the profiles section from the other sections, since we historically haven't had users interface with the profile objects. But they could just be 4.1 Profiles, 4.2 Performance Data, ...

"\n",
"The file paths for performance profiles are represented as integer hashes in Thicket. The mapping between the integer hashes and the performance profile paths can be accessed in the `Thicket.profile_mapping` dictionary"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "332798db",
"metadata": {},
"outputs": [],
"source": [
"th_lassen.profile_mapping"
]
},
{
"cell_type": "markdown",
"id": "569b2677",
"metadata": {},
"source": [
"#### Filtering Profiles\n",
"\n",
"We can filter for specific profiles using the `Thicket.filter_profiles()` function. Lets say we only want the profiles with a problem size less than 4 milion. We can either read in the files for 1 and 2 million into a new Thicket, or we can filter the existing Thicket object, which is shown below."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2127de91",
"metadata": {},
"outputs": [],
"source": [
"th_less_4m = th_lassen.filter_profile([1814734126, 3448088579])\n",
"th_less_4m.profile_mapping"
]
},
{
"cell_type": "markdown",
"id": "a9572ecd",
"metadata": {},
"source": [
"### 4.1 Performance Data\n",
"\n",
"The performance data table is a multi-dimensional, multi-indexed component of thicket. The rows represent nodes that each contain a different execution (i.e., profile index) of the associated call tree node. \n",
Expand Down Expand Up @@ -1172,7 +1219,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
"version": "3.11.7"
},
"papermill": {
"default_parameters": {},
Expand Down