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.

Latest dill release raises exception

See original GitHub issue

Describe the bug

As reported by @sgugger, latest dill release is breaking things with Datasets.

______________ ExamplesTests.test_run_speech_recognition_seq2seq _______________


self = <multiprocess.pool.ApplyResult object at 0x7fa5981a1cd0>, timeout = None

    def get(self, timeout=None):
        self.wait(timeout)
        if not self.ready():
            raise TimeoutError
        if self._success:
            return self._value
        else:
>           raise self._value
E           TypeError: '>' not supported between instances of 'NoneType' and 'float'

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
anivegesanacommented, May 21, 2022

I should note that because Python 3.6 and older are now deprecated and Python 3.7 has insertion order dictionaries, the globals in dill will have a deterministic order, just not sorted. I would still keep it sorted like you have it to help with stability (for example, if someone reorders variables in a file, then sorting the globals would not invalidate the cache.)

It seems that the order is not quite deterministic in IPython. Huggingface datasets seems to do well in Jupyter regardless, so it is not a good idea to remove the sorting. uqfoundation/dill#19

1reaction
albertvillanovacommented, May 21, 2022

Thanks a lot for your investigation @anivegesana.

Yes, we copied-pasted the old save_function function from dill, just adding a line to make deterministic the order of global variables globs.

However, this function has changed a lot from version 0.3.5, after your PR (thank you for the fix in recursiveness, indeed):

  • uqfoundation/dill#443

We have to address this change.

If finally your PR to sort global variables is merged into dill 0.3.6, that will make our life easier, as the tweak will no longer be necessary. 😉

I have included a regression test so that we are sure future releases of dill do not break datasets:

Read more comments on GitHub >

github_iconTop Results From Across the Web

dill module documentation — dill 0.3.7.dev0 documentation
The source code is returned as a single string. An IOError is raised if the source code cannot be retrieved, while a TypeError...
Read more >
ModuleNotFoundError when unpickling objects (using dill or ...
When I unpickle it in the other environment, which has the same version of dill, pickle and python, I have this error :...
Read more >
8. Errors and Exceptions — Python 3.11.1 documentation
When an exception is created in order to be raised, it is usually initialized with information that describes the error that has occurred....
Read more >
feast.registry — Feast documentation
You are not reading the most recent version of this documentation. v0.26.0 is ... not in REGISTRY_STORE_CLASS_FOR_SCHEME: raise Exception( f"Registry path ...
Read more >
Changelog — mpire 1.2.0 documentation - GitHub Pages
New progress_bar_position parameter is now available to set the position of the ... the main process could get unresponsive when an exception was...
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