Skip to content

Commit 756891c

Browse files
committed
Update: add Monte Carlo software name and version to global attributes
1 parent ac67784 commit 756891c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

kaleidoscope/operators/randomizeop.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
from xarray import DataArray
1616
from xarray import Dataset
1717

18+
from .. import __name__
19+
from .. import __version__
1820
from ..algorithms.codec import Decode
1921
from ..algorithms.codec import Encode
2022
from ..algorithms.randomize import Randomize
@@ -91,6 +93,8 @@ def run(self, source: Dataset) -> Dataset: # noqa: D102
9193
get_logger().info(f"starting graph for variable: {v}")
9294
self.randomize(target, v, x, config[v])
9395
get_logger().info(f"finished graph for variable: {v}")
96+
target.attrs["monte_carlo_software"] = __name__
97+
target.attrs["monte_carlo_software_version"] = __version__
9498
return target
9599

96100
@property

0 commit comments

Comments
 (0)