Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Fix calls for running zenbot in genetic algo directory #603

Merged
merged 1 commit into from
Oct 13, 2017

Conversation

emabo
Copy link
Contributor

@emabo emabo commented Oct 9, 2017

I would like to propose a fix for running genetic algo using python code in scripts/genetic_algo. I'm not sure this fix is going to work also using docker, because I'm running the app without dockers.

@emabo emabo changed the title Pull request1 Fix calls for running zenbot in genetic algo directory Oct 9, 2017
@@ -31,7 +31,7 @@ def runzen(cmdline):


class Andividual(Individual):
BASE_COMMAND = '/app/zenbot.sh sim {instrument} --strategy {strategy} --avg_slippage_pct 0.33 --filename temp.html'
BASE_COMMAND = 'env node ../../zenbot.js sim {instrument} --strategy {strategy} --avg_slippage_pct 0.33 --filename temp.html'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the ../../ but why can't you use zenbot.sh?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because, otherwise I have this error:

module.js:473
throw err;
^

Error: Cannot find module '/home/emanuele/Code/zenbot.gh/scripts/genetic_algo/zenbot.js'
at Function.Module._resolveFilename (module.js:527:15)
at Function.Module._load (module.js:453:25)
at Function.Module.runMain (module.js:665:10)
at startup (bootstrap_node.js:201:16)
at bootstrap_node.js:626:3

it expects to find zenbot.js in current directory that is scripts/genetic_algo/

@JensvdHeydt
Copy link
Contributor

I think we should decide if we expect the scripts to be run from the /scripts/ folder of from the root folder. That's the main cause of most of the problems here

@DeviaVir
Copy link
Owner

I think the docker variant is also not working now, so better to have a working example then nothing at all. Fully expecting a followup PR for this.

@DeviaVir DeviaVir merged commit a3c9cad into DeviaVir:master Oct 13, 2017
@emabo emabo deleted the pull-request1 branch October 13, 2017 21:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants