-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
93 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name = "model2vec" | |
description = "Distill a Small Fast Model from any Sentence Transformer" | ||
readme = { file = "README.md", content-type = "text/markdown" } | ||
license = { file = "LICENSE" } | ||
version = "0.1.2" | ||
version = "0.2.0" | ||
requires-python = ">=3.10" | ||
authors = [{ name = "Stéphan Tulkens", email = "[email protected]"}, {name = "Thomas van Dongen", email = "[email protected]"}] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from pathlib import Path | ||
from tempfile import NamedTemporaryFile | ||
|
||
from model2vec.utils import _get_metadata_from_readme | ||
|
||
|
||
def test__get_metadata_from_readme_not_exists() -> None: | ||
"""Test getting metadata from a README.""" | ||
assert _get_metadata_from_readme(Path("zzz")) == {} | ||
|
||
|
||
def test__get_metadata_from_readme_mocked_file() -> None: | ||
"""Test getting metadata from a README.""" | ||
with NamedTemporaryFile() as f: | ||
f.write(b"---\nkey: value\n---\n") | ||
f.flush() | ||
assert _get_metadata_from_readme(Path(f.name))["key"] == "value" | ||
|
||
|
||
def test__get_metadata_from_readme_mocked_file_keys() -> None: | ||
"""Test getting metadata from a README.""" | ||
with NamedTemporaryFile() as f: | ||
f.write(b"") | ||
f.flush() | ||
assert set(_get_metadata_from_readme(Path(f.name))) == set() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<div align="center"> | ||
<picture> | ||
<img width="75%", alt="Tutorials" src="../assets/images/tutorial_ezlo.png"> | ||
</picture> | ||
</a> | ||
</div> | ||
|
||
# Tutorials | ||
|
||
This is a list of all our tutorials. They are all self-contained ipython notebooks. | ||
|
||
| | what? | Link | | ||
|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------| | ||
| **Recipe search** | Learn how to do lightning-fast semantic search by distilling a small model. Compare a really tiny model to a larger with one with a better vocabulary. Learn what Fattoush is (delicious). | [](https://colab.research.google.com/github/minishlab/model2vec/blob/master/tutorials/recipe_search.ipynb) | |