From 1d9f62988c79d77d8d53979b8bcc6cbe7bf1015f Mon Sep 17 00:00:00 2001 From: Michael Richard Mckinsey Date: Tue, 2 Jul 2024 11:08:20 -0700 Subject: [PATCH 1/2] Add filter_profile doc --- notebooks/01_thicket_tutorial.ipynb | 51 +++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/notebooks/01_thicket_tutorial.ipynb b/notebooks/01_thicket_tutorial.ipynb index 3e8d1c78..39228034 100644 --- a/notebooks/01_thicket_tutorial.ipynb +++ b/notebooks/01_thicket_tutorial.ipynb @@ -181,8 +181,55 @@ "tags": [] }, "source": [ - "## 4. Thicket Components\n", + "## 4. Thicket Components" + ] + }, + { + "cell_type": "markdown", + "id": "3fe4f805", + "metadata": {}, + "source": [ + "### 4.i Profiles\n", "\n", + "The file paths we provide for our performance profiles are hashed in Thicket and represented as integers. The mapping between the integer hashes and the 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", @@ -1172,7 +1219,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.12" + "version": "3.11.7" }, "papermill": { "default_parameters": {}, From a137214d24435beaf1d560acf46680a684d22691 Mon Sep 17 00:00:00 2001 From: Michael Richard Mckinsey Date: Tue, 2 Jul 2024 11:11:41 -0700 Subject: [PATCH 2/2] Update wording --- notebooks/01_thicket_tutorial.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/01_thicket_tutorial.ipynb b/notebooks/01_thicket_tutorial.ipynb index 39228034..339eb7ad 100644 --- a/notebooks/01_thicket_tutorial.ipynb +++ b/notebooks/01_thicket_tutorial.ipynb @@ -191,7 +191,7 @@ "source": [ "### 4.i Profiles\n", "\n", - "The file paths we provide for our performance profiles are hashed in Thicket and represented as integers. The mapping between the integer hashes and the profile paths can be accessed in the `Thicket.profile_mapping` dictionary" + "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" ] }, {