Unverified Commit 529a2899 authored by Yuge Zhang's avatar Yuge Zhang Committed by GitHub
Browse files

Update implementation of PDARTS export due to mutator refactor (#2423)

* Disable precondition check for length in export for PDARTS

* update
parent 4b5e9151
......@@ -55,7 +55,8 @@ class PdartsMutator(DartsMutator):
del module[index]
assert len(module) <= len(choices), "Failed to remove dropped choices."
def sample_final(self):
def export(self):
# Cannot rely on super().export() because P-DARTS has deleted some of the choices and has misaligned length.
results = super().sample_final()
for mutable in self.mutables:
if isinstance(mutable, LayerChoice):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment