Skip to content

Commit

Permalink
Merge branch 'main' into update-lightweight-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeMoussalli committed Jan 30, 2024
2 parents 34a08cd + 5a73108 commit 9886fc6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion components/caption_images/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pipeline = Pipeline(...)
dataset = pipeline.read(...)

dataset = dataset.apply(
"",
"caption_images",
arguments={
# Add arguments
# "model_id": "Salesforce/blip-image-captioning-base",
Expand Down
12 changes: 6 additions & 6 deletions components/load_from_hf_hub/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Load from Hugging Face hub

<a id="load_from_hugging_face_hub#description"></a>
<a id="load_from_hf_hub#description"></a>
## Description
Component that loads a dataset from the hub

<a id="load_from_hugging_face_hub#inputs_outputs"></a>
<a id="load_from_hf_hub#inputs_outputs"></a>
## Inputs / outputs

<a id="load_from_hugging_face_hub#consumes"></a>
<a id="load_from_hf_hub#consumes"></a>
### Consumes


**This component does not consume data.**


<a id="load_from_hugging_face_hub#produces"></a>
<a id="load_from_hf_hub#produces"></a>
### Produces

**This component can produce additional fields**
Expand All @@ -24,7 +24,7 @@ The keys are the names of the fields to be produced by the component, while the
the type of the field that should be used to write the output dataset.


<a id="load_from_hugging_face_hub#arguments"></a>
<a id="load_from_hf_hub#arguments"></a>
## Arguments

The component takes the following arguments to alter its behavior:
Expand All @@ -37,7 +37,7 @@ The component takes the following arguments to alter its behavior:
| n_rows_to_load | int | Optional argument that defines the number of rows to load. Useful for testing pipeline runs on a small scale | / |
| index_column | str | Column to set index to in the load component, if not specified a default globally unique index will be set | / |

<a id="load_from_hugging_face_hub#usage"></a>
<a id="load_from_hf_hub#usage"></a>
## Usage

You can add this component to your pipeline using the following code:
Expand Down
12 changes: 6 additions & 6 deletions components/write_to_hf_hub/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Write to Hugging Face hub

<a id="write_to_hugging_face_hub#description"></a>
<a id="write_to_hf_hub#description"></a>
## Description
Component that writes a dataset to the hub

<a id="write_to_hugging_face_hub#inputs_outputs"></a>
<a id="write_to_hf_hub#inputs_outputs"></a>
## Inputs / outputs

<a id="write_to_hugging_face_hub#consumes"></a>
<a id="write_to_hf_hub#consumes"></a>
### Consumes

**This component can consume additional fields**
Expand All @@ -21,13 +21,13 @@ See the usage example below on how to define a field name for additional fields.



<a id="write_to_hugging_face_hub#produces"></a>
<a id="write_to_hf_hub#produces"></a>
### Produces


**This component does not produce data.**

<a id="write_to_hugging_face_hub#arguments"></a>
<a id="write_to_hf_hub#arguments"></a>
## Arguments

The component takes the following arguments to alter its behavior:
Expand All @@ -40,7 +40,7 @@ The component takes the following arguments to alter its behavior:
| image_column_names | list | A list containing the image column names. Used to format to image to HF hub format | / |
| column_name_mapping | dict | Mapping of the consumed fondant column names to the written hub column names | / |

<a id="write_to_hugging_face_hub#usage"></a>
<a id="write_to_hf_hub#usage"></a>
## Usage

You can add this component to your pipeline using the following code:
Expand Down
3 changes: 1 addition & 2 deletions scripts/component_readme/generate_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from pathlib import Path

import jinja2

from fondant.core.component_spec import ComponentSpec


Expand All @@ -19,7 +18,7 @@ def generate_readme(component_spec: ComponentSpec, *, component_dir: Path) -> st
template = env.get_template("readme_template.md")

return template.render(
component_id=component_spec.safe_name,
component_id=component_dir.name,
name=component_spec.name,
description=component_spec.description,
consumes=component_spec.consumes,
Expand Down

0 comments on commit 9886fc6

Please sign in to comment.