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: add complete implementation of CLEAR dataset #3466

Merged
merged 4 commits into from
Mar 25, 2025
Merged

Conversation

suhana13
Copy link
Collaborator

Added the full implementation of the CLEAR Dataset (https://www.nature.com/articles/s41746-024-01377-1). Earlier, we had just implemented it for checking "alcohol dependence". Now, it integrates all 13 conditions from the source paper (including bipolar, chronic pain etc.)

@MiguelAFH, @aunell, @HennyJie (tagging just as FYI)

@yifanmai - let me know if any additional changes are needed!

Copy link
Collaborator

@yifanmai yifanmai left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

One thing to note is that this will send 1000 requests per condition for a total of 12k requests. If you want to reduce the total number of requests, you can set a lower number of requests on the run entry using the max_eval_instances=100 run expander.


self.condition = condition
self.name = f"clear_{condition}"
self.description = f"A dataset for evaluating {self.CONDITION_PROMPTS[condition]} detection from patient notes with yes/no/maybe classifications."
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add # noqa: E501 at the end of this line to make the linter happy.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thank you! Fixed!

@yifanmai
Copy link
Collaborator

You need two spaces before the #:

-        self.description = f"A dataset for evaluating {self.CONDITION_PROMPTS[condition]} detection from patient notes with yes/no/maybe classifications." # noqa: E501
+        self.description = f"A dataset for evaluating {self.CONDITION_PROMPTS[condition]} detection from patient notes with yes/no/maybe classifications."  # noqa: E501

),
input_noun=None,
output_noun="Respond only with 'A', 'B', or 'C'. Do not add any other text, punctuation, or symbols",
max_train_instances=0,
max_eval_instances=100,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do this in the run entry instead of the run expander.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done!

{description: "clear:model=qwen/qwen2.5-7b-instruct,model_deployment=huggingface/qwen2.5-7b-instruct-4bit", priority: 1},
{description: "clear:model=microsoft/phi-3.5-mini-instruct,model_deployment=huggingface/phi-3.5-mini-instruct-4bit", priority: 1},
#Alcohol Dependence
{description: "clear:condition=alcohol_dependence,model=google/gemini-1.5-pro-001,model_deployment=stanfordhealthcare/gemini-1.5-pro-001", priority: 1},
Copy link
Collaborator

Choose a reason for hiding this comment

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

add max_eval_instances=100, here and below. (if desired)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done!

@yifanmai yifanmai merged commit 82f9d58 into main Mar 25, 2025
8 checks passed
@yifanmai yifanmai deleted the medhelm-clear-full branch March 25, 2025 05:32
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