nateraw commited on
Commit
94672a2
·
1 Parent(s): b0d5b00

Create update_config.py

Browse files
Files changed (1) hide show
  1. update_config.py +19 -0
update_config.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Here, we override config to have num_workers=0 because
3
+ of a limitation in HF Spaces Docker /dev/shm.
4
+ """
5
+
6
+ import json
7
+ from pathlib import Path
8
+
9
+
10
+ def main(config_file="configs/44k/config.json"):
11
+ config_path = Path(config_file)
12
+ data = json.loads(config_path.read_text())
13
+ data['train']['num_workers'] = 0
14
+ data['train']['persistent_workers'] = False
15
+ config_path.write_text(json.dumps(data, indent=2, sort_keys=False))
16
+
17
+
18
+ if __name__ == "__main__":
19
+ main()