Skip to content

Commit

Permalink
Partly revert how SetFit seed bounds are set (#72)
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Schröder <[email protected]>
  • Loading branch information
chschroeder committed Jan 21, 2025
1 parent bfd80e7 commit 8adaeaa
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 37 deletions.
3 changes: 1 addition & 2 deletions small_text/integrations/transformers/classifiers/setfit.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
)
from small_text.utils.context import build_pbar_context
from small_text.utils.labels import csr_to_list
from small_text.utils.numpy import int_dtype
from small_text.integrations.transformers.classifiers.base import (
ModelLoadingStrategy
)
Expand Down Expand Up @@ -258,7 +257,7 @@ def _get_train_and_valid_sets(self, x_train, y_train, x_valid, y_valid):
return sub_train, sub_valid

def _fit(self, sub_train, sub_valid, setfit_train_kwargs):
seed = np.random.randint(np.iinfo(int_dtype()).max)
seed = np.random.randint(np.iinfo(np.uint32).max, dtype=np.uint32).item()
trainer = SetFitTrainer(
self.model,
sub_train,
Expand Down
16 changes: 0 additions & 16 deletions small_text/utils/numpy.py

This file was deleted.

19 changes: 0 additions & 19 deletions tests/unit/small_text/utils/test_numpy.py

This file was deleted.

0 comments on commit 8adaeaa

Please sign in to comment.