Skip to content

Warning Pytorch message #13

@nicocardiel

Description

@nicocardiel

When running

# Initialize the generic ground-imaging model
cr_model = cosmic_conn.init_model("ground_imaging")

I get the following warning message:

/Users/cardiel/venv_tea/lib/python3.12/site-packages/torch/__init__.py:1275: 
UserWarning: torch.set_default_tensor_type() is deprecated as of PyTorch 2.1, 
please use torch.set_default_dtype() and torch.set_default_device() as alternatives. 
(Triggered internally at /Users/runner/work/pytorch/pytorch/pytorch/torch/csrc/tensor/python_tensor.cpp:436.)
  _C._set_default_tensor_type(t)

It seems that cosmic_conn is using an old PyTorch function (torch.set_default_tensor_type()) that has been deprecated in PyTorch 2.1+. The PyTorch developers want people to use the newer functions torch.set_default_dtype() and torch.set_default_device() instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions