refactor: Move LIBRARY_TASK_MAPPING_EXCLUDING_TRANSFORMERS closer to TASKS_MODEL_LIBRARIES #580
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
From the review comment by Julien. Context: #552 (comment)
Although semantically the two maps should be the same and one should generate another, but in practice, there are a few differences.
IIUC, TASKS_MODEL_LIBRARIES is only used for task page and it seems to be manually maintained.
LIBRARY_TASK_MAPPING_EXCLUDING_TRANSFORMERS is used for inference and is auto-generated from api-inference-community.
This PR is only about refactoring the existing code, not about merging the two together. Just a few thoughts on the merging:
I think the latter is more reliable and probably more up-to-date also, but not sure if we will have a case where we can show a library on the task page, even if the inference API is not ready. Also the latter doesn't have any information on transformers and assume that transformers can handle all tasks, which is not really the case per the former, so merging the two is not enough unless we have a new list of tasks that transformers can't handle :-)