Skip to content

LRLBuff manipulates attempt.outputs #791

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

Open
leondz opened this issue Jul 18, 2024 · 1 comment
Open

LRLBuff manipulates attempt.outputs #791

leondz opened this issue Jul 18, 2024 · 1 comment
Labels
buffs Functions related to buffs (fuzzing/augmentation) bug Something isn't working

Comments

@leondz
Copy link
Collaborator

leondz commented Jul 18, 2024

   def untransform(self, attempt: garak.attempt.Attempt) -> garak.attempt.Attempt:
        translator = Translator(self.api_key)
        outputs = attempt.outputs
        attempt.notes["original_responses"] = outputs
        translated_outputs = list()
        for output in outputs:
            response = translator.translate_text(output, target_lang="EN-US")
            translated_output = response.text
            translated_outputs.append(translated_output)
        attempt.outputs = translated_outputs
        return attempt

this disrupts attempt logic - should manipulate attempt.messages or even better have this abstracted away so that external general buff management logic handles the updating

@leondz leondz added bug Something isn't working buffs Functions related to buffs (fuzzing/augmentation) labels Jul 18, 2024
@leondz
Copy link
Collaborator Author

leondz commented Apr 18, 2025

paging Turn #1089

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
buffs Functions related to buffs (fuzzing/augmentation) bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant