MCPcopy Create free account
hub / github.com/AnswerDotAI/ModernBERT / AblationDirContext

Class AblationDirContext

tests/test_eval.py:20–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18
19
20class AblationDirContext(object):
21 def __init__(self):
22 self.path = None
23
24 def __enter__(self):
25 self.path = tempfile.mkdtemp()
26 return self.path
27
28 def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any):
29 del exc_type, exc_value, traceback # unused
30 if self.path is not None:
31 shutil.rmtree(self.path)
32
33
34@pytest.mark.parametrize("model_name", ["mosaic_bert", "hf_bert", "flex_bert"])

Callers 1

test_eval_scriptFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_eval_scriptFunction · 0.68