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

Work with AWS Preemptible Instance #33

Closed
vwxyzjn opened this issue Sep 28, 2020 · 1 comment
Closed

Work with AWS Preemptible Instance #33

vwxyzjn opened this issue Sep 28, 2020 · 1 comment
Labels
enhancement New feature or request require expertise

Comments

@vwxyzjn
Copy link
Owner

vwxyzjn commented Sep 28, 2020

Problem Description

For the AWS Integrations, we usually run experiments using AWS spot instances to save cost. However, sometimes there's a need to running experiments for a long time. Real use cases include running montezuma's revenge by @yooceii and certain microrts tasks by myself. So we should look more into this issue.

By consulting this resource, I am considering storing the models periodically on the associated wandb run of certain run_id, and should the aws instance terminate, we basically pull the associated models from the run with run_id and continue training.

@vwxyzjn vwxyzjn added enhancement New feature or request require expertise labels Sep 28, 2020
vwxyzjn added a commit to Farama-Foundation/MicroRTS-Py that referenced this issue Sep 29, 2020
@vwxyzjn
Copy link
Owner Author

vwxyzjn commented Sep 29, 2020

Farama-Foundation/MicroRTS-Py@f50994d roughly shows the required changes, which involves about 20 lines of code change.

As a demo, try the following command:

# to start
python ppo_autoregressive.py \
    --wandb-project-name gym-microrts \
    --total-timesteps 100000000 \
    --gym-id MicrortsDefeatWorkerRushEnemyShaped-v2 \
    --prod-mode True \
    --capture-video True

# in case it terminates, use the following to resume
export WANDB_RESUME=must
export WANDB_RUN_ID=2kse3aqy # get your related run id
python ppo_autoregressive.py \
    --wandb-project-name gym-microrts \
    --total-timesteps 100000000 \
    --gym-id MicrortsDefeatWorkerRushEnemyShaped-v2 \
    --prod-mode True \
    --capture-video True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request require expertise
Projects
None yet
Development

No branches or pull requests

1 participant