PathmindAI / nativerl

Train reinforcement learning agents using AnyLogic or Python-based simulations
Apache License 2.0
19 stars 4 forks source link

provide pathmind simulation models' meta information #497

Closed kepricon closed 2 years ago

kepricon commented 3 years ago

We can get analyzed results for python models like AL models.

for example, we can see observation lists for python models from the webapp. image

validate selected obs

obs.yaml has 4 obs: [mouse_row, mouse_col, mouse_row_dist, mouse_col_dist] but [mouse_row_dist, mouse_col_dist] doesn't belong to full obs list.

kepricon@kepricon-G732LXS:~/git/pathmind-webapp/pathmind-api$ curl -i -XPOST -H "X-PM-API-TOKEN: 11202253-5709-4eb7-9102-f87122314464" -F 'file=@/home/kepricon/Downloads/python_examples/python_examples.zip' -F 'projectId=500' -F 'env=examples.mouse.mouse_env_pathmind.MouseAndCheese' -F 'obsSelection=examples/mouse/obs.yaml' -F 'start=TRUE' http://localhost:8081/py/upload
HTTP/1.1 100 

HTTP/1.1 400 
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Location: http://localhost:8080/uploadModelError/Could%20not%20find%20%5B'mouse_row_dist',%20'mouse_col_dist'%5D%20observation(s)%20from%20the%20simulation.%20Make%20sure%20to%20check%20for%20obs.yaml%20and%20simulation
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Type: text/plain;charset=UTF-8
Content-Length: 134
Date: Fri, 12 Nov 2021 04:33:32 GMT
Connection: close

Could not find ['mouse_row_dist', 'mouse_col_dist'] observation(s) from the simulation. Make sure to check for obs.yaml and simulation

check obs.yaml exist or not

-F 'obsSelection=examples/mouse/obs.yaml1'

kepricon@kepricon-G732LXS:~/git/pathmind-webapp/pathmind-api$ curl -i -XPOST -H "X-PM-API-TOKEN: 11202253-5709-4eb7-9102-f87122314464" -F 'file=@/home/kepricon/Downloads/python_examples/python_examples.zip' -F 'projectId=500' -F 'env=examples.mouse.mouse_env_pathmind.MouseAndCheese' **-F 'obsSelection=examples/mouse/obs.yaml1'** -F 'start=TRUE' http://localhost:8081/py/upload
HTTP/1.1 100 

HTTP/1.1 400 
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Location: http://localhost:8080/uploadModelError/obs.yaml%20file%20doesn't%20exist%20in%20examples/mouse/obs.yaml1
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Type: text/plain;charset=UTF-8
Content-Length: 55
Date: Fri, 12 Nov 2021 01:55:27 GMT
Connection: close

obs.yaml file doesn't exist in examples/mouse/obs.yaml1