Skip to content

Commit 1402a74

Browse files
authored
Update randomizeop.py
1 parent 2b7e00c commit 1402a74

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kaleidoscope/operators/randomizeop.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
This module provides the randomize operator.
66
"""
77
import json
8+
import uuid
89
from argparse import Namespace
910
from importlib import resources
1011
from typing import Any
@@ -79,7 +80,7 @@ def run(self, source: Dataset) -> Dataset: # noqa: D102
7980
"""
8081
source_id = source.attrs.get(
8182
"tracking_id",
82-
source.attrs.get("uuid", self._args.source_file.stem),
83+
source.attrs.get("uuid", f"{uuid.uuid3(uuid.NAMESPACE_URL, self._args.source_file.stem)}"),
8384
)
8485
target: Dataset = Dataset(
8586
data_vars=source.data_vars,

0 commit comments

Comments
 (0)