Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

Move path creation to BSFS init

Isaac Miller83b91ae2112a
diff --git a/dspy/teleprompt/finetune.py b/dspy/teleprompt/finetune.py
index ef79c1ca4..4ab233479 100644
--- a/dspy/teleprompt/finetune.py
+++ b/dspy/teleprompt/finetune.py
@@ -24,9 +24,6 @@ if os.environ.get("DSP_NOTEBOOK_CACHEDIR"):
else:
training_data_directory = "local_cache/compiler"
-if not os.path.exists(training_data_directory):
- os.makedirs(training_data_directory)
-
"""
TODO: Reduce and document the dependencies.
@@ -61,6 +58,9 @@ class BootstrapFinetune(Teleprompter):
teacher_settings=teacher_settings,
)
+ if not os.path.exists(training_data_directory):
+ os.makedirs(training_data_directory)
+
def compile(
self,
student,