Code Monkey home page Code Monkey logo

Comments (3)

sebat2004 avatar sebat2004 commented on June 30, 2024 1

I'm getting the same issue :(

Edit: Nevermind, did a little issue digging. Check out #144

from mt3.

0xdevalias avatar 0xdevalias commented on June 30, 2024 1

After that fix, now getting a new issue unfortunately:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
[<ipython-input-6-689ff6dbf16f>](https://localhost:8080/#) in <cell line: 25>()
     23 note_seq.play_sequence(est_ns, synth=note_seq.fluidsynth,
     24                        sample_rate=SAMPLE_RATE, sf2_path=SF2_PATH)
---> 25 note_seq.plot_sequence(est_ns)

2 frames
[/usr/local/lib/python3.10/dist-packages/bokeh/core/has_props.py](https://localhost:8080/#) in _raise_attribute_error_with_matches(self, name, properties)
    373             matches, text = sorted(properties), "possible"
    374 
--> 375         raise AttributeError(f"unexpected attribute {name!r} to {self.__class__.__name__}, {text} attributes are {nice_join(matches)}")
    376 
    377     def __str__(self) -> str:

AttributeError: unexpected attribute 'plot_width' to figure, similar attributes are outer_width, width or min_width

Which seems to be at least these 2 issues:

Originally posted by @0xdevalias in #151 (comment)

Running the error I got here through ChatGPT suggested the following:

The error you encountered, AttributeError: unexpected attribute 'plot_width' to figure, similar attributes are outer_width, width or min_width, suggests that there is an issue with the usage of the plot_width attribute in a Bokeh figure object.

Bokeh, a visualization library for Python, uses figure objects to create plots, and it seems like the code is trying to set an attribute plot_width which does not exist. Instead, Bokeh provides width, outer_width, or min_width as valid attributes.

Looking at the colab file:

The relevant snippet of code that's failing is:

import note_seq

# ..snip..

inference_model = InferenceModel(checkpoint_path, MODEL)

# ..snip..

est_ns = inference_model(audio)

# ..snip..

note_seq.plot_sequence(est_ns)

We can see the note_seq library here:

And here is a relevant sounding PR that may be related to this issue:

Which notes:

As described in this stackoverflow question:

In the 3.0.0 bokeh release, the plot_width attribute of a figure was replaced with width. Similarly, plot_height was replaced with height. Even in the last 2.x.x release docs, they are described as "compatibility aliases" for width and height.

This pull request fixes this issue by following the stackover flow answer mentioned above.

Originally posted by @Yao-Lirong in magenta/note-seq#72

Once that PR lands, it should fix the root cause, but until then, it sounds like the workaround is to use a pre-3.x version of Bokeh.

Searching the issues here, we can see that this was already suggested in another thread:

It worked, finally. I also downgraded bokeh so that midi image could come out normally.
https://colab.research.google.com/drive/1JkWyAwFhAC6SJJ1Lvf4VPap6FwtniEuy?usp=sharing

Originally posted by @Jackl-o-o-l in #134 (comment)

Originally posted by @0xdevalias in #144 (comment)

from mt3.

iansimon avatar iansimon commented on June 30, 2024

Fixed!

from mt3.

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.