Skip to content

Commit dda11fd

Browse files
authored
Fix package dir in settings (#1387)
Copy of https://github.com/IBM/unitxt/pull/1386/files but in a branch Signed-off-by: Yoav Katz <[email protected]>
1 parent 8a7ad4c commit dda11fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/unitxt/settings_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ def __getattr__(self, key):
161161
constants.metric_file = os.path.join(os.path.dirname(__file__), "metric.py")
162162
constants.local_catalog_path = os.path.join(os.path.dirname(__file__), "catalog")
163163
unitxt_pkg = importlib.util.find_spec("unitxt")
164-
constants.package_dir = os.path.dirname(unitxt_pkg.origin)
165164
if unitxt_pkg and unitxt_pkg.origin:
165+
constants.package_dir = os.path.dirname(unitxt_pkg.origin)
166166
constants.default_catalog_path = os.path.join(constants.package_dir, "catalog")
167167
else:
168168
constants.default_catalog_path = constants.local_catalog_path

0 commit comments

Comments
 (0)