adityajain07 commited on
Commit
d8be122
·
verified ·
1 Parent(s): bf8de12

Delete test.py

Browse files
Files changed (1) hide show
  1. test.py +0 -28
test.py DELETED
@@ -1,28 +0,0 @@
1
- # import webdataset as wds
2
-
3
- # dataset_path = "/home/mila/a/aditya.jain/scratch/global_model/webdataset/train/train450-000000.tar"
4
-
5
- # # Create a WebDataset reader
6
- # dataset = wds.WebDataset(dataset_path)
7
-
8
- # for sample in dataset:
9
- # a = 2
10
- # for key, value in sample.items():
11
- # print(f"{key}: {type(value)}")
12
-
13
- import json
14
-
15
- categ_map_f = "/home/mila/a/aditya.jain/scratch/global_model/category_map.json"
16
- new_categ_map = {}
17
-
18
- with open(categ_map_f, "r") as f:
19
- category_map = json.load(f)
20
-
21
- for key in category_map.keys():
22
- new_key = str(int(float(key)))
23
- new_categ_map[new_key] = category_map[key]
24
-
25
-
26
- with open("/home/mila/a/aditya.jain/scratch/global_model/category_map_v2.json", "w") as f:
27
- json.dump(new_categ_map, f)
28
-