Schema should be copied, when NodeSpace generates min_value.
So that, if first batches doesn't match, the data won't override original
requirement.
This commit is contained in:
Chi Song 2020-09-21 17:57:35 +08:00
Родитель f5cd25d327
Коммит 0ad9f4f730
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -502,8 +502,8 @@ class NodeSpace(search_space.RequirementMixin, ExtendableSchemaMixin):
return expanded_requirements
def _generate_min_capability(self, capability: Any) -> Any:
# copy to keep extended schema
min_value: NodeSpace = copy.copy(self)
# copy to duplicate extended schema
min_value: NodeSpace = copy.deepcopy(self)
assert isinstance(capability, NodeSpace), f"actual: {type(capability)}"
if self.node_count or capability.node_count: