This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from huggingface import load_dataset | |
| from argparse import ArgumentParser | |
| def get_docker_image_key(key, dataset_prefix): | |
| return f'swebench/sweb.{dataset_prefix}.x86_64.{key.lower()}:latest'.replace('__', '_1776_') | |
| def main(dataset_name, instance_ids=None): | |
| dataset_prefix = 'mm.eval' if 'multimodal' in dataset_name.lower() else 'eval' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def get_bbox(obj, max_x, max_y, padding=6): | |
| x0, y0 = obj['x'], obj['y'] | |
| x1, y1 = x0 + obj['w'], y0 + obj['h'] | |
| return max(x0-padding, 0), min(x1+padding, max_x), max(y0-padding, 0), min(y1+padding, max_y) | |
| def blur_context(img, sigma, bboxes): | |
| ksize = 0 | |
| img_blurred = cv2.GaussianBlur(img, (ksize, ksize), sigma) | |
| objs_mask = np.zeros_like(img) | |
| for bbox in bboxes: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def get_dense_gradients(self, client_grads, k=6): | |
| if type(client_grads[0]) != list: | |
| client_grads = [client_grads] | |
| return list(map(lambda x: x[2][k].flatten(), client_grads)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <time.h> | |
| //////////////////////////////// | |
| // Constants | |
| //////////////////////////////// | |
| /* DP Mantissa Mask Bits */ | |
| long long DPMANT = 0x000fffffffffffff; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <time.h> | |
| //////////////////////////////// | |
| // Constants | |
| //////////////////////////////// | |
| /* DP Mantissa Mask Bits */ | |
| long long DPMANT = 0x000fffffffffffff; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --arch fpnetx_y --arch-args 45 6 --epochs 60 --process t2_rel --logdir c00013 --dataset random_9m --optimizer adam --schedule 15 30 45 --lr 0.01 --gamma 0.1 | |
| --arch fpnetx_y --arch-args 70 3 --epochs 60 --process t2_rel --logdir c00014 --dataset random_9m --optimizer adam --schedule 15 30 45 --lr 0.01 --gamma 0.1 | |
| --arch fpnetx_y --arch-args 45 6 --epochs 60 --process t2_rel --logdir c00015 --dataset random_9m --optimizer adam --schedule 15 30 45 --lr 0.01 --gamma 0.4 | |
| --arch fpnetx_y --arch-args 70 3 --epochs 60 --process t2_rel --logdir c00016 --dataset random_9m --optimizer adam --schedule 15 30 45 --lr 0.01 --gamma 0.4 |