Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About keypoint detection module #4

Open
canhe173 opened this issue Nov 13, 2022 · 0 comments
Open

About keypoint detection module #4

canhe173 opened this issue Nov 13, 2022 · 0 comments

Comments

@canhe173
Copy link

Hi, guys, when I ran the code bash test/integration_test.sh in my computer for keypoint-detection, I encountered the following problem:

File "/home/nkjx/cloth-fold/keypoints/keypoint-detection/keypoint_detection/train/train.py", line 115, in <module> main(hparams) File "/home/nkjx/cloth-fold/keypoints/keypoint-detection/keypoint_detection/train/train.py", line 60, in main trainer.fit(model, data_module) File "/home/nkjx/miniconda3/envs/keypoint-detection/lib/python3.9/site-packages/pytorch_lightning/trainer/trainer.py", line 579, in fit call._call_and_handle_interrupt( File "/home/nkjx/miniconda3/envs/keypoint-detection/lib/python3.9/site-packages/pytorch_lightning/trainer/call.py", line 38, in _call_and_handle_interrupt return trainer_fn(*args, **kwargs) File "/home/nkjx/miniconda3/envs/keypoint-detection/lib/python3.9/site-packages/pytorch_lightning/trainer/trainer.py", line 621, in _fit_impl self._run(model, ckpt_path=self.ckpt_path) File "/home/nkjx/miniconda3/envs/keypoint-detection/lib/python3.9/site-packages/pytorch_lightning/trainer/trainer.py", line 1058, in _run results = self._run_stage() File "/home/nkjx/miniconda3/envs/keypoint-detection/lib/python3.9/site-packages/pytorch_lightning/trainer/trainer.py", line 1137, in _run_stage self._run_train() File "/home/nkjx/miniconda3/envs/keypoint-detection/lib/python3.9/site-packages/pytorch_lightning/trainer/trainer.py", line 1160, in _run_train self.fit_loop.run() File "/home/nkjx/miniconda3/envs/keypoint-detection/lib/python3.9/site-packages/pytorch_lightning/loops/loop.py", line 200, in run self.on_advance_end() File "/home/nkjx/miniconda3/envs/keypoint-detection/lib/python3.9/site-packages/pytorch_lightning/loops/fit_loop.py", line 295, in on_advance_end self.trainer._call_callback_hooks("on_train_epoch_end") File "/home/nkjx/miniconda3/envs/keypoint-detection/lib/python3.9/site-packages/pytorch_lightning/trainer/trainer.py", line 1340, in _call_callback_hooks fn(self, self.lightning_module, *args, **kwargs) File "/home/nkjx/miniconda3/envs/keypoint-detection/lib/python3.9/site-packages/pytorch_lightning/callbacks/model_checkpoint.py", line 312, in on_train_epoch_end self._save_topk_checkpoint(trainer, monitor_candidates) File "/home/nkjx/miniconda3/envs/keypoint-detection/lib/python3.9/site-packages/pytorch_lightning/callbacks/model_checkpoint.py", line 369, in _save_topk_checkpoint self._save_monitor_checkpoint(trainer, monitor_candidates) File "/home/nkjx/miniconda3/envs/keypoint-detection/lib/python3.9/site-packages/pytorch_lightning/callbacks/model_checkpoint.py", line 652, in _save_monitor_checkpoint self._update_best_and_save(current, trainer, monitor_candidates) File "/home/nkjx/miniconda3/envs/keypoint-detection/lib/python3.9/site-packages/pytorch_lightning/callbacks/model_checkpoint.py", line 703, in _update_best_and_save self._save_checkpoint(trainer, filepath) File "/home/nkjx/miniconda3/envs/keypoint-detection/lib/python3.9/site-packages/pytorch_lightning/callbacks/model_checkpoint.py", line 381, in _save_checkpoint logger.after_save_checkpoint(proxy(self)) File "/home/nkjx/miniconda3/envs/keypoint-detection/lib/python3.9/site-packages/pytorch_lightning/loggers/wandb.py", line 515, in after_save_checkpoint self._scan_and_log_checkpoints(checkpoint_callback) File "/home/nkjx/miniconda3/envs/keypoint-detection/lib/python3.9/site-packages/pytorch_lightning/loggers/wandb.py", line 594, in _scan_and_log_checkpoints artifact = wandb.Artifact(name=f"model-{self.experiment.id}", type="model", metadata=metadata) File "/home/nkjx/miniconda3/envs/keypoint-detection/lib/python3.9/site-packages/wandb/sdk/wandb_artifacts.py", line 164, in __init__ metadata = _normalize_metadata(metadata) File "/home/nkjx/miniconda3/envs/keypoint-detection/lib/python3.9/site-packages/wandb/sdk/wandb_artifacts.py", line 98, in _normalize_metadata Dict[str, Any], json.loads(json.dumps(util.make_safe_for_json(metadata))) File "/home/nkjx/miniconda3/envs/keypoint-detection/lib/python3.9/json/__init__.py", line 231, in dumps return _default_encoder.encode(obj) File "/home/nkjx/miniconda3/envs/keypoint-detection/lib/python3.9/json/encoder.py", line 199, in encode chunks = self.iterencode(o, _one_shot=True) File "/home/nkjx/miniconda3/envs/keypoint-detection/lib/python3.9/json/encoder.py", line 257, in iterencode return _iterencode(o, 0) File "/home/nkjx/miniconda3/envs/keypoint-detection/lib/python3.9/json/encoder.py", line 179, in default raise TypeError(f'Object of type {o.__class__.__name__} ' TypeError: Object of type Tensor is not JSON serializable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant