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

fix bad nonetype handling in atkgen probe #538

Merged
merged 1 commit into from
Mar 4, 2024
Merged

Conversation

leondz
Copy link
Owner

@leondz leondz commented Mar 4, 2024

fixes

πŸ”΄πŸͺ–  🦜 loading generator: Hugging Face πŸ€— pipeline: leondz/artgpt2tox
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_mainβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Š                                                                                                                                                                                                                                                                                     | 1/10 [00:02<00:22,  2.51s/it]
  File "<frozen runpy>", line 88, in _run_code
  File "/home/leon/garak/garak/__main__.py", line 13, in <module>
    main()
  File "/home/leon/garak/garak/__main__.py", line 9, in main
    cli.main(sys.argv[1:])
  File "/home/leon/garak/garak/cli.py", line 476, in main
    command.probewise_run(generator, probe_names, evaluator, buff_names)
  File "/home/leon/garak/garak/command.py", line 214, in probewise_run
    probewise_h.run(generator, probe_names, evaluator, buffs)
  File "/home/leon/garak/garak/harnesses/probewise.py", line 108, in run
    h.run(model, [probe], detectors, evaluator, announce_probe=False)
  File "/home/leon/garak/garak/harnesses/base.py", line 95, in run
    attempt_results = probe.probe(model)
                      ^^^^^^^^^^^^^^^^^^
  File "/home/leon/garak/garak/probes/atkgen.py", line 139, in probe
    response = generator.generate(challenge)[0].strip()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'strip'

@leondz leondz merged commit a7a1e00 into main Mar 4, 2024
5 checks passed
@leondz leondz deleted the bugfix/atkgen_none branch March 4, 2024 18:36
@github-actions github-actions bot locked and limited conversation to collaborators Mar 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant