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.

[BUG] Example not working

See original GitHub issue

🐛🐛 Bug Report

When I run the example at https://docs.activeloop.ai/getting-started/creating-datasets-manually. I get an error.

⚗️ Current Behavior

ds.labels.append(label) # Append to labels tensor

Dtype was expected to be ‘uint32’ instead it was ‘int64’. If you called create_tensor explicitly with dtype, your samples should also be of that dtype. Htype ‘class_label’ expects samples to have dtype=‘uint32’.

⚙️ Environment

Python: [3.7.1. 64 bit ]

🧰 Possible Solution (optional)

workaround solves this

ds.labels.append(np.asarray([label]).astype(np.uint32)[0])

another option is to make the dtype of the tensor 64 bit.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
Irvenaecommented, Jul 16, 2021

yes, I know how to update the type 😃 that isn’t the problem. I just wanted to note that the example doesn’t work out of the box 😃 so it is probably better to cast to the expected numpy type by the suggested modification (ds.labels.append(np.uint32(label)) )

1reaction
nolliedcommented, Jul 16, 2021

ds.labels.append(np.asarray([label]).astype(np.uint32)[0])

can instead be:

ds.labels.append(np.uint32(label))

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get all your bugs resolved without any 'Invalid bug' label?
#2) Check if your Database is proper: Missing table might be the main reason that your application will not work properly. A classic...
Read more >
How to fix bugs, step by step - Software Engineering Tips
Step 3: Identify the immediate line of code where the bug occurs ... If it's a crashing bug then try running the program...
Read more >
Difference between Bugs, Errors and Issues | BrowserStack
The term Bug refers to any shortcoming in a software system that causes it to behave in unexpected and undesirable ways. These could...
Read more >
How do you fix a bug you can't replicate? - Stack Overflow
Gather hard numerical data on the problem. A problem that might, at first, appear random, might actually have a pattern. Change Management. Sometimes...
Read more >
Bug Types (Summary) | Test IO Academy
A bug is a software-related problem. If something on a website or in an application does not work as intended, this “error” is...
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