<jupyter_start><jupyter_text>Baseline<jupyter_code>cfg = get_cfg()
cfg.merge_from_file(
        model_zoo.get_config_file("COCO-Detection/faster_rcnn_R_101_FPN_3x.yaml")
    )
cfg.MODEL.WEIGHTS = model_zoo.get_checkpoint_url(
    "COCO-Detection/faster_rcnn_R_101_FPN_3x.yaml"
)
predictor = DefaultPredictor(cfg)
model = predictor.model
baseline_res = inference_on_dataset(model, dataset, evaluator)
with open(os.path.join(OUTPUT_DIR, 'baseline_res.pickle'), 'wb') as f:
    pickle.dump(baseline_res, f)<jupyter_output><empty_output><jupyter_text>HKRM<jupyter_code>cfg = construct_config()
model = build_model(cfg)
import glob 
models = glob.glob(os.path.join(OUTPUT_DIR, 'model_*.pth'))
res = dict()
for checkpoint_f in sorted(models):
    checkpoint =  torch.load(checkpoint_f)
    model.load_state_dict(checkpoint['model'])    
    res[checkpoint_f] = (inference_on_dataset(model, dataset, evaluator))
import pickle
with open(os.path.join(OUTPUT_DIRTPUT_DIR, 'eval.pickle'), 'wb') as handle:
    pickle.dump(res, handle, protocol=pickle.HIGHEST_PROTOCOL)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12603495860165592, 'fraction_numerical': 0.007359705611775529, 'mean_word_length': 6.9416058394160585, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '234679', 'license': 'MIT', 'n_tokens_mistral': 432, 'n_tokens_neox': 419, 'n_words': 55, 'path': 'notebooks/COCOEval.ipynb', 'repo_name': 'Ahmedjjj/midas_hkrm', 'size': '1087'}