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

Revert "Export more public APIs in top-level package" #148

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions src/instructlab/sdg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,12 @@
# NOTE: This package imports Torch and other heavy packages.
__all__ = (
"Block",
"CombineColumnsBlock",
"ConditionalLLMBlock",
"EmptyDatasetError",
"FilterByValueBlock",
"FilterByValueBlockError",
"GenerateException",
"ImportBlock",
"LLMBlock",
"Pipeline",
"PipelineConfigParserError",
"PipelineContext",
"SamplePopulatorBlock",
"SelectorBlock",
"SDG",
"SIMPLE_PIPELINES_PACKAGE",
"FULL_PIPELINES_PACKAGE",
Expand All @@ -24,10 +17,8 @@

# Local
from .block import Block
from .filterblock import FilterByValueBlock, FilterByValueBlockError
from .filterblock import FilterByValueBlockError
from .generate_data import generate_data
from .importblock import ImportBlock
from .llmblock import ConditionalLLMBlock, LLMBlock
from .pipeline import (
FULL_PIPELINES_PACKAGE,
SIMPLE_PIPELINES_PACKAGE,
Expand All @@ -37,6 +28,5 @@
PipelineContext,
)
from .sdg import SDG
from .utilblocks import CombineColumnsBlock, SamplePopulatorBlock, SelectorBlock
from .utils import GenerateException
from .utils.taxonomy import TaxonomyReadingException
1 change: 0 additions & 1 deletion src/instructlab/sdg/filterblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ def convert_column(sample):
return samples.map(convert_column, num_proc=num_proc)


# This is part of the public API.
class FilterByValueBlock(Block):
def __init__(
self,
Expand Down
1 change: 0 additions & 1 deletion src/instructlab/sdg/importblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
logger = setup_logger(__name__)


# This is part of the public API.
class ImportBlock(Block):
def __init__(
self,
Expand Down
2 changes: 0 additions & 2 deletions src/instructlab/sdg/llmblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def server_supports_batched(client, model_id: str) -> bool:
return supported


# This is part of the public API.
# pylint: disable=dangerous-default-value
class LLMBlock(Block):
# pylint: disable=too-many-instance-attributes
Expand Down Expand Up @@ -229,7 +228,6 @@ def generate(self, samples: Dataset, **gen_kwargs) -> Dataset:
return Dataset.from_list(new_data)


# This is part of the public API.
class ConditionalLLMBlock(LLMBlock):
def __init__(
self,
Expand Down
3 changes: 0 additions & 3 deletions src/instructlab/sdg/utilblocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
logger = setup_logger(__name__)


# This is part of the public API.
class SamplePopulatorBlock(Block):
def __init__(
self, ctx, pipe, block_name, config_paths, column_name, post_fix=""
Expand Down Expand Up @@ -39,7 +38,6 @@ def generate(self, samples) -> Dataset:
)


# This is part of the public API.
class SelectorBlock(Block):
def __init__(
self, ctx, pipe, block_name, choice_map, choice_col, output_col
Expand Down Expand Up @@ -68,7 +66,6 @@ def generate(self, samples: Dataset) -> Dataset:
)


# This is part of the public API.
class CombineColumnsBlock(Block):
def __init__(
self, ctx, pipe, block_name, columns, output_col, separator="\n\n"
Expand Down