Skip to content

Conversation

@romanlutz
Copy link
Contributor

@romanlutz romanlutz commented Dec 20, 2025

Description

Bringing better order to converter docs by showing all converters at least once, sorting by I/O modalities.

This also meant adding a function to get all converters sorted by modality which is showcased in the notebook indexed with 0. For simplicity, the I/O modalities are now on a class constant and retrieved for the property getters supported_input_types and supported_output_types.

image

Tests and Documentation

Added test to make sure all converters (except base classes) are indeed shown in the converter docs there is a new unit test file.

Reran all the converter notebooks.

Copy link
Contributor

@rlundeen2 rlundeen2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving - great work!

I feel like with both my comments we should reach consensus. You may change my mind about either, but if you agree and implement the changes we don't need to resync

Comment on lines -70 to -71
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this just not necessary in this instance or notebooks in general ?

Comment on lines +86 to +92
- file: code/converters/1_text_to_text_converters
- file: code/converters/2_audio_converters
- file: code/converters/3_image_converters
- file: code/converters/4_video_converters
- file: code/converters/5_file_converters
- file: code/converters/6_selectively_converting
- file: code/converters/7_human_converter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this organization a lot! this is much more streamlined. I have a slight preference to remove 7_human_converter so that human converter is just an example in the 1_text_to_text_converters notebook

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The interaction mode is VERY different, though, and it prevents us from running it in automation. Plus, I imagine with the GUI this will actually disappear.

https://pillow.readthedocs.io/en/stable/handbook/image-file-formats.html#webp-saving
"""

SUPPORTED_INPUT_TYPES = ("image_path", "url")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is url not image path ?


converter_modalities.append((name, input_modalities, output_modalities))

except (AttributeError, TypeError):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so if someone adds a new converter, but doesn't set the supported input/output types even if this should be set, we won't throw an error ? what's the case we wouldn't want these set ?

romanlutz and others added 2 commits December 23, 2025 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants