]> code.communitydata.science - cdsc_reddit.git/blobdiff - clustering/lsi_base.py
commit changes from smap project.
[cdsc_reddit.git] / clustering / lsi_base.py
index 45cc49b67060259da15ba650e94f6196fedd320c..80b7101a3723a3910a9b10d7c1ad64fe97db00f8 100644 (file)
@@ -18,11 +18,12 @@ class lsi_grid_sweep(grid_sweep):
         self.subsweep = subsweep
         inpath = Path(inpath)
         if lsi_dimensions == 'all':
         self.subsweep = subsweep
         inpath = Path(inpath)
         if lsi_dimensions == 'all':
-            lsi_paths = list(inpath.glob("*"))
+            lsi_paths = list(inpath.glob("*.feather"))
         else:
         else:
-            lsi_paths = [inpath / (dim + '.feather') for dim in lsi_dimensions]
+            lsi_paths = [inpath / (str(dim) + '.feather') for dim in lsi_dimensions]
 
 
-        lsi_nums = [p.stem for p in lsi_paths]
+        print(lsi_paths)
+        lsi_nums = [int(p.stem) for p in lsi_paths]
         self.hasrun = False
         self.subgrids = [self.subsweep(lsi_path, outpath,  lsi_dim, *args, **kwargs) for lsi_dim, lsi_path in zip(lsi_nums, lsi_paths)]
         self.jobs = list(chain(*map(lambda gs: gs.jobs, self.subgrids)))
         self.hasrun = False
         self.subgrids = [self.subsweep(lsi_path, outpath,  lsi_dim, *args, **kwargs) for lsi_dim, lsi_path in zip(lsi_nums, lsi_paths)]
         self.jobs = list(chain(*map(lambda gs: gs.jobs, self.subgrids)))

Community Data Science Collective || Want to submit a patch?