AttributeError Traceback (most recent call last) Input In [5], in <cell line: 7>() 1 model_id = 'damo/nlp_convai_text2sql_pretrain_cn' 2 trainer = TableQuestionAnsweringTrainer( 3 model=model_id, 4 train_dataset=train_dataset, 5 eval_dataset=eval_dataset, 6 ) ----> 7 trainer.train( 8 batch_size=1,#8 9 total_epoches=1,#2 10 ) 11 trainer.evaluate( 12 checkpoint_path=os.path.join(trainer.model.model_dir, 'finetuned_model.bin'))
File C:\ProgramData\Anaconda3\lib\site-packages\modelscope\trainers\nlp\table_question_answering_trainer.py:495, in TableQuestionAnsweringTrainer.train(self, batch_size, total_epoches, backbone_learning_rate, head_learning_rate, backbone_weight_decay, head_weight_decay, warmup_ratio) 493 self.model.head_model.train() 494 self.model.backbone_model.train() --> 495 for iB, item in enumerate(train_loader): 496 nlu, nlu_t, sql_i, q_know, t_know, action, hs_t, types, units, his_sql, schema_link =
497 self.model.get_fields_info(item, None, train=True) 499 # forward process
File C:\ProgramData\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py:359, in DataLoader.iter(self) 357 return self._iterator 358 else: --> 359 return self._get_iterator()
File C:\ProgramData\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py:305, in DataLoader._get_iterator(self) 303 else: 304 self.check_worker_number_rationality() --> 305 return _MultiProcessingDataLoaderIter(self)
File C:\ProgramData\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py:918, in _MultiProcessingDataLoaderIter.init(self, loader) 911 w.daemon = True 912 # NB: Process.start() actually take some time as it needs to 913 # start a process and pass the arguments over via a pipe. 914 # Therefore, we only add a worker to self._workers list after 915 # it started, so that we do not call .join() if program dies 916 # before it starts, and del tries to join but will get: 917 # AssertionError: can only join a started process. --> 918 w.start() 919 self._index_queues.append(index_queue) 920 self._workers.append(w)
File C:\ProgramData\Anaconda3\lib\multiprocessing\process.py:121, in BaseProcess.start(self) 118 assert not _current_process._config.get('daemon'),
119 'daemonic processes are not allowed to have children' 120 _cleanup() --> 121 self._popen = self._Popen(self) 122 self._sentinel = self._popen.sentinel 123 # Avoid a refcycle if the target function holds an indirect 124 # reference to the process object (see bpo-30775)
File C:\ProgramData\Anaconda3\lib\multiprocessing\context.py:224, in Process._Popen(process_obj) 222 @staticmethod 223 def _Popen(process_obj): --> 224 return _default_context.get_context().Process._Popen(process_obj)
File C:\ProgramData\Anaconda3\lib\multiprocessing\context.py:327, in SpawnProcess._Popen(process_obj) 324 @staticmethod 325 def _Popen(process_obj): 326 from .popen_spawn_win32 import Popen --> 327 return Popen(process_obj)
File C:\ProgramData\Anaconda3\lib\multiprocessing\popen_spawn_win32.py:93, in Popen.init(self, process_obj) 91 try: 92 reduction.dump(prep_data, to_child) ---> 93 reduction.dump(process_obj, to_child) 94 finally: 95 set_spawning_popen(None)
File C:\ProgramData\Anaconda3\lib\multiprocessing\reduction.py:60, in dump(obj, file, protocol) 58 def dump(obj, file, protocol=None): 59 '''Replacement for pickle.dump() using ForkingPickler.''' ---> 60 ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'TableQuestionAnsweringTrainer.train..'
AttributeError: Can't pickle local object 'TableQuestionAnsweringTrainer.train..'