{"action":"created","issue":{"url":"https://api.github.com/repos/kstaats/karoo_gp/issues/5","repository_url":"https://api.github.com/repos/kstaats/karoo_gp","labels_url":"https://api.github.com/repos/kstaats/karoo_gp/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/kstaats/karoo_gp/issues/5/comments","events_url":"https://api.github.com/repos/kstaats/karoo_gp/issues/5/events","html_url":"https://github.com/kstaats/karoo_gp/issues/5","id":206304970,"number":5,"title":"Problem with new karoo","user":{"login":"abdualhag","id":25646205,"avatar_url":"https://avatars.githubusercontent.com/u/25646205?v=3","gravatar_id":"","url":"https://api.github.com/users/abdualhag","html_url":"https://github.com/abdualhag","followers_url":"https://api.github.com/users/abdualhag/followers","following_url":"https://api.github.com/users/abdualhag/following{/other_user}","gists_url":"https://api.github.com/users/abdualhag/gists{/gist_id}","starred_url":"https://api.github.com/users/abdualhag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abdualhag/subscriptions","organizations_url":"https://api.github.com/users/abdualhag/orgs","repos_url":"https://api.github.com/users/abdualhag/repos","events_url":"https://api.github.com/users/abdualhag/events{/privacy}","received_events_url":"https://api.github.com/users/abdualhag/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-02-08T19:50:29Z","updated_at":"2017-02-08T20:13:07Z","closed_at":null,"body":"Hey;\r\nKstaats; After installing tensorflow and running the new karoo and finding out that the new karoo does not support exp and the other functions and deciding to go back to old karoo as I need them more than the speed  only to find out that I cannot run old karoo no longer and simply getting the following the error:\r\n` We have constructed a population of 100 Trees for Generation 1\r\n\r\n Evaluate the first generation of Trees ...\r\nTraceback (most recent call last):\r\n  File \"karoo_gp_main.py\", line 208, in <module>\r\n    gp.fx_fitness_gym(gp.population_a) # 1) extract polynomial from each Tree; 2) evaluate fitness, store; 3) display\r\n  File \"/home/abdu/Downloads/karoo/karoo_gp_base_class.py\", line 1414, in fx_fitness_gym\r\n    self.fx_eval_poly(population[tree_id]) # extract the expression\r\n  File \"/home/abdu/Downloads/karoo/karoo_gp_base_class.py\", line 1185, in fx_eval_poly\r\n    self.algo_raw = self.fx_eval_label(tree, 1) # pass the root 'node_id', then flatten the Tree to a string\r\n  File \"/home/abdu/Downloads/karoo/karoo_gp_base_class.py\", line 1246, in fx_eval_label\r\n    return self.fx_eval_label(tree, tree[9, node_id]) + tree[6, node_id] + self.fx_eval_label(tree, tree[10, node_id])\r\n  File \"/home/abdu/Downloads/karoo/karoo_gp_base_class.py\", line 1236, in fx_eval_label\r\n    if tree[6, node_id] == 'not': tree[6, node_id] = ', not' # temp until this can be fixed at data_load\r\nIndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices\r\n`\r\nThe problem did not appear before installing tensorflow. Even worse; after uninstalling tensorflow, I still get the same error. I hope you have some recommendation of how I might fix the problem.\r\nBest;"},"comment":{"url":"https://api.github.com/repos/kstaats/karoo_gp/issues/comments/278447671","html_url":"https://github.com/kstaats/karoo_gp/issues/5#issuecomment-278447671","issue_url":"https://api.github.com/repos/kstaats/karoo_gp/issues/5","id":278447671,"user":{"login":"kstaats","id":15246206,"avatar_url":"https://avatars.githubusercontent.com/u/15246206?v=3","gravatar_id":"","url":"https://api.github.com/users/kstaats","html_url":"https://github.com/kstaats","followers_url":"https://api.github.com/users/kstaats/followers","following_url":"https://api.github.com/users/kstaats/following{/other_user}","gists_url":"https://api.github.com/users/kstaats/gists{/gist_id}","starred_url":"https://api.github.com/users/kstaats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kstaats/subscriptions","organizations_url":"https://api.github.com/users/kstaats/orgs","repos_url":"https://api.github.com/users/kstaats/repos","events_url":"https://api.github.com/users/kstaats/events{/privacy}","received_events_url":"https://api.github.com/users/kstaats/received_events","type":"User","site_admin":false},"created_at":"2017-02-08T20:13:06Z","updated_at":"2017-02-08T20:13:06Z","body":"Thank you for reaching out to me.\n\nYes, it is correct that the new release does not support cos, sin, log, \nnor exp. We are working to re-integrate these soon. I need to make that \nmore clear in the documentation, as I do not desire to cause frustration.\n\nFortunately, I know exactly what happened with the error you have \ndescribed (for it happened to me too!). With the update from Ubuntu \n14.04 to 16.04, the Python related libraries also incremented.\n\n1) In karoo_gp_base_class.py, search for \"def fx_eval_label\".\n\n2) In this method, insert a new line:\n\n\tnode_id = int(node_id)\n\n... just before the start of the recursive function. This forces the \nvariable node_id to an integer state. I don't know why this worked \nbefore, but it makes sense.\n\n3) Do the same thing for the next method down, \"def fx_eval_id\"\n\nThat's all it takes! :)\n\nkai\n\n\nOn 02/08/2017 12:50 PM, abdualhag wrote:\n> Hey;\n> Kstaats; After installing tensorflow and running the new karoo and finding out that the new karoo does not support exp and the other functions and deciding to go back to old karoo as I need them more than the speed  only to find out that I cannot run old karoo no longer and simply getting the following the error:\n> ` We have constructed a population of 100 Trees for Generation 1\n>\n>  Evaluate the first generation of Trees ...\n> Traceback (most recent call last):\n>   File \"karoo_gp_main.py\", line 208, in <module>\n>     gp.fx_fitness_gym(gp.population_a) # 1) extract polynomial from each Tree; 2) evaluate fitness, store; 3) display\n>   File \"/home/abdu/Downloads/karoo/karoo_gp_base_class.py\", line 1414, in fx_fitness_gym\n>     self.fx_eval_poly(population[tree_id]) # extract the expression\n>   File \"/home/abdu/Downloads/karoo/karoo_gp_base_class.py\", line 1185, in fx_eval_poly\n>     self.algo_raw = self.fx_eval_label(tree, 1) # pass the root 'node_id', then flatten the Tree to a string\n>   File \"/home/abdu/Downloads/karoo/karoo_gp_base_class.py\", line 1246, in fx_eval_label\n>     return self.fx_eval_label(tree, tree[9, node_id]) + tree[6, node_id] + self.fx_eval_label(tree, tree[10, node_id])\n>   File \"/home/abdu/Downloads/karoo/karoo_gp_base_class.py\", line 1236, in fx_eval_label\n>     if tree[6, node_id] == 'not': tree[6, node_id] = ', not' # temp until this can be fixed at data_load\n> IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices\n> `\n> The problem did not appear before installing tensorflow. Even worse; after uninstalling tensorflow, I still get the same error. I hope you have some recommendation of how I might fix the problem.\n> Best;\n>\n"}}
{"actor":{"display_login":"kstaats"}}