magenta / magenta-js

Magenta.js: Music and Art Generation with Machine Learning in the browser
https://magenta.tensorflow.org
Apache License 2.0
1.99k stars 314 forks source link

Multitrack Chords: Chord progression expected but not provided Error in official demo #467

Closed Seanitzel closed 4 years ago

Seanitzel commented 4 years ago

Hi,

I am working on.a project using the Multitrack chords model, which out of nowhere stopped working on my local dev environment.

It was really weird, so i went to the official demo from the official blog post for Multitrack chords and was really surprised to see the exact same error(after it was working literally 2 days ago).

Not sure whats up...

Link for the demo: https://codepen.io/iansimon/pen/GGRYJZ

adarob commented 4 years ago

Here is the error @iansimon:

music@^1.2.3:83 Uncaught (in promise) Error: Chord progression expected but not provided.
    at t.checkControlArgs (music@^1.2.3:83)
    at t.<anonymous> (music@^1.2.3:83)
    at music@^1.2.3:83
    at Object.next (music@^1.2.3:83)
    at music@^1.2.3:83
    at new Promise (<anonymous>)
    at o (music@^1.2.3:83)
    at t.decode (music@^1.2.3:83)
    at interpolateSamples (pen.js:131)
    at generateInterpolations (pen.js:140)
iansimon commented 4 years ago

Should be fixed now (in the demo at least); the JS MusicVAE API changed between versions 1.16.0 and 1.17.0.

To update your project, instead of calling e.g. model.decode(z, temp, chords) you should call model.decode(z, temp, {chordProgression: chords}).

Seanitzel commented 4 years ago

I see... The demo is working again, but i'm getting a weird error on my end:

index.js?8350:32 Uncaught (in promise) TypeError: this.spec.extraControls is not iterable
    at eval (index.js?8350:32)
    at eval (tf-core.esm.js?45ef:17)
    at t.scopedRun (tf-core.esm.js?45ef:17)
    at t.tidy (tf-core.esm.js?45ef:17)
    at Module.Ze (tf-core.esm.js?45ef:17)
    at I.controlArgsToTensor (index.js?8350:32)
    at eval (index.js?8350:32)
    at eval (tf-core.esm.js?45ef:17)
    at t.scopedRun (tf-core.esm.js?45ef:17)
    at t.tidy (tf-core.esm.js?45ef:17)

Looks like it's something with TF...

I am not sure why it's not working for me locally as i'm doing nothing different than in the demo, except the change you mentioned.

The demo is still using model.decode(z, temp, chords) too, as well as the previous version of my project which is deployed HERE and seems to work as well.

Not sure what's going on 😅

iansimon commented 4 years ago

You can get your demo working again if you explicitly link against an older version of magenta/music, 1.1.6 or earlier. Not sure what's causing your most recent error.

Seanitzel commented 4 years ago

sorry, but How do i link to an earlier version?

The checkpoint url contains no versioning info

iansimon commented 4 years ago

Not the checkpoint, but the magenta.js music library:

<script src="https://cdn.jsdelivr.net/npm/@magenta/music@1.16.0"></script>

Seanitzel commented 4 years ago

I was using 1.16...

And i have tried every combination with versions 15-17 with sending both an object of chordProgression and an array, I get the same errors every time.

When it's an array - the original error, when it's an object, the second tensor flow one...

iansimon commented 4 years ago

I did notice a related bug in 1.17 which should be fixed by #468, but if you link against 1.16 and pass an array as in https://codepen.io/iansimon/pen/GGRYJZ it should work. Your own demo that you linked above works as well; where are you seeing the issue?

Seanitzel commented 4 years ago

I'm seeing the bug in my local dev environment, even when i rollback to the version which is published in my demo which i am really not sure how is working haha

I don't know what i'm missing but it's really driving me crazy since it doesn't make any sense 😅

Hope #468 will fix it 🤞

adarob commented 4 years ago

I thought we'd planned a full version bump with the API change? @notwaldorf

notwaldorf commented 4 years ago

I got confused after the conversation in the PR because it looked like it wasn’t a breaking change so I done messed up :/

Should I do a major bump now?

On Fri, Jun 26, 2020 at 8:37 AM Adam Roberts notifications@github.com wrote:

I thought we'd planned a full version bump with the API change? @notwaldorf https://github.com/notwaldorf

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/magenta/magenta-js/issues/467#issuecomment-650246315, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKOIUWZVVK3FNXZX54X3PLRYS6EBANCNFSM4OHOFMZQ .

adarob commented 4 years ago

No worries. Sure, go for it. Is there a way to unpublish the last one?

notwaldorf commented 4 years ago

Nope :(

On Fri, Jun 26, 2020 at 10:18 AM Adam Roberts notifications@github.com wrote:

No worries. Sure, go for it. Is there a way to unpublish the last one?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/magenta/magenta-js/issues/467#issuecomment-650297038, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKOIUXKMTSKSLIDALWS5LDRYTJ4TANCNFSM4OHOFMZQ .

Seanitzel commented 4 years ago

Everything seems to be working following the latest merges, so thanks!

If anyone else encounters this, you can either wait for the next magenta publish( > 1.17) or build the dev branch on your own machine and use it with this api - model.decode(z, temp, {chordProgression: chords})

Closing the issue :)