Allow loading/saving of FAISS index using fsspec
{'login': 'Dref360', 'id': 8976546, 'node_id': 'MDQ6VXNlcjg5NzY1NDY=', 'avatar_url': 'https://avatars.githubusercontent.com/u/8976546?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/Dref360', 'html_url': 'https://github.com/Dref360', 'followers_url': 'https://api.github.com/users/Dref360/followers', 'following_url': 'https://api.github.com/users/Dref360/following{/other_user}', 'gists_url': 'https://api.github.com/users/Dref360/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/Dref360/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/Dref360/subscriptions', 'organizations_url': 'https://api.github.com/users/Dref360/orgs', 'repos_url': 'https://api.github.com/users/Dref360/repos', 'events_url': 'https://api.github.com/users/Dref360/events{/privacy}', 'received_events_url': 'https://api.github.com/users/Dref360/received_events', 'type': 'User', 'site_admin': False}
[]
[]
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_5526). All of your documentation changes will be reflected on that endpoint. Thanks for the quick review! I updated the code with your suggestion Thanks for the quick review @albertvillanova! I updated the code with your suggestions
Fixes #5428

Allow loading/saving of FAISS index using fsspec:
1. Simply use BufferedIOWriter/Reader to Read/Write indices on fsspec stream.
2. Needed `mockfs` in the test, so I took it out of the `TestCase`. Let me know if that makes sense.


I can work on the documentation once the code changes are approved.

{'url': 'https://api.github.com/repos/huggingface/datasets/issues/5526/reactions', 'total_count': 0, '+1': 0, '-1': 0, 'laugh': 0, 'hooray': 0, 'confused': 0, 'heart': 0, 'rocket': 0, 'eyes': 0}
{'url': 'https://api.github.com/repos/huggingface/datasets/pulls/5526', 'html_url': 'https://github.com/huggingface/datasets/pull/5526', 'diff_url': 'https://github.com/huggingface/datasets/pull/5526.diff', 'patch_url': 'https://github.com/huggingface/datasets/pull/5526.patch', 'merged_at': None}