{"action":"created","issue":{"url":"https://api.github.com/repos/PetaVision/OpenPV/issues/12","labels_url":"https://api.github.com/repos/PetaVision/OpenPV/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/PetaVision/OpenPV/issues/12/comments","events_url":"https://api.github.com/repos/PetaVision/OpenPV/issues/12/events","html_url":"https://github.com/PetaVision/OpenPV/issues/12","id":102021224,"number":12,"title":"Better support for Lua","user":{"login":"slundqui","id":1431723,"avatar_url":"https://avatars.githubusercontent.com/u/1431723?v=3","gravatar_id":"","url":"https://api.github.com/users/slundqui","html_url":"https://github.com/slundqui","followers_url":"https://api.github.com/users/slundqui/followers","following_url":"https://api.github.com/users/slundqui/following{/other_user}","gists_url":"https://api.github.com/users/slundqui/gists{/gist_id}","starred_url":"https://api.github.com/users/slundqui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slundqui/subscriptions","organizations_url":"https://api.github.com/users/slundqui/orgs","repos_url":"https://api.github.com/users/slundqui/repos","events_url":"https://api.github.com/users/slundqui/events{/privacy}","received_events_url":"https://api.github.com/users/slundqui/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PetaVision/OpenPV/labels/Feature%20Request","name":"Feature Request","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-19T23:15:55Z","updated_at":"2015-08-25T16:03:51Z","closed_at":null,"body":"Now that everyone has gotten their feet wet with Lua (special thanks to @morae for exploring and using this feature), we should start thinking about better integration of Lua within PetaVision. I believe that @morae is working on creating modules for our LCA/SCANN models so that we can easily import existing LCA modules in Lua. However, the current Lua model requires a middle step, as we need to convert Lua to a parameter file before it can be fed into PV. It would be useful to be able to directly feed in a Lua script into PV as a replacement for our current parameter files. This entails a few things; ex, I believe Lua currently does not support parameter sweeping (and the shiny new batch sweeping). I believe there exists C++ bindings for a Lua interpreter that we should be able to call within PV, so it shouldn't be too difficult to directly run Lua internally as a first step."},"comment":{"url":"https://api.github.com/repos/PetaVision/OpenPV/issues/comments/134649938","html_url":"https://github.com/PetaVision/OpenPV/issues/12#issuecomment-134649938","issue_url":"https://api.github.com/repos/PetaVision/OpenPV/issues/12","id":134649938,"user":{"login":"morae","id":5438047,"avatar_url":"https://avatars.githubusercontent.com/u/5438047?v=3","gravatar_id":"","url":"https://api.github.com/users/morae","html_url":"https://github.com/morae","followers_url":"https://api.github.com/users/morae/followers","following_url":"https://api.github.com/users/morae/following{/other_user}","gists_url":"https://api.github.com/users/morae/gists{/gist_id}","starred_url":"https://api.github.com/users/morae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morae/subscriptions","organizations_url":"https://api.github.com/users/morae/orgs","repos_url":"https://api.github.com/users/morae/repos","events_url":"https://api.github.com/users/morae/events{/privacy}","received_events_url":"https://api.github.com/users/morae/received_events","type":"User","site_admin":false},"created_at":"2015-08-25T16:03:51Z","updated_at":"2015-08-25T16:03:51Z","body":"I added support for BatchSweeps to `PVModule.lua`. It can be used two ways.\r\n\r\nExample 1: Manually\r\n\r\n```\r\n...\r\nparams['\"column\":outputPath'] = {\r\n  groupType = \"BatchSweep\";\r\n  \"my/output/path/for/batch/rank0/\";\r\n  \"my/output/path/for/batch/rank1/\";\r\n  \"my/output/path/for/batch/rank2/\";\r\n  \"my/output/path/for/batch/rank3/\";\r\n  \"my/output/path/for/batch/rank4/\";\r\n}\r\n...\r\n```\r\n\r\nExample 2: With Generator Function\r\n```\r\n...\r\npv.batchSweep(params, 'column', 'outputPath', 'my/output/path/for/batch/rank%d', 5);\r\n...\r\n```\r\n\r\nThese two examples will produce equivalent output, although the second is somewhat limited as it can only make sweeps over string parameters that have the rank index appear in one place."}}