question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError: 'Column' object has no attribute `deferred_dtype`

See original GitHub issue

🐛 Bug

@ndickson-nvidia @BarclayII

The introduction of deferred_dtype in PR #3890 seems to be causing issues when loading a graph file saved with an older version of DGL. Do you have any ideas on fixing the compatibility? We might also want to add a unit test for loading a graph data file saved with an older version of DGL.

WechatIMG8012

Expected behavior

Environment

  • DGL Version (e.g., 1.0): 0.8.2
  • Backend Library & Version (e.g., PyTorch 0.4.1, MXNet/Gluon 1.3):
  • OS (e.g., Linux):
  • How you installed DGL (conda, pip, source):
  • Build command you used (if compiling from source):
  • Python version:
  • CUDA/cuDNN version (if applicable):
  • GPU models and configuration (e.g. V100):
  • Any other relevant information:

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
nv-dlasallecommented, Jun 16, 2022

@natalie-0430 That will depend on how you installed it. If you used pip for example:

pip uninstall dgl-cu113
pip install dgl-cu113==0.8.1 dglgo -f https://data.dgl.ai/wheels/repo.html

@mufeili What’s your preferred fix for this? Should we add hasattr to check if the unpickled object has the new attribute, or should we override __setstate__ (https://docs.python.org/3/library/pickle.html#object.__setstate__) to explicitly populate missing attributes from old versions?

0reactions
jermainewangcommented, Jun 17, 2022

I vote for overriding __setstate__ and __getstate__. Two other related questions:

  • Shall we always make pickling/unpickling backward compatible? This may prevent us from making changes to DGLGraph and Frame.
  • How to properly test pickling/unpickling? This is somewhat related to the question above.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Dataloader error: AttributeError: 'Column' object has no ...
I was using DGL, and all seem well until I encounter the error : AttributeError: 'Column' object has no attribute 'deferred_dtype'
Read more >
AttributeError: 'DataFrame' object has no attribute 'dtype ...
You seem to somehow get back a DataFrame and not a Series by calling X[col] . Not sure why, because you did not...
Read more >
AttributeError: 'DataFrame' object has no attribute 'dtype' ...
Hi Guys, I received the following error when implementing extension of imputer. I wanted to implement extension to Imputation to replace missing value...
Read more >
AttributeError: 'function' object has no attribute
Using protected keywords from the DataFrame API as column names results in a function object has no attribute error message.
Read more >
AttributeError: 'function' object has no attribute
Problem You are selecting columns from a DataFrame and you get an error message. ERROR: AttributeError: 'function' object has no attribute ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found