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

network evolve error: ReferenceError: regeneratorRuntime is not defined #244

Open
tracycollins opened this issue Aug 7, 2020 · 17 comments · Fixed by #245
Open

network evolve error: ReferenceError: regeneratorRuntime is not defined #244

tracycollins opened this issue Aug 7, 2020 · 17 comments · Fixed by #245
Assignees
Labels
🕷️ bug Something isn't working

Comments

@tracycollins
Copy link

Description

After updating to the latest version, network evolve crashes with this error:

Trace: ReferenceError: regeneratorRuntime is not defined
at X.n.evolve (/Volumes/RAID1/projects/twitterNeuralNetwork/node_modules/@liquid-carrot/carrot/dist/index.min.js:1:138618)

To Reproduce

I have not yet put together an example to show this bug, but can if you need
The evolve params were:

cost: MSE,
efficientMutation: true,
elitism: 2,
equal: true,
error: 0.05,
fitnessPopulation: true,
growth: 0.000058676602433414615,
iterations: 10,
mutation: [
{ name: 'ADD_NODE' },
{ name: 'SUB_NODE', keep_gates: true },
{ name: 'ADD_CONN' },
{ name: 'REMOVE_CONN' },
{ name: 'MOD_WEIGHT', min: -1, max: 1 },
{ name: 'MOD_BIAS', min: -1, max: 1 },
{ name: 'MOD_ACTIVATION', mutateOutput: true, allowed: [Array] },
{ name: 'SWAP_NODES', mutateOutput: true }
],
mutationAmount: 1,
mutationRate: 0.6947879778477388,
network: null,
popsize: 20,
populationSize: 20,
provenance: 0,
schedule: { function: [Function: function], iterations: 1 },
selection: { name: 'FITNESS_PROPORTIONATE' },
threads: 4,
population_size: 20,
mutation_rate: 0.6947879778477388,
mutation_amount: 1,
fitness_population: true,
max_nodes: undefined

Tasks

@tracycollins
Copy link
Author

Update: version 0.3.18 works

@christianechevarria
Copy link
Member

Okay excellent, should we close this issue?

@tracycollins
Copy link
Author

Okay excellent, should we close this issue?

No

Sorry, my update wasn't clear:

v0.3.18 works
v0.3.19 does not work

@raimannma raimannma added the 🕷️ bug Something isn't working label Aug 10, 2020
@raimannma
Copy link
Member

raimannma commented Aug 10, 2020

I think that's a bug with parcel bundler or webpack.

Caused by some wrong settings at building the compact files.
I am going to search a fix.

@raimannma raimannma self-assigned this Aug 10, 2020
@raimannma
Copy link
Member

Also @christianechevarria @luiscarbonell we should implement a CI test that checks the build javascript files.

@raimannma
Copy link
Member

@tracycollins
Copy link
Author

@tracycollins can you check if it works on this branch?
https://github.com/liquidcarrot/carrot/tree/FIX_244_regenerator_runtime_error

no, didn't work. fails with the same error.

@raimannma
Copy link
Member

raimannma commented Aug 10, 2020

What about this file? https://gist.github.com/raimannma/95706ec9af955a413b25161b72e075e9
Now build with webpack

@tracycollins
Copy link
Author

@tracycollins can you check if it works on this branch?
https://github.com/liquidcarrot/carrot/tree/FIX_244_regenerator_runtime_error

no, didn't work. fails with the same error.

SORRY!

THIS DOES WORK

Pilot error when I tested it before. Haven't tried your 2nd fix yet

@tracycollins
Copy link
Author

Also, sorry for the delay. I'm in a class...

@raimannma
Copy link
Member

ok, so my first commit fixes your problem ?

If so, i would push it to master.

@tracycollins
Copy link
Author

yes, push please

@raimannma
Copy link
Member

Just waiting for approve from @christianechevarria or @luiscarbonell .

@tracycollins
Copy link
Author

I'm sorry, but it seems that this was never fixed; I had pinned the version to 0.3.18 and wasn't testing against the latest version, v0.3.20, which fails.

running on node 12.18.3

To reproduce, a file with only the following line fails with the error 'MODULE_NOT_FOUND'

let { Network, methods } = require('@liquid-carrot/carrot');

the error message:

internal/modules/cjs/loader.js:968
throw err;
^

Error: Cannot find module './architecture/network'
Require stack:

  • /Volumes/RAID1/projects/neuralNetworkTools/node_modules/@liquid-carrot/carrot/dist/index.min.js
  • /Volumes/RAID1/projects/neuralNetworkTools/testing.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
    at Function.Module._load (internal/modules/cjs/loader.js:841:27)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at /Volumes/RAID1/projects/neuralNetworkTools/node_modules/@liquid-carrot/carrot/dist/index.min.js:1:166451
    at Object. (/Volumes/RAID1/projects/neuralNetworkTools/node_modules/@liquid-carrot/carrot/dist/index.min.js:1:172944)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/Volumes/RAID1/projects/neuralNetworkTools/node_modules/@liquid-carrot/carrot/dist/index.min.js',
    '/Volumes/RAID1/projects/neuralNetworkTools/testing.js'
    ]
    }

@raimannma raimannma reopened this Aug 24, 2020
@raimannma
Copy link
Member

@christianechevarria Maybe this comes from the dependency updates in version 0.3.19

@christianechevarria
Copy link
Member

The issue particularly is in the dist so I'm guessing this is Webpack / Rollup related

@ragnorc
Copy link

ragnorc commented Sep 22, 2020

Same issue with 0.3.20.
Cannot find module './architecture/network'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🕷️ bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants