Closed Candice52 closed 1 year ago
单步执行step2中的第一部分train时候还会遇见下面这个问题…,这个是缺少什么文件呀?
Traceback (most recent call last):
File "train.py", line 315, in
在执行pipelin.sh 文件的时候遇到如下问题 FileNotFoundError: [Errno 2] No such file or directory: './exps/seq2edit_lang8/Temp_Model.th'
这个怎么解决呢?
这个是你cold step阶段的程序没有成功运行导致的
单步执行step2中的第一部分train时候还会遇见下面这个问题…,这个是缺少什么文件呀?
Traceback (most recent call last): File "train.py", line 315, in main(args) File "train.py", line 205, in main trainer.train() File "/data/jydong/anaconda3/envs/SE/lib/python3.8/site-packages/allennlp/training/trainer.py", line 966, in train return self._try_train() File "/data/jydong/anaconda3/envs/SE/lib/python3.8/site-packages/allennlp/training/trainer.py", line 1001, in _try_train train_metrics = self._train_epoch(epoch) File "/data/jydong/anaconda3/envs/SE/lib/python3.8/site-packages/allennlp/training/trainer.py", line 681, in _train_epoch for batch_group in batch_group_generator_tqdm: File "/data/jydong/anaconda3/envs/SE/lib/python3.8/site-packages/tqdm/std.py", line 1195, in iter for obj in iterable: File "/data/jydong/anaconda3/envs/SE/lib/python3.8/site-packages/allennlp/common/util.py", line 138, in lazy_groups_of s = list(islice(iterator, group_size)) File "/data/jydong/anaconda3/envs/SE/lib/python3.8/site-packages/allennlp/data/dataloader.py", line 115, in iter yield from super().iter() File "/data/jydong/anaconda3/envs/SE/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 435, in next data = self._next_data() File "/data/jydong/anaconda3/envs/SE/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 475, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "/data/jydong/anaconda3/envs/SE/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 28, in fetch data.append(next(self.dataset_iter)) File "/data/jydong/anaconda3/envs/SE/lib/python3.8/site-packages/allennlp/data/dataset_readers/dataset_reader.py", line 80, in iter for instance in self._instance_generator(self._file_path): File "/data/jydong/anaconda3/envs/SE/lib/python3.8/site-packages/allennlp/data/dataset_readers/dataset_reader.py", line 452, in _instance_iterator yield from self._multi_worker_islice(self._read(file_path), ensure_lazy=True) File "/data/jydong/anaconda3/envs/SE/lib/python3.8/site-packages/tqdm/std.py", line 1195, in iter for obj in iterable: File "/data/jydong/MuCGEC-main/models/seq2edit-based-CGEC/gector/datareader.py", line 83, in _read file_path = cached_path(file_path) File "/data/jydong/anaconda3/envs/SE/lib/python3.8/site-packages/allennlp/common/file_utils.py", line 244, in cached_path raise FileNotFoundError(f"file {url_or_filename} not found") FileNotFoundError: file .shuf not found
这个是你未生成训练数据or未对训练数据做打乱,如果你是windows系统可能不存在shuf命令,需要手动打乱一下训练数据。
感谢回复~解决啦
在执行pipelin.sh 文件的时候遇到如下问题 FileNotFoundError: [Errno 2] No such file or directory: './exps/seq2edit_lang8/Temp_Model.th'
这个怎么解决呢?