MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / parse_csv

Function parse_csv

modelzoo/esmm/train.py:320–327  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

318# generate dataset pipline
319def build_model_input(filename, batch_size, num_epochs, seed, stock_tf, workqueue=None):
320 def parse_csv(value):
321 tf.logging.info('Parsing {}'.format(filename))
322 columns = tf.io.decode_csv(value, record_defaults=defaults)
323 all_columns = collections.OrderedDict(zip(headers, columns))
324 labels = [all_columns.pop(LABEL_COLUMNS[0]), all_columns.pop(LABEL_COLUMNS[1])]
325 label = tf.multiply(labels[0], labels[1])
326 features = all_columns
327 return features, label
328
329 def parse_parquet(value):
330 tf.logging.info('Parsing {}'.format(filename))

Callers

nothing calls this directly

Calls 4

infoMethod · 0.80
multiplyMethod · 0.80
formatMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected