!17869 [MD] fix code check in master

Merge pull request !17869 from liyong126/fix_codecheck_master
This commit is contained in:
i-robot 2021-06-08 10:28:43 +08:00 committed by Gitee
commit c60e95d269
2 changed files with 6 additions and 0 deletions

View File

@ -3007,6 +3007,9 @@ class TransferDataset(Dataset):
self._to_device.continue_send()
def get_data_info(self):
"""
Get type and shape of current batch
"""
if self._to_device is not None:
return self._to_device.get_data_info()
raise RuntimeError("Calling get_data_info with bad state.")

View File

@ -74,6 +74,9 @@ class CsvToMR:
@staticmethod
def check_columns(columns, columns_name):
"""
Validate the columns of csv
"""
if not columns:
return
if isinstance(columns, list):