Project-MONAI / Project-MONAI/tutorials
run error in monailabel
Personne n'a encore pris cette issue.
- Langage dominant
- Jupyter Notebook
- Étoiles
- 2.5k
- Forks
- 803
- Merge moyen
- 6 j 22 h
- PR mergées (30 j)
- 3
Description
Hello, thank you very much for your great work on MONAI Label.
When I tried to run the following command:
monailabel start_server --app apps/monaibundle --studies datasets/venous_liver --conf models pancreas_ct_dints_segmentation
I encountered this error:
File "D:\anaconda\envs\monailabel\lib\site-packages\monai\bundle\config_item.py", line 374, in evaluate return eval(value[len(self.prefix) :], globals_, locals) File "<string>", line 1, in <module> File "D:\anaconda\envs\monailabel\lib\site-packages\torch\serialization.py", line 1524, in load raise pickle.UnpicklingError(_get_wo_message(str(e))) from None _pickle.UnpicklingError: Weights only load failed. This file can still be loaded, to do so you have two options, do those steps only if you trust the source of the checkpoint. (1) In PyTorch 2.6, we changed the default value of the weights_onlyargument intorch.loadfromFalsetoTrue. Re-running torch.loadwithweights_onlyset toFalsewill likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source. (2) Alternatively, to load withweights_only=Trueplease check the recommended steps in the following error message. WeightsUnpickler error: Unsupported global: GLOBAL numpy.core.multiarray._reconstruct was not an allowed global by default. Please usetorch.serialization.add_safe_globals([numpy.core.multiarray._reconstruct])or thetorch.serialization.safe_globals([numpy.core.multiarray._reconstruct])context manager to allowlist this global if you trust this class/function.
`RuntimeError: Failed to evaluate ConfigExpression:
"$torch.load(__local_refs['arch_ckpt_path'], map_location=torch.device('cuda'))"
[2025-07-07 21:02:28,103] [19056] [MainThread] [ERROR] (uvicorn.error:59) - Application startup failed. Exiting.`
Here is my PyTorch version:
Name: torch Version: 2.7.1+cu128 Summary: Tensors and Dynamic neural networks in Python with strong GPU acceleration Home-page: https://pytorch.org/ Author: PyTorch Team Author-email: packages@pytorch.org License: BSD-3-Clause Location: d:\anaconda\envs\monailabel\lib\site-packages Requires: filelock, fsspec, jinja2, networkx, sympy, typing-extensions Required-by: lpips, monai, pytorch-ignite, sam2, torchaudio, torchio, torchvision
Could you please advise me on how to properly resolve this issue?
Thank you very much for your time and help!
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par reproduire la commande monailabel start_server signalée avec PyTorch 2.7.1 et examinez l’expression torch.load dans l’erreur. Confirmez si le comportement de chargement du checkpoint est causé par la version de PyTorch signalée et définissez l’achèvement comme un moyen documenté ou vérifié de démarrer l’application sans cette erreur.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python, pytorch
- Domaine
- machine-learning
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100