Beispiel #1
0
 def shard_generator():  # TODO Enable sharding with shard size parameter
   for input_file in input_files:
     if self.legacy:
       X = encode_bio_sequence(input_file)
     else:
       sequences = _read_file(input_file)
       X = self.featurizer(sequences)
     ids = np.ones(len(X))
     # (X, y, w, ids)
     yield X, None, None, ids
Beispiel #2
0
 def shard_generator():
     for input_file in input_files:
         X = encode_bio_sequence(input_file)
         ids = np.ones(len(X))
         # (X, y, w, ids)
         yield X, None, None, ids