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

feat(bench): support safety attack #851

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open

Conversation

Kunlun-Zhu
Copy link
Member

Closes #

πŸ“‘ Description

βœ… Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed
  • Branch name follows type/descript (e.g. feature/add-llm-agents)
  • Ready for code review

β„Ή Additional Information

@Kunlun-Zhu Kunlun-Zhu requested a review from lwaekfjlk November 6, 2024 21:51
Copy link

codecov bot commented Nov 6, 2024

Codecov Report

Attention: Patch coverage is 0% with 87 lines in your changes missing coverage. Please review.

Project coverage is 68.50%. Comparing base (159a725) to head (dcf7fe3).

Files with missing lines Patch % Lines
research_bench/run_attack.py 0.00% 59 Missing ⚠️
research_bench/proposal_writing.py 0.00% 28 Missing ⚠️
@@            Coverage Diff             @@
##             main     #851      +/-   ##
==========================================
- Coverage   70.15%   68.50%   -1.66%     
==========================================
  Files          80       81       +1     
  Lines        3569     3655      +86     
==========================================
  Hits         2504     2504              
- Misses       1065     1151      +86     
Files with missing lines Coverage Ξ”
research_bench/proposal_writing.py 0.00% <0.00%> (ΓΈ)
research_bench/run_attack.py 0.00% <0.00%> (ΓΈ)

Copy link
Member

Choose a reason for hiding this comment

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

please ignore this dataset file. This should not be included.

pyproject.toml Outdated
Copy link
Member

Choose a reason for hiding this comment

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

this dependency was changed due to @chengzr01 's suggestions. maybe we need to double consider that.

It works well on server deployment. Is the error related to poetry version? Maybe we need to set it as >=2.2.1 < 2.5.0

with open('./adversarial_prompts.json', 'r', encoding='utf-8') as f:
adversarial_data = json.load(f)

# 读取 task.csv ζ–‡δ»ΆεΉΆζž„ε»Ί task 到 domain ηš„ζ˜ ε°„
Copy link
Member

Choose a reason for hiding this comment

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

avoid chinese character in the code.

raise ValueError('Failed to generate proposal')


def write_proposal_researchtown_nodb(
Copy link
Member

Choose a reason for hiding this comment

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

what does this nodb stands for? you init db class, right?

@@ -29,8 +29,14 @@ def __init__(
@beartype
def on_enter(self, **context: Any) -> None:
# Assign leader and members from context or sample them
self.leader = context.get('leader', self.agent_manager.sample_leader())
self.members = context.get('members', self.agent_manager.sample_members())
if context.get('leader') is None:
Copy link
Member

Choose a reason for hiding this comment

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

can you help change all the things in all environment files here? this is a potential bug in research-town

@Kunlun-Zhu Kunlun-Zhu requested a review from lwaekfjlk November 27, 2024 20:36
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.

2 participants