Upload configuration file
Browse files
config/textclassifier_inference_cc_safe__v2.yaml
CHANGED
|
@@ -12,13 +12,25 @@ operators:
|
|
| 12 |
function: data_strategies.32b_exploit.seed_pdf_parser.utils.download_cc_safe_untruncated_zip_files_from_dataset
|
| 13 |
input_ids:
|
| 14 |
- create_urls
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
function: data_strategies.32b_exploit.seed_pdf_parser.utils.download_cc_safe_untruncated_zip_files_from_dataset
|
| 13 |
input_ids:
|
| 14 |
- create_urls
|
| 15 |
+
- id: classify_fasttext
|
| 16 |
+
config:
|
| 17 |
+
type: fasttext
|
| 18 |
+
hf_repo_id: mlfoundations-dev/science_pdf_fasttext_classifier_v2
|
| 19 |
+
input_column: text
|
| 20 |
+
target_label: "__label__QA_doc"
|
| 21 |
+
filter_threshold: 0.5
|
| 22 |
+
input_ids:
|
| 23 |
+
- download_pdfs
|
| 24 |
+
- id: filter_pdfs
|
| 25 |
+
config:
|
| 26 |
+
type: function
|
| 27 |
+
function: data_strategies.commons.filter_dataset_if_value_exists
|
| 28 |
+
function_config:
|
| 29 |
+
to_filter_column: pdf_file
|
| 30 |
+
value_column: pdf_file
|
| 31 |
+
input_dataset_map:
|
| 32 |
+
to_filter_dataset: download_pdfs
|
| 33 |
+
values_dataset: classify_fasttext
|
| 34 |
+
input_ids:
|
| 35 |
+
- download_pdfs
|
| 36 |
+
- classify_fasttext
|