From 8872d03d9bc9f6c1384b540ab889f64e918e543d Mon Sep 17 00:00:00 2001 From: Pramit Kumar Dutta Date: Thu, 13 Jun 2024 13:37:57 +0530 Subject: [PATCH] update --- playbooks/besman-counterfit-0.0.1-steps.ipynb | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/playbooks/besman-counterfit-0.0.1-steps.ipynb b/playbooks/besman-counterfit-0.0.1-steps.ipynb index ae206a4..697f46a 100644 --- a/playbooks/besman-counterfit-0.0.1-steps.ipynb +++ b/playbooks/besman-counterfit-0.0.1-steps.ipynb @@ -19,7 +19,7 @@ "Open a new terminal in your machine and run the below steps\n", "\n", "#### 1. Change directory to counterfit\n", - "`cd counterfit`\n", + "`cd ~/counterfit`\n", "\n", "#### 2. Activate conda environment.\n", "`conda activate counterfit`\n", @@ -27,7 +27,7 @@ "#### 3. Activate counterfit.\n", "`counterfit`\n", "\n", - "verify that the prompt changes to \\(coounterfit>\\)\n", + "verify that the prompt changes to \\(counterfit>\\)\n", "\n", "#### 4. List available targets\n", "`list targets`\n", @@ -40,9 +40,11 @@ " The new target name should be same as BESMAN_ARTIFACT_NAME and should have been git cloned. \n", "\n", "#### 6. Copy the model files to counterfit target. \\(This step is applicable only if the target is not available in list\\) \n", - "`cp -f /counterfit/.py counterfit/targets/.py`\n", - "`cp -f /counterfit/.npz counterfit/targets//.npz`\n", - "`cp -f /.h5 counterfit/targets//.h5`\n", + "`cp -f /counterfit/.py counterfit/targets/`\n", + "\n", + "`cp -f /counterfit/.npz counterfit/targets//`\n", + "\n", + "`cp -f /.h5 counterfit/targets//`\n", "\n", "#### 7. List available targets\n", "`list targets`\n", @@ -67,16 +69,18 @@ "#### 11. Test model without attack.\n", "`predict -i `\n", "\n", - "sample_index is the index of file given as input to the model under test. The model is provided with a set of input bundled in a .npz file (This file is expected to be created when we the tartget folder under counterfit is created). Based on the index number in this command the input will be feed to the model for prediction.\n", + "sample_index is the index of file given as input to the model under test. The model is provided with a set of input bundled in a .npz file (This file is expected to be created when we the tartget folder under counterfit is created). Based on the index number in this command the input will be feed to the model for prediction. Please check the index number range from the model documentation.\n", "\n", "Verify that the model predicts the output as expected.\n", "\n", "#### 12. Now set the model prameters for attack.\n", + "\n", + "To execute the attack, the user needs to configure several parameters in Counterfit. These parameters can be viewed using the `show options` command. To set the parameters use the command below.\n", + "\n", "`set_params value\\\">`\n", "\n", "e.g set_params --sample_index=5 --max_eval 5000 --max_iter 10\n", "\n", - "To know the parameters use `show options` command.\n", "\n", "#### 13. Run the attcack\n", "`run`\n", @@ -84,6 +88,8 @@ "#### 14. Check the model output now \n", "`predict -a`\n", "\n", + "In this step, the user can compare the prediction with the output from step 11. They can verify if the prediction after the attack differs from the prediction before the attack in step 11.\n", + "\n", "#### 15. Save the results\n", "`save -r`\n", "\n",