mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-27 23:47:46 +00:00
fix: Handle ValueError when resolving relative path for uri (#585)
This commit is contained in:
@@ -54,7 +54,11 @@ class RDAT:
|
||||
|
||||
if path_part.startswith("."):
|
||||
yaml_file_path = caller_dir / f"{path_part[1:].replace('.', '/')}.yaml"
|
||||
self.uri = f"{str(caller_dir.resolve().relative_to(PROJ_PATH)).replace('/', '.')}{uri}"
|
||||
try:
|
||||
# modify the uri to a raltive path to the project for easier finding prompts.yaml
|
||||
self.uri = f"{str(caller_dir.resolve().relative_to(PROJ_PATH)).replace('/', '.')}{uri}"
|
||||
except ValueError:
|
||||
pass
|
||||
else:
|
||||
yaml_file_path = (PROJ_PATH / path_part.replace(".", "/")).with_suffix(".yaml")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user