Skip to content

Commit

Permalink
Update reusable component specs
Browse files Browse the repository at this point in the history
  • Loading branch information
mrchtr committed Nov 20, 2023
1 parent 3e5f45c commit 6bb9aa0
Show file tree
Hide file tree
Showing 17 changed files with 95 additions and 150 deletions.
12 changes: 4 additions & 8 deletions components/caption_images/fondant_component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@ tags:
- Image processing

consumes:
images:
fields:
data:
type: binary
images_data:
type: binary

produces:
captions:
fields:
text:
type: utf8
captions_text:
type: utf8

args:
model_id:
Expand Down
16 changes: 6 additions & 10 deletions components/chunk_text/fondant_component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,14 @@ tags:
- Text processing

consumes:
text:
fields:
data:
type: string
text_data:
type: string

produces:
text:
fields:
data:
type: string
original_document_id:
type: string
text_data:
type: string
text_original_document_id:
type: string

args:
chunk_size:
Expand Down
22 changes: 9 additions & 13 deletions components/download_images/fondant_component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,16 @@ tags:
- Image processing

consumes:
images:
fields:
url:
type: string
images_url:
type: string

produces:
images:
fields:
data:
type: binary
width:
type: int32
height:
type: int32
images_data:
type: binary
images_width:
type: int32
images_height:
type: int32
additionalFields: false

args:
Expand All @@ -53,7 +49,7 @@ args:
description: Resize mode to use. One of "no", "keep_ratio", "center_crop", "border".
type: str
default: 'border'
resize_only_if_bigger:
resize_only_if_bigger:
description: If True, resize only if image is bigger than image_size.
type: bool
default: False
Expand Down
18 changes: 7 additions & 11 deletions components/embed_images/fondant_component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,17 @@ name: Embed images
description: Component that generates CLIP embeddings from images
image: fndnt/embed_images:dev
tags:
- Image processing
- Image processing

consumes:
images:
fields:
data:
type: binary
images_data:
type: binary

produces:
embeddings:
fields:
data:
type: array
items:
type: float32
embeddings_data:
type: array
items:
type: float32

args:
model_id:
Expand Down
26 changes: 11 additions & 15 deletions components/embed_text/fondant_component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,17 @@ tags:
- Text processing

consumes:
text:
fields:
data:
type: string
text_data:
type: string

produces:
text:
fields:
data:
type: string
embedding:
type: array
items:
type: float32

text_data:
type: string
text_embedding:
type: array
items:
type: float32

args:
model_provider:
description: |
Expand All @@ -40,12 +36,12 @@ args:
Pass only the keys required by the model provider or conveniently pass all keys you will ever need.
Pay attention how to name the dictionary keys so that they can be used by the model provider.
type: dict
default: {}
default: { }
auth_kwargs:
description: |
Additional keyword arguments required for api initialization/authentication.
type: dict
default: {}
default: { }



16 changes: 6 additions & 10 deletions components/embedding_based_laion_retrieval/fondant_component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,14 @@ tags:
- Data retrieval

consumes:
embeddings:
fields:
data:
type: array
items:
type: float32
embeddings_data:
type: array
items:
type: float32

produces:
images:
fields:
url:
type: string
images_url:
type: string
additionalSubsets: false

args:
Expand Down
10 changes: 4 additions & 6 deletions components/filter_image_resolution/fondant_component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ tags:
- Image processing

consumes:
images:
fields:
width:
type: int32
height:
type: int32
images_width:
type: int32
images_height:
type: int32

args:
min_image_dim:
Expand Down
6 changes: 2 additions & 4 deletions components/filter_text_length/fondant_component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ tags:
- Text processing

consumes:
text:
fields:
data:
type: string
text_data:
type: string

args:
min_characters_length:
Expand Down
20 changes: 8 additions & 12 deletions components/image_cropping/fondant_component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,16 @@ tags:
- Image processing

consumes:
images:
fields:
data:
type: binary
images_data:
type: binary

produces:
images:
fields:
data:
type: binary
width:
type: int32
height:
type: int32
images_data:
type: binary
images_width:
type: int32
images_height:
type: int32

args:
cropping_threshold:
Expand Down
20 changes: 8 additions & 12 deletions components/image_resolution_extraction/fondant_component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@ tags:
- Image processing

consumes:
images:
fields:
data:
type: binary
images_data:
type: binary

produces:
images:
fields:
data:
type: binary
width:
type: int32
height:
type: int32
images_data:
type: binary
images_width:
type: int32
images_height:
type: int32
14 changes: 6 additions & 8 deletions components/index_weaviate/fondant_component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ tags:
- Data writing

consumes:
text:
fields:
data:
type: string
embedding:
type: array
items:
type: float32
text_data:
type: string
text_embedding:
type: array
items:
type: float32

args:
weaviate_url:
Expand Down
7 changes: 3 additions & 4 deletions components/language_filter/fondant_component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ tags:
- Text processing

consumes:
text:
fields:
data:
type: string
text_fields:
data:
type: string

args:
language:
Expand Down
12 changes: 5 additions & 7 deletions components/load_from_files/fondant_component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ tags:
- Data loading

produces:
file:
fields:
filename:
type: string
content:
type: binary

file_filename:
type: string
file_content:
type: binary

args:
directory_uri:
description: Local or remote path to the directory containing the files
Expand Down
16 changes: 6 additions & 10 deletions components/minhash_generator/fondant_component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,14 @@ tags:
- Text processing

consumes:
text:
fields:
data:
type: string
text_data:
type: string

produces:
text:
fields:
minhash:
type: array
items:
type: uint64
text_minhash:
type: array
items:
type: uint64
args:
shingle_ngram_size:
description: Define size of ngram used for the shingle generation
Expand Down
6 changes: 2 additions & 4 deletions components/normalize_text/fondant_component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ tags:
- Text processing

consumes:
text:
fields:
data:
type: string
text_data:
type: string

args:
remove_additional_whitespaces:
Expand Down
12 changes: 4 additions & 8 deletions components/resize_images/fondant_component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@ tags:
- Image processing

consumes:
images:
fields:
data:
type: binary
images_data:
type: binary

produces:
images:
fields:
data:
type: binary
images_data:
type: binary

args:
resize_width:
Expand Down
Loading

0 comments on commit 6bb9aa0

Please sign in to comment.