Edward J. Schwartz commited on
Commit
e17a927
·
1 Parent(s): f605db7

update script

Browse files
Files changed (1) hide show
  1. scripts/import datasets.py +10 -3
scripts/import datasets.py CHANGED
@@ -1,4 +1,11 @@
1
  import datasets
2
- # find /wherever -name '*.csv' | tar -T - -c | tar -C /somewhere -x
3
- ds = datasets.load_dataset("csv", "/somewhere")
4
- ds = ds.class_encode_column('Type')
 
 
 
 
 
 
 
 
1
  import datasets
2
+ import subprocess
3
+ subprocess.check("mkdir -p /tmp/somewhere", shell=True)
4
+ subprocess.check("find . -name '*.csv' | tar -T - -c | tar -C /tmp/somewhere -x", shell=True)
5
+ ds = datasets.load_dataset("csv", data_dir="/tmp/somewhere")
6
+ ds = ds.class_encode_column('Type')
7
+ ds['combined'] = ds['train']
8
+ del ds['train']
9
+ print("ds.push_to_hub('ejschwartz/oo-method-test')")
10
+ import IPython
11
+ IPython.embed()