Commit
·
2bae26c
1
Parent(s):
ae92377
refactor unused imports
Browse files
src/distilabel_dataset_generator/__init__.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
import os
|
| 2 |
import warnings
|
| 3 |
-
from
|
| 4 |
-
from typing import Optional, Union
|
| 5 |
|
| 6 |
import argilla as rg
|
| 7 |
import distilabel
|
|
@@ -10,7 +9,7 @@ from distilabel.utils.card.dataset_card import (
|
|
| 10 |
DistilabelDatasetCard,
|
| 11 |
size_categories_parser,
|
| 12 |
)
|
| 13 |
-
from huggingface_hub import DatasetCardData, HfApi
|
| 14 |
|
| 15 |
HF_TOKENS = [os.getenv("HF_TOKEN")] + [os.getenv(f"HF_TOKEN_{i}") for i in range(1, 10)]
|
| 16 |
HF_TOKENS = [token for token in HF_TOKENS if token]
|
|
|
|
| 1 |
import os
|
| 2 |
import warnings
|
| 3 |
+
from typing import Optional
|
|
|
|
| 4 |
|
| 5 |
import argilla as rg
|
| 6 |
import distilabel
|
|
|
|
| 9 |
DistilabelDatasetCard,
|
| 10 |
size_categories_parser,
|
| 11 |
)
|
| 12 |
+
from huggingface_hub import DatasetCardData, HfApi
|
| 13 |
|
| 14 |
HF_TOKENS = [os.getenv("HF_TOKEN")] + [os.getenv(f"HF_TOKEN_{i}") for i in range(1, 10)]
|
| 15 |
HF_TOKENS = [token for token in HF_TOKENS if token]
|
src/distilabel_dataset_generator/apps/eval.py
CHANGED
|
@@ -39,9 +39,9 @@ from src.distilabel_dataset_generator.utils import (
|
|
| 39 |
extract_column_names,
|
| 40 |
get_argilla_client,
|
| 41 |
get_org_dropdown,
|
|
|
|
| 42 |
process_columns,
|
| 43 |
swap_visibility,
|
| 44 |
-
pad_or_truncate_list,
|
| 45 |
)
|
| 46 |
|
| 47 |
|
|
@@ -580,6 +580,7 @@ def push_dataset(
|
|
| 580 |
def show_pipeline_code_visibility():
|
| 581 |
return {pipeline_code_ui: gr.Accordion(visible=True)}
|
| 582 |
|
|
|
|
| 583 |
def hide_pipeline_code_visibility():
|
| 584 |
return {pipeline_code_ui: gr.Accordion(visible=False)}
|
| 585 |
|
|
@@ -708,15 +709,15 @@ with gr.Blocks() as app:
|
|
| 708 |
visible=False,
|
| 709 |
) as pipeline_code_ui:
|
| 710 |
code = generate_pipeline_code(
|
| 711 |
-
|
| 712 |
-
|
| 713 |
-
|
| 714 |
-
|
| 715 |
-
|
| 716 |
-
|
| 717 |
-
|
| 718 |
-
|
| 719 |
-
|
| 720 |
pipeline_code = gr.Code(
|
| 721 |
value=code,
|
| 722 |
language="python",
|
|
|
|
| 39 |
extract_column_names,
|
| 40 |
get_argilla_client,
|
| 41 |
get_org_dropdown,
|
| 42 |
+
pad_or_truncate_list,
|
| 43 |
process_columns,
|
| 44 |
swap_visibility,
|
|
|
|
| 45 |
)
|
| 46 |
|
| 47 |
|
|
|
|
| 580 |
def show_pipeline_code_visibility():
|
| 581 |
return {pipeline_code_ui: gr.Accordion(visible=True)}
|
| 582 |
|
| 583 |
+
|
| 584 |
def hide_pipeline_code_visibility():
|
| 585 |
return {pipeline_code_ui: gr.Accordion(visible=False)}
|
| 586 |
|
|
|
|
| 709 |
visible=False,
|
| 710 |
) as pipeline_code_ui:
|
| 711 |
code = generate_pipeline_code(
|
| 712 |
+
repo_id=search_in.value,
|
| 713 |
+
aspects=aspects_instruction_response.value,
|
| 714 |
+
instruction_column=instruction_instruction_response,
|
| 715 |
+
response_columns=response_instruction_response,
|
| 716 |
+
prompt_template=prompt_template.value,
|
| 717 |
+
structured_output=structured_output.value,
|
| 718 |
+
num_rows=num_rows.value,
|
| 719 |
+
eval_type=eval_type.value,
|
| 720 |
+
)
|
| 721 |
pipeline_code = gr.Code(
|
| 722 |
value=code,
|
| 723 |
language="python",
|