Skip to content

Commit

Permalink
chore: adapt to the latest changes (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
nan-wang committed Dec 22, 2021
1 parent c75b670 commit c51b044
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/index.md
Expand Up @@ -121,7 +121,7 @@ Learn more about {term}`embedding model`.
</div>

+++
Learn more about {term}`labeled data`.
Learn more about {term}`labeled dataset`.


:::
Expand Down
2 changes: 1 addition & 1 deletion finetuner/labeler/__init__.py
Expand Up @@ -96,7 +96,7 @@ def get_preprocess_fn(self):

f.expose_endpoint('/next') #: for allowing client to fetch for the next batch
f.expose_endpoint('/fit') #: for signaling the backend to fit on the labeled data
f.expose_endpoint('/feed') #: for signaling the backend to fit on the labeled data
f.expose_endpoint('/feed') #: for feeding data to the DataIterator
f.expose_endpoint(
'/save'
) #: for signaling the backend to save the current state of the model
Expand Down
4 changes: 2 additions & 2 deletions finetuner/labeler/executor.py
Expand Up @@ -70,7 +70,7 @@ def embed(self, docs: DocumentArray, parameters: Dict, **kwargs):
limit=int(parameters.get('topk', 10)),
exclude_self=True,
)
for d in docs.traverse_flat(['r', 'm']):
for d in docs.traverse_flat('r,m'):
d.pop('blob', 'embedding')

@requests(on='/fit')
Expand Down Expand Up @@ -127,7 +127,7 @@ def take_batch(self, parameters: Dict, **kwargs):

@requests(on='/fit')
def add_fit_data(self, docs: DocumentArray, **kwargs):
for d in docs.traverse_flat(['r', 'm']):
for d in docs.traverse_flat('r,m'):
d.content = self._all_data[d.id].content
self._labeled_dam.extend(docs)
return self._labeled_dam

0 comments on commit c51b044

Please sign in to comment.