diff --git a/fastlabel/__init__.py b/fastlabel/__init__.py index 7f71f3f..93ef0da 100644 --- a/fastlabel/__init__.py +++ b/fastlabel/__init__.py @@ -578,7 +578,9 @@ def export_yolo(self, tasks: list, output_dir: str = os.path.join("output", "yol for obj in anno["object"]: f.write(obj) f.write("\n") - with open(os.path.join(output_dir, "classes.txt"), 'w', encoding="utf8") as f: + classes_file_path = os.path.join(output_dir, "classes.txt") + os.makedirs(os.path.dirname(classes_file_path), exist_ok=True) + with open(classes_file_path, 'w', encoding="utf8") as f: for category in categories: f.write(category["name"]) f.write("\n") diff --git a/setup.py b/setup.py index 854c2e4..84a93bc 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setuptools.setup( name="fastlabel", - version="0.9.9", + version="0.9.10", author="eisuke-ueta", author_email="eisuke.ueta@fastlabel.ai", description="The official Python SDK for FastLabel API, the Data Platform for AI",