From 0703de93834018a425387d7f3390d8803fc09af0 Mon Sep 17 00:00:00 2001 From: Marco Zatta Date: Mon, 7 Aug 2023 12:54:16 +0200 Subject: [PATCH] Provide instructions to test locally Anylogic sample --- examples/getting-started-anylogic-sim/README.md | 13 +++++++++---- examples/getting-started-anylogic-sim/src/start.sh | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/examples/getting-started-anylogic-sim/README.md b/examples/getting-started-anylogic-sim/README.md index 161718d..341248e 100644 --- a/examples/getting-started-anylogic-sim/README.md +++ b/examples/getting-started-anylogic-sim/README.md @@ -57,7 +57,9 @@ To do this: docker build -t anylogic-sim . ``` -2. Go back to the ``getting-started-anylogic-sim`` folder and run: +2. In ``src/start.sh`` append ``--test-local`` to ``python -u main.py`` + +3. Go back to the ``getting-started-anylogic-sim`` folder and run: ```bash docker run --rm -it -e LOG_LEVEL=debug -v $(pwd)/src:/opt/src anylogic-sim bash /opt/src/start.sh ``` @@ -81,16 +83,19 @@ train an RL agent on AML: and ``compute`` to be the same as those you created in the prerequisites section. -2. Launch the job using the Azure CLI: +2. Remember to remove ``--test-local`` from ``start.sh`` if you tested the + sample locally + +3. Launch the job using the Azure CLI: ``` az ml job create -f job.yml --workspace-name $YOUR_WORKSPACE --resource-group $YOUR_RESOURCE_GROUP ``` -3. Check that it is running by finding the job you launched in [AML +4. Check that it is running by finding the job you launched in [AML studio](https://ml.azure.com/). You should see that ``ray`` is writing logs in the *Outputs + logs* tab in the ``user_logs`` folder. -4. Once the job is completed, the model checkpoints can also be found in AML +5. Once the job is completed, the model checkpoints can also be found in AML studio under the *Outputs + Logs* tab of your job in the ``outputs`` folder. diff --git a/examples/getting-started-anylogic-sim/src/start.sh b/examples/getting-started-anylogic-sim/src/start.sh index 610c304..b551d5e 100755 --- a/examples/getting-started-anylogic-sim/src/start.sh +++ b/examples/getting-started-anylogic-sim/src/start.sh @@ -2,4 +2,4 @@ set -xe memcached -p 11211 -u memcache -l 127.0.0.1 -d -python -u main.py --test-local +python -u main.py