diff --git a/zntrack/core/functions/decorator.py b/zntrack/core/functions/decorator.py index d83914cf..6762c74d 100644 --- a/zntrack/core/functions/decorator.py +++ b/zntrack/core/functions/decorator.py @@ -71,9 +71,15 @@ def write_dvc_command(self, node_name: str) -> list: continue if isinstance(getattr(self, field), (list, tuple)): for element in getattr(self, field): - script += [f"--{field.replace('_', '-')}", str(element)] + script += [ + f"--{field.replace('_', '-')}", + pathlib.Path(element).as_posix(), + ] elif getattr(self, field) is not None: - script += [f"--{field.replace('_', '-')}", str(getattr(self, field))] + script += [ + f"--{field.replace('_', '-')}", + pathlib.Path(getattr(self, field)).as_posix(), + ] return script