Skip to content

Conversation

yarikoptic
Copy link
Contributor

Setting to 0 results now only in doctests failure:

======================================================================
FAIL: Doctest: joblib.parallel.Parallel
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/doctest.py", line 2163, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for joblib.parallel.Parallel
  File "/home/yoh/deb/gits/joblib/joblib/parallel.py", line 145, in Parallel

----------------------------------------------------------------------
File "/home/yoh/deb/gits/joblib/joblib/parallel.py", line 262, in joblib.parallel.Parallel
Failed example:
    out = Parallel(n_jobs=2, verbose=100, pre_dispatch='1.5*n_jobs')(
                            delayed(sqrt)(i) for i in producer()) #doctest: +ELLIPSIS
Expected:
    Produced 0
    Produced 1
    Produced 2
    [Parallel(n_jobs=2)]: Done   1 out of   3+ |elapsed:   ...s remaining:   ...s
    Produced 3
    [Parallel(n_jobs=2)]: Done ... out of   4+ |elapsed:   ...s remaining:   ...s
    ...
Got:
    Produced 0
    [Parallel(n_jobs=2)]: Done job   1 | elapsed:    0.0s
    Produced 1
    [Parallel(n_jobs=2)]: Done job   2 | elapsed:    0.0s
    Produced 2
    [Parallel(n_jobs=2)]: Done job   3 | elapsed:    0.0s
    Produced 3
    [Parallel(n_jobs=2)]: Done job   4 | elapsed:    0.0s
    Produced 4
    [Parallel(n_jobs=2)]: Done job   5 | elapsed:    0.0s
    Produced 5
    [Parallel(n_jobs=2)]: Done job   6 | elapsed:    0.0s

>>  raise self.failureException(self.format_failure(.getvalue()))
    

…he environment

+ adjusts the tests to use multiprocessing as it is known to
  joblib.parallel (thus might be disabled per above)
  Note: apparently multiprocessing should not be imported module wide in test_paralell.py
@GaelVaroquaux
Copy link
Member

Darn (the doctest failure). This failure makes sens, as when there is no parallel processing going on, the output is indeed not what corresponds to the doctest.

I am afraid that I will have to convert this to a unit test. Unless I can make the interface more homogeneous, which might be a good thing anyhow.

I'll merge your pull request and I'll have a look at that.

@GaelVaroquaux
Copy link
Member

Also, I'd like to systematically run tests in both conditions. If I add a Makefile for my own personal convenience that does that, is it of any inconvenience for Debian packaging?

@yarikoptic
Copy link
Contributor Author

no -- that is ok, I can handle it ;)

thanks for asking

On Mon, 11 Apr 2011, GaelVaroquaux wrote:

Also, I'd like to systematically run tests in both conditions.
If I add a Makefile for my own personal convenience that does that, is
it of any inconvenience for Debian packaging?

=------------------------------------------------------------------=
Keep in touch www.onerussian.com
Yaroslav Halchenko www.ohloh.net/accounts/yarikoptic

GaelVaroquaux and others added 2 commits April 11, 2011 17:27
Convenience for testing with and without multiprocessing
@yarikoptic
Copy link
Contributor Author

apparently because merge wasn't pushed to the joblib/joblib I just need to update this pull request -- that test failed within clean chroots (cowbuild chroots) across platforms. Otherwise I am ready for 0.5.1 ;)

@yarikoptic
Copy link
Contributor Author

and 1 more -- finally decided to read the docs ;-)

@GaelVaroquaux
Copy link
Member

It wasn't pushed because it is not ready (a failing test, as you mentionned, I am working on it).

Thanks for your update. I'll have a look when I find time (this evening probably).

@GaelVaroquaux GaelVaroquaux merged commit 5ca7e6e into joblib:0.5.X Apr 12, 2011
@GaelVaroquaux
Copy link
Member

All right. Merged. I'll do a release next time I find time to breath (tomorrow night?).

