Skip to content

Commit 89c375b

Browse files
committed
fix more docs
1 parent d504940 commit 89c375b

File tree

14 files changed

+20
-20
lines changed

14 files changed

+20
-20
lines changed

autointent/modules/embedding/_logreg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class LogregAimedEmbedding(EmbeddingModule):
3535
utterances = ["bye", "how are you?", "good morning"]
3636
labels = [0, 1, 1]
3737
retrieval = LogregAimedEmbedding(
38-
embedder_name="sergeyzh/rubert-tiny-turbo",
38+
embedder_config="sergeyzh/rubert-tiny-turbo",
3939
cv=2
4040
)
4141
retrieval.fit(utterances, labels)

autointent/modules/embedding/_retrieval.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class RetrievalAimedEmbedding(EmbeddingModule):
3030
labels = [0, 1, 1]
3131
retrieval = RetrievalAimedEmbedding(
3232
k=2,
33-
embedder_name="sergeyzh/rubert-tiny-turbo",
33+
embedder_config="sergeyzh/rubert-tiny-turbo",
3434
)
3535
retrieval.fit(utterances, labels)
3636

autointent/modules/scoring/_dnnc/dnnc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class DNNCScorer(ScoringModule):
5050
labels = [0, 1]
5151
scorer = DNNCScorer(
5252
cross_encoder_name="cross-encoder/ms-marco-MiniLM-L-6-v2",
53-
embedder_name="sergeyzh/rubert-tiny-turbo",
53+
embedder_config="sergeyzh/rubert-tiny-turbo",
5454
k=5,
5555
)
5656
scorer.fit(utterances, labels)

autointent/modules/scoring/_knn/knn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class KNNScorer(ScoringModule):
3333
utterances = ["hello", "how are you?"]
3434
labels = [0, 1]
3535
scorer = KNNScorer(
36-
embedder_name="sergeyzh/rubert-tiny-turbo",
36+
embedder_config="sergeyzh/rubert-tiny-turbo",
3737
k=5,
3838
)
3939
scorer.fit(utterances, labels)

autointent/modules/scoring/_linear.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class LinearScorer(ScoringModule):
2828
2929
from autointent.modules import LinearScorer
3030
scorer = LinearScorer(
31-
embedder_name="sergeyzh/rubert-tiny-turbo", cv=2
31+
embedder_config="sergeyzh/rubert-tiny-turbo", cv=2
3232
)
3333
utterances = ["hello", "goodbye", "allo", "sayonara"]
3434
labels = [0, 1, 0, 1]

autointent/modules/scoring/_mlknn/mlknn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class MLKnnScorer(ScoringModule):
3030
labels = [[1,0], [0,1]]
3131
scorer = MLKnnScorer(
3232
k=5,
33-
embedder_name="sergeyzh/rubert-tiny-turbo",
33+
embedder_config="sergeyzh/rubert-tiny-turbo",
3434
)
3535
scorer.fit(utterances, labels)
3636
test_utterances = ["Hi!", "What's up?"]

autointent/nodes/_optimization/_node_optimizer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ def fit(self, context: Context) -> None:
6464
)
6565
module = self.node_info.modules_available[module_name].from_context(context, **module_kwargs)
6666

67-
embedder_name = module.get_embedder_name()
68-
if embedder_name is not None:
69-
module_kwargs["embedder_config"] = embedder_name
67+
embedder_config = module.get_embedder_name()
68+
if embedder_config is not None:
69+
module_kwargs["embedder_config"] = embedder_config
7070

7171
self._logger.debug("optimizing %s module...", module_name)
7272
self.module_fit(module, context)

tests/configs/test_embedding.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_invalid_embedding_config_missing_field():
4040
"node_type": "embedding",
4141
# Missing "target_metric"
4242
"search_space": [
43-
{"module_name": "retrieval", "embedder_name": ["sentence-transformers/all-MiniLM-L6-v2"], "k": [5, 10]}
43+
{"module_name": "retrieval", "embedder_config": ["sentence-transformers/all-MiniLM-L6-v2"], "k": [5, 10]}
4444
],
4545
}
4646
]
@@ -58,7 +58,7 @@ def test_invalid_embedding_config_wrong_type():
5858
"search_space": [
5959
{
6060
"module_name": "logreg_embedding",
61-
"embedder_name": "not_a_list", # Should be a list of strings
61+
"embedder_config": "not_a_list", # Should be a list of strings
6262
"cv": ["wrong_type"], # Should be a list of integers
6363
}
6464
],

tests/configs/test_scoring.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def test_invalid_scoring_config_wrong_type():
8888
"search_space": [
8989
{
9090
"module_name": "knn",
91-
"embedder_name": "should_be_list", # Should be a list of strings
91+
"embedder_config": "should_be_list", # Should be a list of strings
9292
"k": "not_an_int_list", # Should be a list of integers
9393
"weights": ["uniform", "distance"],
9494
}

user_guides/advanced/02_search_space.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
knn_module = {
2525
"module_name": "knn",
2626
"k": [1, 5, 10, 50],
27-
"embedder_name": ["sergeyzh/rubert-tiny-turbo"],
27+
"embedder_config": ["sergeyzh/rubert-tiny-turbo"],
2828
}
2929

3030
# %% [markdown]
@@ -78,7 +78,7 @@
7878
{
7979
"module_name": "retrieval",
8080
"k": [10],
81-
"embedder_name": ["avsolatorio/GIST-small-Embedding-v0", "sergeyzh/rubert-tiny-turbo"],
81+
"embedder_config": ["avsolatorio/GIST-small-Embedding-v0", "sergeyzh/rubert-tiny-turbo"],
8282
}
8383
],
8484
},
@@ -90,7 +90,7 @@
9090
{"module_name": "linear"},
9191
{
9292
"module_name": "dnnc",
93-
"cross_encoder_name": ["cross-encoder/ms-marco-MiniLM-L-6-v2"],
93+
"embedder_config": ["cross-encoder/ms-marco-MiniLM-L-6-v2"],
9494
"k": [1, 3, 5, 10],
9595
},
9696
],

0 commit comments

Comments
 (0)