Skip to content

grounding_dino attributeError: module 'torch.utils._pytree' has no attribute 'register_pytree_node' #824

@NathanHGayle

Description

@NathanHGayle

Hi All,

Following the approach in https://labelstud.io/guide/ml for the grounding_dino model. A couple of errors:

AttributeError: module 'torch.utils._pytree' has no attribute 'register_pytree_node'

[2025-10-22 14:55:56 +0000] [28] [INFO] Worker exiting (pid: 28)

[2025-10-22 14:55:56 +0000] [29] [INFO] Worker exiting (pid: 29)

[2025-10-22 14:55:57 +0000] [7] [ERROR] Worker (pid:28) exited with code 3

[2025-10-22 14:55:57 +0000] [7] [ERROR] Worker (pid:29) exited with code 3

Traceback (most recent call last):

  File "/opt/conda/lib/python3.10/site-packages/gunicorn/arbiter.py", line 208, in run

    self.sleep()

  File "/opt/conda/lib/python3.10/site-packages/gunicorn/arbiter.py", line 359, in sleep

    ready = select.select([self.PIPE[0]], [], [], 1.0)

  File "/opt/conda/lib/python3.10/site-packages/gunicorn/arbiter.py", line 241, in handle_chld

    self.reap_workers()

  File "/opt/conda/lib/python3.10/site-packages/gunicorn/arbiter.py", line 529, in reap_workers

    raise HaltServer(reason, self.WORKER_BOOT_ERROR)

gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/transformer.py", line 20, in <module>

    device: torch.device = torch.device(torch._C._get_default_device()),  # torch.device('cpu'),


A module that was compiled using NumPy 1.x cannot be run in

NumPy 2.2.6 as it may crash. To support both 1.x and 2.x

versions of NumPy, modules must be compiled with NumPy 2.0.

Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.


If you are a user of the module, the easiest solution will be to

downgrade to 'numpy<2' or try to upgrade the affected module.

We expect that some modules will need time to support NumPy 2.

Need some guidance on how to solve these either via the docker file and or the requirements.txt file in \label-studio\ml_pre_labelling\label-studio-ml-backend\label_studio_ml\examples\grounding_dino\

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions