Browse Source

Update run_task.py

Lin Manhui 2 years ago
parent
commit
e1d5b41ce6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      test_tipc/run_task.py

+ 2 - 2
test_tipc/run_task.py

@@ -55,7 +55,7 @@ if __name__ == '__main__':
             cfg['download_url'], path=cfg['download_path'])
             cfg['download_url'], path=cfg['download_path'])
 
 
     if not isinstance(cfg['datasets']['eval'].args, dict):
     if not isinstance(cfg['datasets']['eval'].args, dict):
-        raise ValueError("args of eval dataset must be a dict!")
+        raise TypeError("args of eval dataset must be a dict!")
     if cfg['datasets']['eval'].args.get('transforms', None) is not None:
     if cfg['datasets']['eval'].args.get('transforms', None) is not None:
         raise ValueError(
         raise ValueError(
             "Found key 'transforms' in args of eval dataset and the value is not None."
             "Found key 'transforms' in args of eval dataset and the value is not None."
@@ -67,7 +67,7 @@ if __name__ == '__main__':
 
 
     if cfg['cmd'] == 'train':
     if cfg['cmd'] == 'train':
         if not isinstance(cfg['datasets']['train'].args, dict):
         if not isinstance(cfg['datasets']['train'].args, dict):
-            raise ValueError("args of train dataset must be a dict!")
+            raise TypeError("args of train dataset must be a dict!")
         if cfg['datasets']['train'].args.get('transforms', None) is not None:
         if cfg['datasets']['train'].args.get('transforms', None) is not None:
             raise ValueError(
             raise ValueError(
                 "Found key 'transforms' in args of train dataset and the value is not None."
                 "Found key 'transforms' in args of train dataset and the value is not None."