Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does not support option: 'parallel'" #7

Closed
qihongl opened this issue Nov 11, 2017 · 3 comments
Closed

does not support option: 'parallel'" #7

qihongl opened this issue Nov 11, 2017 · 3 comments

Comments

@qihongl
Copy link

qihongl commented Nov 11, 2017

Hi, thanks for the exciting work! I am playing with your algorithm and I got the following error message, when I was running your demo with digits.data. Do you have a sense of what is going on here?


KeyError Traceback (most recent call last)
/Users/Qihong/anaconda/envs/brainiak/lib/python3.6/site-packages/numba/targets/options.py in from_dict(self, dic)
17 try:
---> 18 ctor = self.OPTIONS[k]
19 except KeyError:

KeyError: 'parallel'

During handling of the above exception, another exception occurred:

KeyError Traceback (most recent call last)
in ()
6 embedding = umap.UMAP(n_neighbors=5,
7 min_dist=0.3,
----> 8 metric='correlation').fit_transform(digits.data)

/Users/Qihong/Dropbox/github/umap/umap/umap_.py in fit_transform(self, X, y)
790 Embedding of the training data in low-dimensional space.
791 """
--> 792 self.fit(X)
793 return self.embedding_

/Users/Qihong/Dropbox/github/umap/umap/umap_.py in fit(self, X, y)
757
758 graph = fuzzy_simplicial_set(X, self.n_neighbors,
--> 759 self._metric, self.metric_kwds)
760
761 if self.n_edge_samples is None:

/Users/Qihong/anaconda/envs/brainiak/lib/python3.6/site-packages/numba/dispatcher.py in _compile_for_args(self, *args, **kws)
305 argtypes.append(self.typeof_pyval(a))
306 try:
--> 307 return self.compile(tuple(argtypes))
308 except errors.TypingError as e:
309 # Intercept typing error that may be due to an argument

/Users/Qihong/anaconda/envs/brainiak/lib/python3.6/site-packages/numba/dispatcher.py in compile(self, sig)
577
578 self._cache_misses[sig] += 1
--> 579 cres = self._compiler.compile(args, return_type)
580 self.add_overload(cres)
581 self._cache.save_overload(sig, cres)

/Users/Qihong/anaconda/envs/brainiak/lib/python3.6/site-packages/numba/dispatcher.py in compile(self, args, return_type)
70 def compile(self, args, return_type):
71 flags = compiler.Flags()
---> 72 self.targetdescr.options.parse_as_flags(flags, self.targetoptions)
73 flags = self._customize_flags(flags)
74

/Users/Qihong/anaconda/envs/brainiak/lib/python3.6/site-packages/numba/targets/options.py in parse_as_flags(cls, flags, options)
26 def parse_as_flags(cls, flags, options):
27 opt = cls()
---> 28 opt.from_dict(options)
29 opt.set_flags(flags)
30 return flags

/Users/Qihong/anaconda/envs/brainiak/lib/python3.6/site-packages/numba/targets/options.py in from_dict(self, dic)
19 except KeyError:
20 fmt = "%r does not support option: '%s'"
---> 21 raise KeyError(fmt % (self.class, k))
22 else:
23 self.values[k] = ctor(v)

KeyError: "<class 'numba.targets.cpu.CPUTargetOptions'> does not support option: 'parallel'"

@lmcinnes
Copy link
Owner

The current code targets a fairly new version of numba. You need numba version 0.34 or greater to have it work. In practice I am not sure the parallel pragma adds much performance, so an alternative is to simply remove it from the source in umap/umap_.py wherever it occurs.

@qihongl
Copy link
Author

qihongl commented Nov 11, 2017

Ah I see! Thanks a lot!

@sleighsoft
Copy link
Collaborator

Looks resolved. Please create a new issue if problems persist.

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

No branches or pull requests

3 participants