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

Running multiple instances #27

Closed
maclandrol opened this issue Feb 21, 2019 · 3 comments
Closed

Running multiple instances #27

maclandrol opened this issue Feb 21, 2019 · 3 comments

Comments

@maclandrol
Copy link

Hello @apls777

Thanks for spotty, I love this project.
I was wondering if there is way to request several instances at the same time (like with sagemaker) to run the same code but with different configuration in parallel.

Also is it possible to pass arguments to spotty run like `spotty run train --config "path to file"``

Thanks.

@apls777
Copy link
Collaborator

apls777 commented Feb 21, 2019

Hi @maclandrol,

Thank you! :)

All spotty commands have the -c/--config parameter. So you can start several instances by providing different spotty configuration files to the spotty start command, and then run your script on each instance providing the same configuration file to the spotty run command. For example:

spotty start -c spotty.i1.yaml
spotty run train -c spotty.i1.yaml

spotty start -c spotty.i2.yaml
spotty run train -c spotty.i2.yaml

And don't forget to stop all of them after :).

I know that it's not very convenient, because you're basically copy-pasting the same configuration file several times, and then using the -c parameter for every command. Moreover, the project name parameter should be different in each configuration file, otherwise, the tool tells you that the stack already exists. Also, it will create a new S3 bucket for each configuration.

I faced this problem before as well, and I've made it slightly better it in the future version 1.2. The format of the configuration file will be a little bit different, and you will be able to specify there several instances. They will reuse the same S3 bucket. Also, scripts will be parameterizable, so you could use custom parameters: spotty run [INSTANCE_NAME] SCRIPT_NAME [-p PARAM1=VAL1 PARAM2=VAL2 ...].

@maclandrol
Copy link
Author

This answers all my question. Thanks !

I am using spotty inside a wrapper for automatic config generation and instance launching, so it should be fine.

Reusing the same S3 bucket will be a really great feature. It might also be helpful to have a way to automatically stop the instance after a given time limit (I am using a scheduler now, which is working fine) !

@apls777
Copy link
Collaborator

apls777 commented Feb 21, 2019

Thank you for the feedback! I will add the time limit feature to my TODO list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants