Skip to content

Commit

Permalink
Provide instructions to test locally Anylogic sample
Browse files Browse the repository at this point in the history
  • Loading branch information
mzat-msft committed Aug 14, 2023
1 parent 04c7c5d commit 0703de9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions examples/getting-started-anylogic-sim/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand All @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion examples/getting-started-anylogic-sim/src/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0703de9

Please sign in to comment.