Skip to content

Commit ee98a3c

Browse files
committed
Remove warning about custom data being experimental
1 parent b8ec760 commit ee98a3c

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

metatomic-torch/src/system.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -928,14 +928,6 @@ metatensor_torch::TensorMap SystemHolder::get_data(std::string name) const {
928928
);
929929
}
930930

931-
static std::unordered_set<std::string> ALREADY_WARNED = {};
932-
if (ALREADY_WARNED.insert(name).second) {
933-
TORCH_WARN(
934-
"custom data '", name, "' is experimental, please contact metatensor's ",
935-
"developers to add this data as a member of the `System` class"
936-
);
937-
}
938-
939931
return it->second;
940932
}
941933

python/metatomic_torch/tests/systems.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -116,17 +116,6 @@ def test_custom_data(system):
116116
tensor = TensorMap(Labels.single(), [block])
117117

118118
system.add_data("custom::data-name", tensor)
119-
message = (
120-
"custom data 'custom::data-name' is experimental, please contact metatensor's "
121-
"developers to add this data as a member of the `System` class"
122-
)
123-
with pytest.warns(UserWarning, match=message):
124-
stored_data = system.get_data("custom::data-name")
125-
126-
assert metatensor.torch.equal(stored_data, tensor)
127-
# should only warn once
128-
_ = system.get_data("custom::data-name")
129-
130119
assert system.known_data() == ["custom::data-name"]
131120

132121
message = "custom data can not be named 'positions'"

0 commit comments

Comments
 (0)