diff --git a/dspy/teleprompt/finetune.py b/dspy/teleprompt/finetune.py index ef79c1ca4a..4ab233479e 100644 --- a/dspy/teleprompt/finetune.py +++ b/dspy/teleprompt/finetune.py @@ -24,9 +24,6 @@ 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 @@ def __init__(self, metric=None, teacher_settings={}, multitask=True): teacher_settings=teacher_settings, ) + if not os.path.exists(training_data_directory): + os.makedirs(training_data_directory) + def compile( self, student,