/** Delete all vectors in given trash. */ private void cleanupTrash(HashSet<Key> trash, Futures fs) { for (Key k : trash) UKV.remove(k, fs); } }
/** Actually remove/delete all Vecs from memory, not just from the Frame. */ @Override public Futures delete_impl(Futures fs) { for( Key k : _keys ) UKV.remove(k,fs); _names = new String[0]; _vecs = new Vec[0]; _keys = new Key[0]; return fs; } @Override public String errStr() { return "Dataset"; }
@Override public void close() { super.close(); if( _toClose != null ) UKV.remove(_toClose._key); } }
@Override public void postGlobal() { super.postGlobal(); _outerMFPT._dout[_outerMFPT._lo] = _dout; _dout = null; // Reclaim GC eagerly if(_removeKey != null) UKV.remove(_removeKey); } }
@Override public Futures remove(Futures fs) { super.remove(fs); UKV.remove(_subsetRowsKey,fs); return fs; }
static public void put( Key key, Freezable fr ) { if( fr == null ) UKV.remove(key); else UKV.put(key,new Value(key, fr)); }
/** * Delete job related keys */ public void delete() { cleanup(); if (_fakejob) UKV.remove(job_key); remove(); }
public Futures remove( Futures fs ) { for( int i=0; i<nChunks(); i++ ) UKV.remove(chunkKey(i),fs); DKV.remove(_key,fs); return fs; }
new PrepData() { @Override int prep(Frame fr) { for (int i=0; i<7;i++) UKV.remove(fr.remove(3)._key); return 3; } }, 1,
private void testToEnumDomainMatch(Vec f, String[] expectedDomain) { Vec ef = null; try { ef = f.toEnum(); String[] actualDomain = ef.domain(); assertArrayEquals("toEnum call returns wrong domain!", expectedDomain, actualDomain); } finally { if (f!=null) UKV.remove(f._key); if (ef!=null) UKV.remove(ef._key); } }
public static void delete( Key k, Key job_key ) { if( k == null ) return; Value val = DKV.get(k); if( val == null ) return; // Or just nothing there to delete if( !val.isLockable() ) UKV.remove(k); // Simple things being deleted else ((Lockable)val.get()).delete(job_key,0.0f); // Lockable being deleted } // Will fail if locked by anybody.
new PrepData() { @Override int prep(Frame fr) { UKV.remove(fr.remove("ID")._key); return fr.find("CAPSULE"); } }, 1,
public void onException(Throwable ex) { UKV.remove(dest()); Value v = DKV.get(progressKey()); if( v != null ) { ChunkProgress p = v.get(); p = p.error(ex.getMessage()); DKV.put(progressKey(), p); } cancel(ex); }
@Override int prep(Frame fr) { assertEquals(380,fr.numRows()); // Remove patient ID vector UKV.remove(fr.remove("ID")._key); // Prostate: predict on CAPSULE return fr.find("CAPSULE"); } };
int prep(Frame fr) { assertEquals(380,fr.numRows()); // Remove patient ID vector UKV.remove(fr.remove("ID")._key); // Prostate: predict on CAPSULE return fr.find("CAPSULE"); } });
private static Frame getFrameForFile(Key outputKey, String path, String [] ignores) { File f = TestUtil.find_test_file(path); Key k = NFSFileVec.make(f); Frame fr = ParseDataset2.parse(outputKey, new Key[]{k}); if(ignores != null) for(String s:ignores) UKV.remove(fr.remove(s)._key); return fr; }
protected void cleanUp(Frame fr, Timer t_build) { //super.cleanUp(fr, t_build); Log.info(logTag(),"Modeling done in "+t_build); // Remove temp vectors; cleanup the Frame while( fr.numCols() > _ncols+1/*Do not delete the response vector*/ ) UKV.remove(fr.remove(fr.numCols()-1)._key); // Unlock the input datasets against deletes source.unlock(self()); if( validation != null && !source._key.equals(validation._key) ) validation.unlock(self()); }
private static Frame getFrameForFile(Key outputKey, String path,String [] ignores, String response){ File f = TestUtil.find_test_file(path); Key k = NFSFileVec.make(f); Frame fr = ParseDataset2.parse(outputKey, new Key[]{k}); if(ignores != null) for(String s:ignores) UKV.remove(fr.remove(s)._key); // put the response to the end if(response != null) fr.add(response, fr.remove(response)); return fr; }
int prep(Frame fr) { assertEquals(380,fr.numRows()); // Remove patient ID vector UKV.remove(fr.remove("ID")._key); // Change CAPSULE and RACE to categoricals Scope.track(fr.factor(fr.find("CAPSULE"))._key); Scope.track(fr.factor(fr.find("RACE" ))._key); // Prostate: predict on CAPSULE return fr.find("CAPSULE"); } }, Family.bernoulli);