The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: DatasetGenerationCastError
Exception: DatasetGenerationCastError
Message: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 6 new columns ({'effect_id', 'pred0', 'product_label_id', 'label_section', 'pred1', 'match_method'}) and 1 missing columns ({'ingredient_id'}).
This happened while the csv dataset builder was generating data using
hf://datasets/tatonettilab/onsides/product_adverse_effect.csv (at revision 05001835e4e53d3b4a7787f3c24c8ade77d85a80)
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1831, in _prepare_split_single
writer.write_table(table)
File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 714, in write_table
pa_table = table_cast(pa_table, self._schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2272, in table_cast
return cast_table_to_schema(table, schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2218, in cast_table_to_schema
raise CastError(
datasets.table.CastError: Couldn't cast
product_label_id: int64
effect_id: int64
label_section: double
effect_meddra_id: int64
match_method: string
pred0: double
pred1: double
-- schema metadata --
pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 1109
to
{'ingredient_id': Value('int64'), 'effect_meddra_id': Value('int64')}
because column names don't match
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1339, in compute_config_parquet_and_info_response
parquet_operations = convert_to_parquet(builder)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 972, in convert_to_parquet
builder.download_and_prepare(
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 894, in download_and_prepare
self._download_and_prepare(
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 970, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1702, in _prepare_split
for job_id, done, content in self._prepare_split_single(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1833, in _prepare_split_single
raise DatasetGenerationCastError.from_cast_error(
datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 6 new columns ({'effect_id', 'pred0', 'product_label_id', 'label_section', 'pred1', 'match_method'}) and 1 missing columns ({'ingredient_id'}).
This happened while the csv dataset builder was generating data using
hf://datasets/tatonettilab/onsides/product_adverse_effect.csv (at revision 05001835e4e53d3b4a7787f3c24c8ade77d85a80)
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
ingredient_id int64 | effect_meddra_id int64 |
|---|---|
68,149 | 10,037,844 |
6,851 | 10,024,382 |
10,395 | 10,019,211 |
1,100,072 | 10,017,076 |
5,487 | 10,008,479 |
35,636 | 10,021,425 |
35,636 | 10,016,173 |
342,369 | 10,003,549 |
25,255 | 10,067,484 |
73,494 | 10,020,751 |
190,521 | 10,003,239 |
1,546,438 | 10,047,700 |
61,805 | 10,037,087 |
6,809 | 10,010,774 |
41,126 | 10,022,801 |
22,299 | 10,039,020 |
35,636 | 10,010,904 |
358,258 | 10,067,484 |
17,767 | 10,013,946 |
56,946 | 10,016,256 |
5,487 | 10,047,700 |
141,704 | 10,037,660 |
68,149 | 10,021,789 |
6,809 | 10,023,676 |
4,124 | 10,015,150 |
6,135 | 10,067,484 |
342,369 | 10,028,813 |
341,248 | 10,067,484 |
134,748 | 10,067,484 |
41,493 | 10,067,484 |
11,636 | 10,020,772 |
11,636 | 10,000,496 |
6,375 | 10,042,772 |
282,446 | 10,067,484 |
306,674 | 10,003,988 |
1,251 | 10,062,026 |
5,487 | 10,019,211 |
6,851 | 10,037,383 |
342,369 | 10,029,331 |
337,525 | 10,019,663 |
4,337 | 10,020,772 |
60,307 | 10,028,596 |
282,446 | 10,014,695 |
358,258 | 10,062,026 |
17,767 | 10,019,717 |
73,494 | 10,003,239 |
114,477 | 10,037,844 |
6,375 | 10,003,549 |
10,473 | 10,028,813 |
4,124 | 10,019,211 |
342,369 | 10,003,988 |
300,195 | 10,023,676 |
282,446 | 10,062,026 |
1,251 | 10,067,484 |
342,369 | 10,002,424 |
56,946 | 10,022,095 |
8,787 | 10,006,093 |
114,477 | 10,021,789 |
358,258 | 10,047,890 |
5,487 | 10,012,601 |
6,375 | 10,010,300 |
39,998 | 10,037,844 |
495,881 | 10,050,659 |
5,487 | 10,011,224 |
5,487 | 10,015,150 |
623,400 | 10,029,864 |
35,636 | 10,052,995 |
5,487 | 10,047,862 |
89,013 | 10,019,211 |
6,719 | 10,047,700 |
623,400 | 10,012,378 |
5,487 | 10,047,115 |
6,375 | 10,028,813 |
300,195 | 10,016,219 |
358,258 | 10,021,097 |
85,762 | 10,020,751 |
342,369 | 10,013,573 |
358,258 | 10,016,288 |
89,013 | 10,047,700 |
6,719 | 10,019,211 |
22,299 | 10,014,962 |
1,815 | 10,067,484 |
68,244 | 10,019,211 |
5,487 | 10,031,127 |
1,251 | 10,028,584 |
1,592,254 | 10,034,966 |
342,369 | 10,050,584 |
6,375 | 10,019,063 |
5,487 | 10,019,717 |
89,013 | 10,037,660 |
17,767 | 10,011,224 |
39,998 | 10,010,774 |
68,149 | 10,033,371 |
25,255 | 10,020,751 |
89,013 | 10,026,749 |
623,400 | 10,044,565 |
134,748 | 10,039,083 |
6,375 | 10,016,256 |
85,762 | 10,028,411 |
68,149 | 10,002,855 |
About
OnSIDES is a database of adverse drug events extracted from drug labels created by fine-tuning a PubMedBERT language model on 200 manually curated labels available from Denmer-Fushman et al.. This comprehensive database will be updated quarterly, and currently contains more than 3.6 million drug-ADE pairs for 2,793 drug ingredients extracted from 46,686 labels, processed from all of the labels available to download from DailyMed as of November 2023. Additionally, we now provide a number of complementary databases constructed using a similar method - OnSIDES-INTL, adverse drug events extracted from drug labels of other nations/regions (Japan, UK, EU), and OnSIDES-PED, adverse drug events specifically noted for pediatric patients in drug labels. We have recently released a preprint on medRxiv with a full description of the data, methods and analyses.
Model Accuracy
Our fine-tuned language model achieves an F1 score of 0.90, AUROC of 0.92, and AUPR of 0.95 at extracting effects from the ADVERSE REACTIONS section of the FDA drug label. For the BOXED WARNINGS section, the model achieves an F1 score of 0.71, AUROC of 0.85, and AUPR of 0.72. For the WARNINGS AND PRECUATIONS section, the model achieves an F1 score of 0.68, AUROC of 0.66, and AUPR of 0.68. Compared against the reference standard using the official evaluation script for TAC 2017, the model achieves a Micro-F1 score of 0.87 and a Macro-F1 of 0.85.
Citation
Tanaka Y, Chen HY, Belloni P, Gisladottir U, Kefeli J, Patterson J, Srinivasan A, Zietz M, Sirdeshmukh G, Berkowitz J, LaRow Brown K, Tatonetti NP. OnSIDES database: Extracting adverse drug events from drug labels using natural language processing models. Med. 2025 Mar 27:100642. doi: 10.1016/j.medj.2025.100642. PMID: 40179876.
- Downloads last month
- 5