@yarikoptic
Copy link
Contributor Author

cool! if you like, you could buzz me few hours before release, then I
would update package, upload to *Debian's so you could announce it
available all around

All right. Merged. I'll do a release next time I find time to breath (tomorrow night?).

=------------------------------------------------------------------=
Keep in touch www.onerussian.com
Yaroslav Halchenko www.ohloh.net/accounts/yarikoptic

@GaelVaroquaux
Copy link
Member

You mean after release, but before announcement? I can do that.

I could buzz you before the release to PyPI, but I would need to tag before you can create the deb, right?

@yarikoptic
Copy link
Contributor Author

You mean after release, but before announcement? I can do that.
I could buzz you before the release to PyPI, but I would need to tag before you can create the deb, right?

yeap, or even upload to pypi (I think there should be no surprising
failures discovered ;-) ) -- just hold on with announcement

=------------------------------------------------------------------=
Keep in touch www.onerussian.com
Yaroslav Halchenko www.ohloh.net/accounts/yarikoptic

@GaelVaroquaux
Copy link
Member

OK, I got stuck in public transport without Internet connection, so I did the release. I just pushed the tag to github.

@yarikoptic
Copy link
Contributor Author

ok -- uploaded to NeuroDebian (should be already available) and to Debian
unstable (should soon be available), pushed tags/debian branch to my
clone. Few new things I spotted out which you might (not) address:

  1. unittests leave behind /tmp/joblib, I guess due to a doctest
    in joblib/init.py
  2. on older systems, unittest reports the failure although everything
    proceeds forward without failing (so package gets built just fine):

neurodebian@head2:/deb/builds/pymvpa/0.4.7$ grep -B 10 IOError ../../joblib/0.5.1/joblib_0.5*build
../../joblib/0.5.1/joblib_0.5.1-1
nd09.04+1_amd64.build-WARNING:root:[MemorizedFunc(func=<function f at 0x2bde2a8>, cachedir='/tmp/tmpK7jrzk/joblib')]: Exception while loading results for (args=(1,), kwargs={})
../../joblib/0.5.1/joblib_0.5.1-1nd09.04+1_amd64.build- Traceback (most recent call last):
../../joblib/0.5.1/joblib_0.5.1-1
nd09.04+1_amd64.build- File "/tmp/buildd/joblib-0.5.1/joblib/memory.py", line 171, in call
../../joblib/0.5.1/joblib_0.5.1-1nd09.04+1_amd64.build- out = self.load_output(output_dir)
../../joblib/0.5.1/joblib_0.5.1-1
nd09.04+1_amd64.build- File "/tmp/buildd/joblib-0.5.1/joblib/memory.py", line 437, in load_output
../../joblib/0.5.1/joblib_0.5.1-1nd09.04+1_amd64.build- mmap_mode=self.mmap_mode)
../../joblib/0.5.1/joblib_0.5.1-1
nd09.04+1_amd64.build- File "/tmp/buildd/joblib-0.5.1/joblib/numpy_pickle.py", line 150, in load
../../joblib/0.5.1/joblib_0.5.1-1nd09.04+1_amd64.build- unpickler = NumpyUnpickler(filename, mmap_mode=mmap_mode)
../../joblib/0.5.1/joblib_0.5.1-1
nd09.04+1_amd64.build- File "/tmp/buildd/joblib-0.5.1/joblib/numpy_pickle.py", line 83, in init
../../joblib/0.5.1/joblib_0.5.1-1~nd09.04+1_amd64.build- self.file = open(filename, 'rb')

../../joblib/0.5.1/joblib_0.5.1-1~nd09.04+1_amd64.build:IOError: [Errno 2] No such file or directory: '/tmp/tmpK7jrzk/joblib/joblib/test/test_memory/f/4ab6c9a599584035286137201aa497c7/output.pkl'

