TypeError: print_exception() got an unexpected keyword argument 'etype' error in training s3dis
mtz-soe opened this issue · 2 comments
@JonasSchult I appreciate your work and support.
When I train s3dis datasets with
python main_instance_segmentation.py
general.project_name="s3dis"
general.experiment_name="area1_pretrained_ms"
data.batch_size=4
data/datasets=s3dis
general.num_targets=14
data.num_labels=13
general.area=1
general.checkpoint="checkpoints/s3dis/scannet_pretrained/scannet_pretrained.ckpt"
trainer.check_val_every_n_epoch=10
optimizer.lr=0.00001
and I got the following errors.
ANTLR runtime and generated code versions disagree: 4.9.3!=4.8
ANTLR runtime and generated code versions disagree: 4.9.3!=4.8
ANTLR runtime and generated code versions disagree: 4.9.3!=4.8
ANTLR runtime and generated code versions disagree: 4.9.3!=4.8
ANTLR runtime and generated code versions disagree: 4.9.3!=4.8
ANTLR runtime and generated code versions disagree: 4.9.3!=4.8
ANTLR runtime and generated code versions disagree: 4.9.3!=4.8
ANTLR runtime and generated code versions disagree: 4.9.3!=4.8
ANTLR runtime and generated code versions disagree: 4.9.3!=4.8
ANTLR runtime and generated code versions disagree: 4.9.3!=4.8
ANTLR runtime and generated code versions disagree: 4.9.3!=4.8
ANTLR runtime and generated code versions disagree: 4.9.3!=4.8
ANTLR runtime and generated code versions disagree: 4.9.3!=4.8
ANTLR runtime and generated code versions disagree: 4.9.3!=4.8
ANTLR runtime and generated code versions disagree: 4.9.3!=4.8
ANTLR runtime and generated code versions disagree: 4.9.3!=4.8
ANTLR runtime and generated code versions disagree: 4.9.3!=4.8
ANTLR runtime and generated code versions disagree: 4.9.3!=4.8
ANTLR runtime and generated code versions disagree: 4.9.3!=4.8
ANTLR runtime and generated code versions disagree: 4.9.3!=4.8
/home/pub-7/anaconda3/envs/mask3d-soe/lib/python3.10/site-packages/lightning_fabric/utilities/seed.py:40: No seed found, seed set to 618238794
Seed set to 618238794
EXPERIMENT ALREADY EXIST
{'target': 'pytorch_lightning.loggers.WandbLogger', 'project': '${general.project_name}', 'name': '${general.experiment_name}', 'save_dir': '${general.save_dir}', 'entity': 'maythinzarsoe456', 'resume': 'allow', 'id': '${general.experiment_name}'}
wandb: Currently logged in as: maythinzarsoe456. Use wandb login --relogin
to force relogin
wandb: Tracking run with wandb version 0.15.12
wandb: Run data is saved locally in saved/area1_pretrained_mtzs/wandb/run-20231016_120000-area1_pretrained_mtzs
wandb: Run wandb offline
to turn off syncing.
wandb: Resuming run area1_pretrained_mtzs
wandb: ⭐️ View project at https://wandb.ai/maythinzarsoe456/s3dis
wandb: 🚀 View run at https://wandb.ai/maythinzarsoe456/s3dis/runs/area1_pretrained_mtzs
[2023-10-16 12:00:01,503][torch.distributed.nn.jit.instantiator][INFO] - Created a temporary directory at /tmp/tmp2s9pbryh
[2023-10-16 12:00:01,503][torch.distributed.nn.jit.instantiator][INFO] - Writing /tmp/tmp2s9pbryh/_remote_module_non_scriptable.py
Traceback (most recent call last):
File "/home/pub-7/anaconda3/envs/mask3d-soe/lib/python3.10/site-packages/hydra/_internal/utils.py", line 544, in _locate
import_module(mod)
File "/home/pub-7/anaconda3/envs/mask3d-soe/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/pub-7/msoe/Mask3D-main/models/matcher.py", line 12, in
from detectron2.projects.point_rend.point_features import point_sample
File "/home/pub-7/anaconda3/envs/mask3d-soe/lib/python3.10/site-packages/detectron2/projects/point_rend/init.py", line 3, in
from .mask_head import PointRendMaskHead, ImplicitPointRendMaskHead
File "/home/pub-7/anaconda3/envs/mask3d-soe/lib/python3.10/site-packages/detectron2/projects/point_rend/mask_head.py", line 13, in
from detectron2.modeling import ROI_MASK_HEAD_REGISTRY
File "/home/pub-7/anaconda3/envs/mask3d-soe/lib/python3.10/site-packages/detectron2/modeling/init.py", line 15, in
from .meta_arch import (
File "/home/pub-7/anaconda3/envs/mask3d-soe/lib/python3.10/site-packages/detectron2/modeling/meta_arch/init.py", line 6, in
from .panoptic_fpn import PanopticFPN
File "/home/pub-7/anaconda3/envs/mask3d-soe/lib/python3.10/site-packages/detectron2/modeling/meta_arch/panoptic_fpn.py", line 14, in
from .rcnn import GeneralizedRCNN
File "/home/pub-7/anaconda3/envs/mask3d-soe/lib/python3.10/site-packages/detectron2/modeling/meta_arch/rcnn.py", line 9, in
from detectron2.data.detection_utils import convert_image_to_rgb
File "/home/pub-7/anaconda3/envs/mask3d-soe/lib/python3.10/site-packages/detectron2/data/init.py", line 2, in
from . import transforms # isort:skip
File "/home/pub-7/anaconda3/envs/mask3d-soe/lib/python3.10/site-packages/detectron2/data/transforms/init.py", line 4, in
from .transform import *
File "/home/pub-7/anaconda3/envs/mask3d-soe/lib/python3.10/site-packages/detectron2/data/transforms/transform.py", line 36, in
class ExtentTransform(Transform):
File "/home/pub-7/anaconda3/envs/mask3d-soe/lib/python3.10/site-packages/detectron2/data/transforms/transform.py", line 46, in ExtentTransform
def init(self, src_rect, output_size, interp=Image.LINEAR, fill=0):
AttributeError: module 'PIL.Image' has no attribute 'LINEAR'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/pub-7/anaconda3/envs/mask3d-soe/lib/python3.10/site-packages/hydra/utils.py", line 61, in call
type_or_callable = _locate(cls)
File "/home/pub-7/anaconda3/envs/mask3d-soe/lib/python3.10/site-packages/hydra/_internal/utils.py", line 546, in _locate
raise ImportError(
ImportError: Encountered error: module 'PIL.Image' has no attribute 'LINEAR'
when loading module 'models.matcher.HungarianMatcher'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/pub-7/anaconda3/envs/mask3d-soe/lib/python3.10/site-packages/hydra/_internal/utils.py", line 198, in run_and_report
return func()
File "/home/pub-7/anaconda3/envs/mask3d-soe/lib/python3.10/site-packages/hydra/_internal/utils.py", line 347, in
lambda: hydra.run(
File "/home/pub-7/anaconda3/envs/mask3d-soe/lib/python3.10/site-packages/hydra/_internal/hydra.py", line 107, in run
return run_job(
File "/home/pub-7/anaconda3/envs/mask3d-soe/lib/python3.10/site-packages/hydra/core/utils.py", line 128, in run_job
ret.return_value = task_function(task_cfg)
File "/home/pub-7/msoe/Mask3D-main/main_instance_segmentation.py", line 108, in main
train(cfg)
File "/home/pub-7/anaconda3/envs/mask3d-soe/lib/python3.10/site-packages/hydra/main.py", line 27, in decorated_main
return task_function(cfg_passthrough)
File "/home/pub-7/msoe/Mask3D-main/main_instance_segmentation.py", line 70, in train
cfg, model, loggers = get_parameters(cfg)
File "/home/pub-7/msoe/Mask3D-main/main_instance_segmentation.py", line 53, in get_parameters
model = InstanceSegmentation(cfg)
File "/home/pub-7/msoe/Mask3D-main/trainer/trainer.py", line 83, in init
matcher = hydra.utils.instantiate(config.matcher)
File "/home/pub-7/anaconda3/envs/mask3d-soe/lib/python3.10/site-packages/hydra/utils.py", line 70, in call
raise HydraException(f"Error calling '{cls}' : {e}") from e
hydra.errors.HydraException: Error calling 'models.matcher.HungarianMatcher' : Encountered error: module 'PIL.Image' has no attribute 'LINEAR'
when loading module 'models.matcher.HungarianMatcher'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pub-7/msoe/Mask3D-main/main_instance_segmentation.py", line 114, in
main()
File "/home/pub-7/anaconda3/envs/mask3d-soe/lib/python3.10/site-packages/hydra/main.py", line 32, in decorated_main
_run_hydra(
File "/home/pub-7/anaconda3/envs/mask3d-soe/lib/python3.10/site-packages/hydra/_internal/utils.py", line 346, in _run_hydra
run_and_report(
File "/home/pub-7/anaconda3/envs/mask3d-soe/lib/python3.10/site-packages/hydra/_internal/utils.py", line 267, in run_and_report
print_exception(etype=None, value=ex, tb=final_tb) # type: ignore
TypeError: print_exception() got an unexpected keyword argument 'etype'
wandb: Waiting for W&B process to finish... (failed 1). Press Control-C to abort syncing.
wandb: 🚀 View run area1_pretrained_mtzs at: https://wandb.ai/maythinzarsoe456/s3dis/runs/area1_pretrained_mtzs
wandb: Synced 3 W&B file(s), 0 media file(s), 0 artifact file(s) and 0 other file(s)
wandb: Find logs at: saved/area1_pretrained_mtzs/wandb/run-20231016_120000-area1_pretrained_mtzs/logs
That would save me alot if you could guide me how to solved this?
Are you OK now?
bro i a faced the same question and find the solution in this page facebookresearch/detectron2#5010
in this method