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.

Unusual error on lightly-1.2.12

See original GitHub issue

Getting this error:

Epoch 19: 100% 430/430 [17:42<00:00,  2.47s/it, loss=2.05, v_num=0]
Best model is stored at: /content/lightly_outputs/2022-04-04/12-01-48/lightly_epoch_18.ckpt
########## Starting to embed your dataset.

Error executing job with overrides: ['token=min', 'dataset_id=mine', 'input_dir=/content/drive/MyDrive/data/mine/', 'trainer.max_epochs=20']
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/lightly/cli/", line 114, in lightly_cli
    return _lightly_cli(cfg)
  File "/usr/local/lib/python3.7/dist-packages/lightly/cli/", line 60, in _lightly_cli
    embeddings = _embed_cli(cfg, is_cli_call)
  File "/usr/local/lib/python3.7/dist-packages/lightly/cli/", line 83, in _embed_cli
    embeddings, labels, filenames = encoder.embed(dataloader, device=device)
  File "/usr/local/lib/python3.7/dist-packages/lightly/embedding/", line 113, in embed
AttributeError: 'BackgroundGenerator' object has no attribute 'dataset'

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

There are jpgs in /content/drive/MyDrive/data/mine/ Token/dataset_ide correct

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

philippmwirthcommented, Apr 4, 2022

Hey @robmarkcole thanks for reporting this bug!

This should be easy to temporarily resolve by uninstalling the prefetch_generator package or setting up a new environment without it.

The problem occurs because of this line replacing the PyTorch dataloader by a BackgroundGenerator:

We’ll work on a fix 👍

robmarkcolecommented, Apr 6, 2022

I am executing the command in the shell via !, and get the same result in the built in terminal, so not affected by restarting the kernel.

I AM able to run your notebook without error

Read more comments on GitHub >

github_iconTop Results From Across the Web

Quality Assurance Guidance Document 2.12 - EPA
Method 2.12–PM2.5 Reference/Class I Equivalent Methods ... Using a soft brush and/or cloth, lightly scrub all interior surfaces and the bug screen with....
Read more >
Scala 2.12 Will Only Support Java 8 - InfoQ
As announced in the recent Scala roadmap, the Scala language will only run on Java 8 and later from Scala version 2.12 and...
Read more >
On the Unusual Variability of 2MASS J06195260–2903592
(2021) have developed a method to detect variable sources from the Gaia photometry catalogs based solely on the reported G-band fluxes, flux ...
Read more >
fi-6130 / fi-6230 Image Scanner Operator's Guide - Fujitsu
This setting is suitable for scanning lightly-colored documents containing both text and photographs. Error Diffusion. This function minimizes differences ...
Read more >
sec_E_SB_ELA_G8.pdf -
Copy them into your. Reader/Writer Notebook, and edit the sentences that have errors. A dealer in rare books were asked to look at...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found