../../joblib/0.5.1/joblib_0.5.1-1nd50+1_amd64.build-WARNING:root:[MemorizedFunc(func=<function f at 0x165c500>, cachedir='/tmp/tmpe3tUo4/joblib')]: Exception while loading results for (args=(1,), kwargs={})
../../joblib/0.5.1/joblib_0.5.1-1
nd50+1_amd64.build- Traceback (most recent call last):
../../joblib/0.5.1/joblib_0.5.1-1nd50+1_amd64.build- File "/tmp/buildd/joblib-0.5.1/joblib/memory.py", line 171, in call
../../joblib/0.5.1/joblib_0.5.1-1
nd50+1_amd64.build- out = self.load_output(output_dir)
../../joblib/0.5.1/joblib_0.5.1-1nd50+1_amd64.build- File "/tmp/buildd/joblib-0.5.1/joblib/memory.py", line 437, in load_output
../../joblib/0.5.1/joblib_0.5.1-1
nd50+1_amd64.build- mmap_mode=self.mmap_mode)
../../joblib/0.5.1/joblib_0.5.1-1nd50+1_amd64.build- File "/tmp/buildd/joblib-0.5.1/joblib/numpy_pickle.py", line 150, in load
../../joblib/0.5.1/joblib_0.5.1-1
nd50+1_amd64.build- unpickler = NumpyUnpickler(filename, mmap_mode=mmap_mode)
../../joblib/0.5.1/joblib_0.5.1-1nd50+1_amd64.build- File "/tmp/buildd/joblib-0.5.1/joblib/numpy_pickle.py", line 83, in init
../../joblib/0.5.1/joblib_0.5.1-1
nd50+1_amd64.build- self.file = open(filename, 'rb')
../../joblib/0.5.1/joblib_0.5.1-1~nd50+1_amd64.build:IOError: [Errno 2] No such file or directory: '/tmp/tmpe3tUo4/joblib/joblib/test/test_memory/f/4ab6c9a599584035286137201aa497c7/output.pkl'

Cheers,

On Tue, 12 Apr 2011, GaelVaroquaux wrote:

OK, I got stuck in public transport without Internet connection, so I did the release. I just pushed the tag to github.

=------------------------------------------------------------------=
Keep in touch www.onerussian.com
Yaroslav Halchenko www.ohloh.net/accounts/yarikoptic

fcharras added a commit to fcharras/joblib that referenced this pull request Apr 29, 2022
fcharras added a commit to fcharras/joblib that referenced this pull request May 10, 2022
fcharras added a commit to fcharras/joblib that referenced this pull request May 10, 2022
fcharras added a commit to fcharras/joblib that referenced this pull request May 12, 2022
fcharras added a commit to fcharras/joblib that referenced this pull request Oct 24, 2022
fcharras added a commit to fcharras/joblib that referenced this pull request Nov 17, 2022
fcharras added a commit to fcharras/joblib that referenced this pull request Nov 22, 2022
fcharras added a commit to fcharras/joblib that referenced this pull request Feb 6, 2023
fcharras added a commit to fcharras/joblib that referenced this pull request Feb 17, 2023
fcharras added a commit to fcharras/joblib that referenced this pull request Feb 19, 2023
fcharras added a commit to fcharras/joblib that referenced this pull request Apr 11, 2023
fcharras added a commit to fcharras/joblib that referenced this pull request Apr 15, 2023
fcharras added a commit to fcharras/joblib that referenced this pull request Apr 15, 2023
fcharras added a commit to fcharras/joblib that referenced this pull request Apr 15, 2023
fcharras added a commit to fcharras/joblib that referenced this pull request Apr 17, 2023
fcharras added a commit to fcharras/joblib that referenced this pull request Apr 17, 2023
fcharras added a commit to fcharras/joblib that referenced this pull request Apr 17, 2023
fcharras added a commit to fcharras/joblib that referenced this pull request Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants