MCPcopy Create free account
hub / github.com/evalplus/evalplus / mutate

Method mutate

evalplus/gen/type_mut.py:51–59  ·  view source on GitHub ↗
(self, seed_input: Any)

Source from the content-addressed store, hash-verified

49 return random.choice(self.seed_pool)
50
51 def mutate(self, seed_input: Any) -> List:
52 new_input = copy.deepcopy(seed_input)
53
54 patience = MUTATE_BOUND_SIZE
55 while new_input == seed_input or patience == 0:
56 new_input = self.typed_mutate(new_input)
57 patience -= 1
58
59 return new_input
60
61 #########################
62 # Type-aware generation #

Callers 1

generateMethod · 0.95

Calls 1

typed_mutateMethod · 0.95

Tested by

no test coverage detected