Skip to content
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

collect-outputs util #1986

Merged
merged 26 commits into from
Nov 15, 2023
Merged

collect-outputs util #1986

merged 26 commits into from
Nov 15, 2023

Conversation

jprokos26
Copy link
Contributor

@jprokos26 jprokos26 commented Aug 25, 2023

Can be utilized to generate evaluation tables automatically utilizing various flags.
Organize by performer, attack type, or any other config field.
Additionally clean up your output directory automatically.

  • Remove folders with just armory-log.txt and colored-log.txt
  • Remove pairs of duplicate png images from saved_samples
  • Removed files are placed in ~/.armory/outputs/.cleaned

Example:
After running:

cd ~/git/twosixlabs/gard-evaluatsion/MITM_sleeper_agent/jprokos26
python3 -m armory utils collect-outputs --collate --glob "*Poison*.json" --sort --filter "diffusion"
cp -Lr ~/.armory/results/SleeperAgentAttack* .
git commit -am "Adding diffusion sleeper results"

Note, cwd affects href link for config paths
See https://github.com/twosixlabs/gard-evaluations/tree/eval7-jp-MITM_sleeper/MITM_sleeper_agent/jprokos26 for output

@jprokos26 jprokos26 self-assigned this Aug 25, 2023
armory/data/utils.py Outdated Show resolved Hide resolved
@jprokos26 jprokos26 changed the title (WIP) collect-outputs util collect-outputs util Sep 12, 2023
@jprokos26 jprokos26 marked this pull request as ready for review September 12, 2023 20:30
Copy link
Contributor

@christopherwoodall christopherwoodall left a comment

Choose a reason for hiding this comment

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

The suggestion below does not prohibit the inclusion of this branch.

armory/cli/tools/collect_outputs.py Outdated Show resolved Hide resolved
@jprokos26
Copy link
Contributor Author

Need to add flag to change where it is looking for results files instead of just ARMORY_OUTPUT_DIR

@jprokos26
Copy link
Contributor Author

jprokos26 commented Sep 25, 2023

Addressed by 723c810.

Stale:
Add runtime field. Can be extracted from armory-log.txt

for file in SleeperAgentAttack/*/armory-log.txt; do echo -n $(basename $(find $(dirname $file) -name "*.json")); echo -n " - "; tail -n 1 $file | cut -d" " -f3; done

@jprokos26
Copy link
Contributor Author

Copy link
Contributor

@swsuggs swsuggs left a comment

Choose a reason for hiding this comment

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

Acknowledging that this tool is not comprehensive but will still be useful for eval 8. The JATIC armory-library will accomplish similar goals via MLFlow.

@jprokos26 jprokos26 merged commit c52d5bb into twosixlabs:develop Nov 15, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants