Skip to content

RuntimeError: context has already been set - Finetuning deepdoctection #313

@ghost

Description

Hello,
I am trying to fine-tune deepdoctection tensorpack on fintabnet dataset. I followed instructions on fine-tune notebook but I got this error :
RuntimeError Traceback (most recent call last)
Cell In[140], line 1
----> 1 temp = dd.train_faster_rcnn(path_config_yaml=path_config_yaml,
2 dataset_train=fintabnet,
3 path_weights=path_weights,
4 config_overwrite=config_overwrite,
5 log_dir="/kaggle/working/logs/",
6 build_train_config=build_train_config,
7 dataset_val=dataset_val,
8 build_val_config=build_val_config,
9 metric_name="coco",
10 pipeline_component_name="ImageLayoutService"
11 )
File /kaggle/working/deepdoctection/deepdoctection/train/tp_frcnn_train.py:253, in train_faster_rcnn(path_config_yaml, dataset_train, path_weights, config_overwrite, log_dir, build_train_config, dataset_val, build_val_config, metric_name, metric, pipeline_component_name)
File /kaggle/working/deepdoctection/deepdoctection/train/tp_frcnn_train.py:136, in get_train_dataflow(dataset, config, use_multi_proc_for_train, **build_train_kwargs)
File /kaggle/working/deepdoctection/deepdoctection/utils/file_utils.py:657, in set_mp_spawn()
655 if not _S.mp_context_set:
656 _S.freeze(False)
--> 657 mp.set_start_method("spawn")
658 _S.mp_context_set = True
659 _S.freeze()
File /opt/conda/lib/python3.10/multiprocessing/context.py:247, in DefaultContext.set_start_method(self, method, force)
245 def set_start_method(self, method, force=False):
246 if self._actual_context is not None and not force:
--> 247 raise RuntimeError('context has already been set')
248 if method is None and force:
249 self._actual_context = None
RuntimeError: context has already been set

My code :
temp = dd.train_faster_rcnn(path_config_yaml=path_config_yaml,
dataset_train=fintabnet,
path_weights=path_weights,
config_overwrite=config_overwrite,
log_dir="/kaggle/working/logs/",
build_train_config=build_train_config,
dataset_val=dataset_val,
build_val_config=build_val_config,
metric_name="coco",
pipeline_component_name="ImageLayoutService"
)

Log :
log-3.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions