Skip to content

Commit

Permalink
add debug
Browse files Browse the repository at this point in the history
  • Loading branch information
lgqfhwy committed Dec 19, 2023
1 parent 15b2b94 commit c31ae3c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions easy_rec/python/input/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,10 @@ def _get_input_sep(input_id):
def _parse_tag_feature(self, fc, parsed_dict, field_dict):
input_0 = fc.input_names[0]
feature_name = fc.feature_name if fc.HasField('feature_name') else input_0
print('field_dict = ', field_dict, ', input_0 = ', input_0, ', value = ',
field_dict[input_0])
field = field_dict[input_0]
field = tf.Print(field, [field], message='field=')
# Construct the output of TagFeature according to the dimension of field_dict.
# When the input field exceeds 2 dimensions, convert TagFeature to 2D output.
if len(field.get_shape()) < 2 or field.get_shape()[-1] == 1:
Expand Down
2 changes: 2 additions & 0 deletions easy_rec/python/input/odps_input_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def _odps_read(self):
second_split)
if one_data[col_id] not in ['', 'NULL', None]:
batch_data_np[col_id][row_id] = one_data[col_id]
print('batch_data_np = ', batch_data_np)
yield tuple(batch_data_np)
if res_num > 0:
batch_data_np = [x[:res_num] for x in batch_defaults]
Expand All @@ -108,6 +109,7 @@ def _odps_read(self):
second_split)
if one_data[col_id] not in ['', 'NULL', None]:
batch_data_np[col_id][row_id] = one_data[col_id]
print('batch_data_np = ', batch_data_np)
yield tuple(batch_data_np)
reader.close()
logging.info('finish epoch[%d]' % self._num_epoch)
Expand Down

0 comments on commit c31ae3c

Please sign in to comment.