Giter VIP home page Giter VIP logo

Comments (4)

fedden avatar fedden commented on April 29, 2024 1

Apologies! This was due to a typo in my code and I was sending crappy parameters to the umap method!
:)

sound

from umap.

lmcinnes avatar lmcinnes commented on April 29, 2024

Hi -- glad the issue got resolved! Still it might be useful if UMAP could give better warnings or more informative errors about bad parameters. If you think this might be such a case please let me know what was wrong and I can try to catch it earlier with better inout validation and provide a more interpretable error.

Also, I am definitely looking forward to your blog post!

from umap.

fedden avatar fedden commented on April 29, 2024

Ah thank you! I'll find the exact case where passed those runtime warnings and get back to you.

I've glossed over the technical details but really loved using this algorithm for this blog post here!

Thanks again for it!

from umap.

nathanielbd avatar nathanielbd commented on April 29, 2024

@lmcinnes I'm getting this same issue. Here's my stdout when I run with verbose=True:

UMAP(a=None, angular_rp_forest=False, b=None, init='spectral',
     learning_rate=1.0, local_connectivity=1.0, metric='correlation',
     metric_kwds=None, min_dist=0.1, n_components=2, n_epochs=None,
     n_neighbors=2.0, negative_sample_rate=5, random_state=None,
     repulsion_strength=1.0, set_op_mix_ratio=1.0, spread=0.1,
     target_metric='categorical', target_metric_kwds=None,
     target_n_neighbors=-1, target_weight=0.5, transform_queue_size=4.0,
     transform_seed=42, verbose=True)
Construct fuzzy simplicial set
Wed Jul 22 23:28:22 2020 Finding Nearest Neighbors
Wed Jul 22 23:28:22 2020 Building RP forest with 9 trees
Wed Jul 22 23:28:24 2020 NN descent for 12 iterations

I also get the same error when I change spread to 1 or 10.

Hope that helps now that you have an exact set of parameters. @fedden Do you remember/does this help you remember what was wrong with your parameters?

Here's my stderr:

/project/csbio/envs_dirs/viz/lib/python3.6/site-packages/umap/umap_.py:1052: RuntimeWarning: divide by zero encountered in power
  return 1.0 / (1.0 + a * x ** (2 * b))
Traceback (most recent call last):
  File "pipeline.py", line 271, in <module>
    coords, nodes = umap(new_gi_df, args, out_dir)
  File "pipeline.py", line 141, in umap
    embedding = reducer.fit_transform(gi_df.values)
  File "/project/csbio/envs_dirs/viz/lib/python3.6/site-packages/umap/umap_.py", line 1598, in fit_transform
    self.fit(X, y)
  File "/project/csbio/envs_dirs/viz/lib/python3.6/site-packages/umap/umap_.py", line 1429, in fit
    self.verbose,
  File "/project/csbio/envs_dirs/viz/lib/python3.6/site-packages/umap/umap_.py", line 281, in nearest_neighbors
    verbose=verbose,
  File "/project/csbio/envs_dirs/viz/lib/python3.6/site-packages/numba/core/dispatcher.py", line 401, in _compile_for_args
    error_rewrite(e, 'typing')
  File "/project/csbio/envs_dirs/viz/lib/python3.6/site-packages/numba/core/dispatcher.py", line 344, in error_rewrite
    reraise(type(e), e, None)
  File "/project/csbio/envs_dirs/viz/lib/python3.6/site-packages/numba/core/utils.py", line 80, in reraise
    raise value.with_traceback(tb)
numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Failed in nopython mode pipeline (step: nopython frontend)
Invalid use of Function(<built-in function empty>) with argument(s) of type(s): (float64, dtype=class(int64))
 * parameterized
In definition 0:
    All templates rejected with literals.
In definition 1:
    All templates rejected without literals.
This error is usually caused by passing an argument of a type that is unsupported by the named function.
[1] During: resolving callee type: Function(<built-in function empty>)
[2] During: typing of call at /project/csbio/envs_dirs/viz/lib/python3.6/site-packages/umap/utils.py (94)


File "../../../envs_dirs/viz/lib/python3.6/site-packages/umap/utils.py", line 94:
def rejection_sample(n_samples, pool_size, rng_state):
    <source elided>
    """
    result = np.empty(n_samples, dtype=np.int64)
    ^

[1] During: resolving callee type: type(CPUDispatcher(<function rejection_sample at 0x7f51f9e38950>))
[2] During: typing of call at /project/csbio/envs_dirs/viz/lib/python3.6/site-packages/umap/nndescent.py (63)

[3] During: resolving callee type: type(CPUDispatcher(<function rejection_sample at 0x7f51f9e38950>))
[4] During: typing of call at /project/csbio/envs_dirs/viz/lib/python3.6/site-packages/umap/nndescent.py (63)

[5] During: resolving callee type: type(CPUDispatcher(<function rejection_sample at 0x7f51f9e38950>))
[6] During: typing of call at /project/csbio/envs_dirs/viz/lib/python3.6/site-packages/umap/nndescent.py (63)

[7] During: resolving callee type: type(CPUDispatcher(<function rejection_sample at 0x7f51f9e38950>))
[8] During: typing of call at /project/csbio/envs_dirs/viz/lib/python3.6/site-packages/umap/nndescent.py (63)

[9] During: resolving callee type: type(CPUDispatcher(<function rejection_sample at 0x7f51f9e38950>))
[10] During: typing of call at /project/csbio/envs_dirs/viz/lib/python3.6/site-packages/umap/nndescent.py (63)


File "../../../envs_dirs/viz/lib/python3.6/site-packages/umap/nndescent.py", line 63:
    def nn_descent(
        <source elided>
        for i in range(data.shape[0]):
            indices = rejection_sample(n_neighbors, data.shape[0], rng_state)
            ^


from umap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.