Skip to content

armgit / txtai

Public Imported from GitHub
0

💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows

Rename pipeline.segment to pipeline.data

davidmezzetti6f60d62ab6ba
diff --git a/src/python/txtai/pipeline/__init__.py b/src/python/txtai/pipeline/__init__.py
index c822de4b..cc9b3453 100644
--- a/src/python/txtai/pipeline/__init__.py
+++ b/src/python/txtai/pipeline/__init__.py
@@ -4,12 +4,12 @@ Pipeline imports
from .audio import *
from .base import Pipeline
+from .data import *
from .factory import PipelineFactory
from .hfmodel import HFModel
from .hfpipeline import HFPipeline
from .image import *
from .nop import Nop
-from .segment import *
from .text import *
from .tensors import Tensors
from .train import *
diff --git a/src/python/txtai/pipeline/segment/__init__.py b/src/python/txtai/pipeline/data/__init__.py
similarity index 100%
rename from src/python/txtai/pipeline/segment/__init__.py
rename to src/python/txtai/pipeline/data/__init__.py
diff --git a/src/python/txtai/pipeline/segment/segmentation.py b/src/python/txtai/pipeline/data/segmentation.py
similarity index 100%
rename from src/python/txtai/pipeline/segment/segmentation.py
rename to src/python/txtai/pipeline/data/segmentation.py
diff --git a/src/python/txtai/pipeline/segment/tabular.py b/src/python/txtai/pipeline/data/tabular.py
similarity index 100%
rename from src/python/txtai/pipeline/segment/tabular.py
rename to src/python/txtai/pipeline/data/tabular.py
diff --git a/src/python/txtai/pipeline/segment/textractor.py b/src/python/txtai/pipeline/data/textractor.py
similarity index 100%
rename from src/python/txtai/pipeline/segment/textractor.py
rename to src/python/txtai/pipeline/data/textractor.py
diff --git a/src/python/txtai/pipeline/segment/tokenizer.py b/src/python/txtai/pipeline/data/tokenizer.py
similarity index 100%
rename from src/python/txtai/pipeline/segment/tokenizer.py
rename to src/python/txtai/pipeline/data/tokenizer.py
diff --git a/src/python/txtai/pipeline/text/extractor.py b/src/python/txtai/pipeline/text/extractor.py
index 98b87478..a2d12f18 100644
--- a/src/python/txtai/pipeline/text/extractor.py
+++ b/src/python/txtai/pipeline/text/extractor.py
@@ -3,7 +3,7 @@ Extractor module
"""
from ..base import Pipeline
-from ..segment import Tokenizer
+from ..data import Tokenizer
from .questions import Questions
from .similarity import Similarity
diff --git a/src/python/txtai/workflow/task/base.py b/src/python/txtai/workflow/task/base.py
index ecd625f9..ce97c730 100644
--- a/src/python/txtai/workflow/task/base.py
+++ b/src/python/txtai/workflow/task/base.py
@@ -199,10 +199,13 @@ class Task:
"""
Merges outputs row-wise. Returns a list of lists which will be interpreted by workflows as a one-many transformation.
- # Row-wise merge example (2 actions)
- # Inputs: [a, b, c]
- # Outputs => [[a1, b1, c1], [a2, b2, c2]]
- # Row Merge => [[a1, a2], [b1, b2], [c1, c2]] = [a1, a2, b1, b2, c1, c2]
+ Row-wise merge example (2 actions)
+
+ Inputs: [a, b, c]
+
+ Outputs => [[a1, b1, c1], [a2, b2, c2]]
+
+ Row Merge => [[a1, a2], [b1, b2], [c1, c2]] = [a1, a2, b1, b2, c1, c2]
Args:
outputs: task outputs
@@ -217,10 +220,13 @@ class Task:
"""
Merges outputs column-wise. Returns a list of tuples which will be interpreted by workflows as a one-one transformation.
- # Column-wise merge example (2 actions)
- # Inputs: [a, b, c]
- # Outputs => [[a1, b1, c1], [a2, b2, c2]]
- # Column Merge => [(a1, a2), (b1, b2), (c1, c2)]
+ Column-wise merge example (2 actions)
+
+ Inputs: [a, b, c]
+
+ Outputs => [[a1, b1, c1], [a2, b2, c2]]
+
+ Column Merge => [(a1, a2), (b1, b2), (c1, c2)]
Args:
outputs: task outputs
@@ -235,10 +241,13 @@ class Task:
"""
Merges outputs column-wise and concats values together into a string. Returns a list of strings.
- # Concat merge example (2 actions)
- # Inputs: [a, b, c]
- # Outputs => [[a1, b1, c1], [a2, b2, c2]]
- # Concat Merge => [(a1, a2), (b1, b2), (c1, c2)] => ["a1. a2", "b1. b2", "c1. c2"]
+ Concat merge example (2 actions)
+
+ Inputs: [a, b, c]
+
+ Outputs => [[a1, b1, c1], [a2, b2, c2]]
+
+ Concat Merge => [(a1, a2), (b1, b2), (c1, c2)] => ["a1. a2", "b1. b2", "c1. c2"]
Args:
outputs: task outputs