Closed ChibisukeDragon closed 2 years ago
Thank for your CVPR work.
When I wanted to train_net in a new server, I got a new problem.
Traceback (most recent call last):
File "train_net.py", line 101, in <module>
launch(
File "/home/yupeng/opendet2/opendet2/detectron2/detectron2/engine/launch.py", line 82, in launch
main_func(*args)
File "train_net.py", line 59, in main
trainer = OpenDetTrainer(cfg)
File "/home/yupeng/opendet2/opendet2/opendet2/engine/defaults.py", line 121, in __init__
self.register_hooks(self.build_hooks())
File "/home/yupeng/opendet2/opendet2/opendet2/engine/defaults.py", line 195, in build_hooks
ret.append(hooks.PeriodicWriter(self.build_writers(), period=20))
File "/home/yupeng/opendet2/opendet2/opendet2/engine/defaults.py", line 207, in build_writers
return default_writers(self.cfg.OUTPUT_DIR, self.max_iter)
File "/home/yupeng/opendet2/opendet2/detectron2/detectron2/engine/defaults.py", line 253, in default_writers
TensorboardXWriter(output_dir),
File "/home/yupeng/opendet2/opendet2/detectron2/detectron2/utils/events.py", line 145, in __init__
from torch.utils.tensorboard import SummaryWriter
File "/home/yupeng/anaconda3/envs/opendet2/lib/python3.8/site-packages/torch/utils/tensorboard/__init__.py", line 13, in <module>
from .writer import FileWriter, SummaryWriter # noqa: F401
File "/home/yupeng/anaconda3/envs/opendet2/lib/python3.8/site-packages/torch/utils/tensorboard/writer.py", line 9, in <module>
from tensorboard.compat.proto.event_pb2 import SessionLog
File "/home/yupeng/anaconda3/envs/opendet2/lib/python3.8/site-packages/tensorboard/compat/proto/event_pb2.py", line 17, in <module>
from tensorboard.compat.proto import summary_pb2 as tensorboard_dot_compat_dot_proto_dot_summary__pb2
File "/home/yupeng/anaconda3/envs/opendet2/lib/python3.8/site-packages/tensorboard/compat/proto/summary_pb2.py", line 17, in <module>
from tensorboard.compat.proto import tensor_pb2 as tensorboard_dot_compat_dot_proto_dot_tensor__pb2
File "/home/yupeng/anaconda3/envs/opendet2/lib/python3.8/site-packages/tensorboard/compat/proto/tensor_pb2.py", line 16, in <module>
from tensorboard.compat.proto import resource_handle_pb2 as tensorboard_dot_compat_dot_proto_dot_resource__handle__pb2
File "/home/yupeng/anaconda3/envs/opendet2/lib/python3.8/site-packages/tensorboard/compat/proto/resource_handle_pb2.py", line 16, in <module>
from tensorboard.compat.proto import tensor_shape_pb2 as tensorboard_dot_compat_dot_proto_dot_tensor__shape__pb2
File "/home/yupeng/anaconda3/envs/opendet2/lib/python3.8/site-packages/tensorboard/compat/proto/tensor_shape_pb2.py", line 36, in <module>
_descriptor.FieldDescriptor(
File "/home/yupeng/anaconda3/envs/opendet2/lib/python3.8/site-packages/google/protobuf/descriptor.py", line 560, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
(opendet2) yupeng@node01:/home/yupeng/opendet2/opendet2$
I can solve this by using pip install protobuf==3.20.1
When I followed the README to install opendet2, I got some trouble. Here is my command. I have several rtx3090 gpus.
When I run the last command
pip install -v -e .
, I got these error message:I could use
pip install setuptools==58.2.0
and retrypip install -v -e .
, then everything is fine. It seems there are some problems by using the lateset setuptools>=61.0. Maybe you can find more information in the link below: https://github.com/pypa/setuptools/issues/3197 https://github.com/pypa/setuptools/issues/3227 https://github.com/facebookresearch/detectron2/issues/3943 https://github.com/facebookresearch/detectron2/issues/3811 Good luck.