Skip to content
This repository was archived by the owner on Apr 30, 2026. It is now read-only.

Commit 4ebd4df

Browse files
committed
fix: fix broken tests
Signed-off-by: eshwarprasadS <eshwarprasad.s01@gmail.com>
1 parent 21e0a86 commit 4ebd4df

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

src/instructlab/sdg/encoders/arctic_encoder.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,13 @@ def _initialize_model(self) -> None:
116116
"Please run `ilab model download` and download the necessary model"
117117
)
118118

119-
self.tokenizer = AutoTokenizer.from_pretrained(model_path)
120-
self.model = AutoModel.from_pretrained(
121-
model_path,
122-
add_pooling_layer=False,
123-
trust_remote_code=True,
124-
local_files_only=True,
125-
)
119+
self.tokenizer = AutoTokenizer.from_pretrained(model_path)
120+
self.model = AutoModel.from_pretrained(
121+
model_path,
122+
add_pooling_layer=False,
123+
trust_remote_code=True,
124+
local_files_only=True,
125+
)
126126

127127
if self.cfg.use_fp16:
128128
self.model = self.model.half()

tests/test_subset_selection.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ def mock_gpu_environment():
3333
@pytest.fixture
3434
def mock_encoder():
3535
class MockEncoder:
36-
def __init__(self, model_name):
36+
def __init__(self, model_name, testing_mode=False):
3737
self.model_name = model_name
38+
self.testing_mode = testing_mode
3839

39-
def encode(self, inputs, instruction, query_description):
40+
def encode(self, inputs, instruction):
4041
# Return mock embeddings
4142
return torch.randn(len(inputs), 768)
4243

0 commit comments

Comments
 (0)