Skip to content

Commit

Permalink
Fix ruff issues
Browse files Browse the repository at this point in the history
Signed-off-by: Aakanksha Duggal <[email protected]>
  • Loading branch information
aakankshaduggal committed Nov 14, 2024
1 parent 551357f commit b5733ab
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/instructlab/sdg/generate_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,7 @@ def _sdg_init(ctx, pipeline):
config = yaml.safe_load(file)
docling_model_path = config["models"][0]["path"]
except (FileNotFoundError, NotADirectoryError, PermissionError) as e:
logger.warning(
f"unable to read docling models path from config.yaml {e}"
)
logger.warning(f"unable to read docling models path from config.yaml {e}")

for d in data_dirs:
pipeline_path = os.path.join(d, "pipelines", pipeline)
Expand Down Expand Up @@ -271,7 +269,7 @@ def load_pipeline(yaml_basename):
load_pipeline("knowledge.yaml"),
load_pipeline("freeform_skills.yaml"),
load_pipeline("grounded_skills.yaml"),
docling_model_path
docling_model_path,
)


Expand Down Expand Up @@ -384,8 +382,8 @@ def generate_data(
max_num_tokens=max_num_tokens,
)

knowledge_pipe, freeform_skills_pipe, grounded_skills_pipe, docling_model_path = _sdg_init(
ctx, pipeline
knowledge_pipe, freeform_skills_pipe, grounded_skills_pipe, docling_model_path = (
_sdg_init(ctx, pipeline)
)

# Make sure checkpointing is disabled (we don't want this pipeline to load checkpoints from the main pipeline)
Expand Down

0 comments on commit b5733ab

Please sign in to comment.