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

Benjams/fix bioasq card #1486

Merged
merged 4 commits into from
Jan 7, 2025
Merged

Benjams/fix bioasq card #1486

merged 4 commits into from
Jan 7, 2025

Conversation

BenjSz
Copy link
Collaborator

@BenjSz BenjSz commented Jan 7, 2025

Hi @elronbandel

I made 2 things:
1 - I fixed the bioasq card - we had an error there.

2 - the clapNQ - we point now to the HF for accessing the dataset

However, this main fails on clap_nq!
And I do not succeed to understand why

`from typing import Literal

from datasets import Dataset
from unitxt import load_dataset

def access_to_card(
dataset_name,
card_type: Literal["documents", "benchmark"],
split: Literal["train", "test"],
) -> Dataset:

template = "empty" if card_type == "documents" else "default"
dataset_query = f"card=cards.rag.{card_type}.{dataset_name}.en,template_card_index={template}"
d = load_dataset(dataset_query)
return d[split]

if name == 'main':
for d_name in [
'bioasq',
'clap_nq'
]:
# Benchmark
for s in ['train',
'test'
]:
print(f"#Benchmark ({s}) for {d_name} : {len(access_to_card(d_name, 'benchmark', s))}")
# Documents:
print(f"#Documents for {d_name} : {len(access_to_card(d_name, 'documents', 'train'))}")

`

@BenjSz BenjSz requested a review from elronbandel January 7, 2025 12:42
@elronbandel elronbandel enabled auto-merge (squash) January 7, 2025 12:45
@coveralls
Copy link

Coverage Status

coverage: 80.234%. remained the same
when pulling fc70fe2 on benjams/fix_bioasq_card
into 822eb5a on main.

@elronbandel elronbandel merged commit 0fe3c89 into main Jan 7, 2025
17 of 18 checks passed
@elronbandel elronbandel deleted the benjams/fix_bioasq_card branch January 7, 2025 13:03
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.

3 participants