From 4249ecc6ff706d0a039aa751b2b8f433907defba Mon Sep 17 00:00:00 2001 From: Lutz Roeder Date: Sat, 2 Mar 2024 13:48:55 -0800 Subject: [PATCH] Update scikit-learn script --- tools/sklearn_metadata.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/sklearn_metadata.py b/tools/sklearn_metadata.py index 808a74b0db..720632ab73 100644 --- a/tools/sklearn_metadata.py +++ b/tools/sklearn_metadata.py @@ -89,7 +89,8 @@ def _update_attributes(schema, lines): attribute['description'] = '\n'.join(description) def _metadata(): - json_file = os.path.join(os.path.dirname(__file__), '../source/sklearn-metadata.json') + root_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) + json_file = os.path.join(root_dir, 'source', 'sklearn-metadata.json') with open(json_file, 'r', encoding='utf-8') as file: json_root = json.loads(file.read())