From 04181096cfd2ff845585706adb2ed31969de5327 Mon Sep 17 00:00:00 2001 From: vfdev Date: Tue, 15 Mar 2022 13:15:41 +0100 Subject: [PATCH 1/3] [skip-ci] Fixed get_perf in jacobians_hessians --- notebooks/jacobians_hessians.ipynb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/notebooks/jacobians_hessians.ipynb b/notebooks/jacobians_hessians.ipynb index 172479ae7..4e46d9111 100644 --- a/notebooks/jacobians_hessians.ipynb +++ b/notebooks/jacobians_hessians.ipynb @@ -252,9 +252,12 @@ " faster = second.times[0]\n", " slower = first.times[0]\n", " gain = (slower-faster)/slower\n", - " if gain < 0: gain *=-1 \n", + " faster_desc = second_descriptor\n", + " if gain < 0:\n", + " gain *=-1\n", + " faster_desc = first_descriptor\n", " final_gain = gain*100\n", - " print(f\" Performance delta: {final_gain:.4f} percent improvement with {second_descriptor} \")" + " print(f\" Performance delta: {final_gain:.4f} percent improvement with {faster_desc} \")" ], "metadata": { "id": "II7r6jBtflUJ" From beea8305b000fa83e023866972f12c4f5775ec87 Mon Sep 17 00:00:00 2001 From: vfdev Date: Tue, 15 Mar 2022 13:19:35 +0100 Subject: [PATCH 2/3] [skip ci] colab nb update --- notebooks/colab/jacobians_hessians_colab.ipynb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/notebooks/colab/jacobians_hessians_colab.ipynb b/notebooks/colab/jacobians_hessians_colab.ipynb index b2c2e39b0..6e102aed6 100644 --- a/notebooks/colab/jacobians_hessians_colab.ipynb +++ b/notebooks/colab/jacobians_hessians_colab.ipynb @@ -483,9 +483,12 @@ " faster = second.times[0]\n", " slower = first.times[0]\n", " gain = (slower-faster)/slower\n", - " if gain < 0: gain *=-1 \n", + " faster_desc = second_descriptor\n", + " if gain < 0:\n", + " gain *=-1\n", + " faster_desc = first_descriptor\n", " final_gain = gain*100\n", - " print(f\" Performance delta: {final_gain:.4f} percent improvement with {second_descriptor} \")\n", + " print(f\" Performance delta: {final_gain:.4f} percent improvement with {faster_desc} \")", " " ], "metadata": { @@ -1117,4 +1120,4 @@ "outputs": [] } ] -} \ No newline at end of file +} From a1482b3f56d8f7f8006925fe3ab456ed9247a10a Mon Sep 17 00:00:00 2001 From: vfdev Date: Tue, 15 Mar 2022 13:20:42 +0100 Subject: [PATCH 3/3] [skip ci] fixed \n --- notebooks/colab/jacobians_hessians_colab.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/colab/jacobians_hessians_colab.ipynb b/notebooks/colab/jacobians_hessians_colab.ipynb index 6e102aed6..4ec371e5a 100644 --- a/notebooks/colab/jacobians_hessians_colab.ipynb +++ b/notebooks/colab/jacobians_hessians_colab.ipynb @@ -488,7 +488,7 @@ " gain *=-1\n", " faster_desc = first_descriptor\n", " final_gain = gain*100\n", - " print(f\" Performance delta: {final_gain:.4f} percent improvement with {faster_desc} \")", + " print(f\" Performance delta: {final_gain:.4f} percent improvement with {faster_desc} \")\n", " " ], "metadata": {