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

Commit 7b5ee7b

Browse files
committed
Wrap read_taxonomy from instructlab.utils
This is a hack to get tests passing back in `instructlab/instructlab`. There is a test there that tries to mock read_taxonomy, but it's not working because of how we use it. This hack gives a place the test can mock. The real issue here is that the split of code between instructlab and sdg is a mess and these dependencies in both directions both in code and in the tests. There's a lot of work to clean this up, but I'm just trying to get to a functional starting point. Signed-off-by: Russell Bryant <rbryant@redhat.com>
1 parent ad43635 commit 7b5ee7b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/instructlab/sdg/generate_data.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
chunk_document,
2121
max_seed_example_tokens,
2222
num_chars_from_tokens,
23-
read_taxonomy,
2423
)
2524
from jinja2 import Template
2625
from rouge_score import rouge_scorer
2726
import click
27+
import instructlab.utils
2828
import tqdm
2929

3030
# First Party
@@ -358,6 +358,10 @@ def get_instructions_from_model(
358358
return instruction_data, discarded
359359

360360

361+
def read_taxonomy(*args, **kwargs):
362+
return instructlab.utils.read_taxonomy(*args, **kwargs)
363+
364+
361365
def generate_data(
362366
logger,
363367
api_base,

0 commit comments

Comments
 (0)