Skip to content

Commit

Permalink
fix: use safe access for dataset_name in config
Browse files Browse the repository at this point in the history
  • Loading branch information
ignorejjj committed Nov 11, 2024
1 parent f534a23 commit c9be252
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flashrag/dataset/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def __init__(
) -> None:
if config is not None:
self.config = config
dataset_name = config.get("dataset_name", "default_dataset")
dataset_name = config['dataset_name'] if 'dataset_name' in config else 'defalut_dataset'
else:
self.config = None
warnings.warn("dataset_name is not in config, set it as default.")
Expand Down

0 comments on commit c9be252

Please sign in to comment.