-
Notifications
You must be signed in to change notification settings - Fork 70
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
Crash on "run_acme_agent.py" #17
Comments
Hello @ouya99, thanks for the report! I think we may have a bug in that script. The off-the-shelf Acme agent expects an action spec that's simply a Can you try adding a Thanks! Daniel Toyama |
Hello @kenjitoyama fixed it applying the FlatInterfaceWrapper
Now having problems with the following line of code
Thanks |
Hi @ouya99, nice catch, thank you! |
Hello @a-gergely well, actually after line 78 has been fixed with FlatInterfaceWrapper and line 79 with acme.EnvironmentLoop, the next line 80 is returning the following...
|
Fix landed! |
@a-gergely
oh. maybe I need to re-install with "python3 setup.py install". I will try that |
Tested current version cf5f631 All problems fixed. Game with acme support is starting correctly. After 10-20 seconds though the app crashes (System UI isn't responding) |
Right, I'm not sure exactly what's going on if it's an internal Android crash (i.e. not within AndroidEnv's code). Can you try other tasks? We have used 2048, vokram quite extensively internally, so they should be working well (maybe also try other AVDs with different configurations such as smaller resolution screens or higher memory). If the script is running, I think this bug is resolved. Other problems such as Reverb's error are probably out of the scope from this particular issue. Cheers! |
@kenjitoyama Issue closed |
Cool, glad it worked! |
I tried installing android_env via pip and followed along this thread. The game is starting but i am getting the following error. Any suggestions is highly appreciated.
|
Hi @cupGreek, this error seems unrelated to AndroidEnv. It's crashing in Reverb. From the little I see from the stack trace, it looks like there is a mismatch with the names of the tensors. Reverb is expecting named tensors like "observation" and "action", but it's getting names like "0" and "1". I'm not sure if they changed something in Acme that could be causing this. On our side, we should probably use their JAX agents instead of TF, since JAX has received more love in the last few years. |
I created #23 to track the migration from TF to JAX. |
Hello,
I did install all dependencies for acme and i am running it on python3.8 (linux) using the pong textproto and pong apk
python3 run_acme_agent.py --avd_name='Pixel_XL_API_30' --android_avd_home='/home/username/.android/avd' --android_sdk_root=/home/username/Android/Sdk/ --emulator_path=/home/username/Android/Sdk/emulator/emulator --adb_path=/home/username/Android/Sdk/platform-tools/adb --num_episodes=100 --task_path=/home/username/Dev/android_env/examples/pong_default.textproto
I am getting the following error
I0622 02:01:27.057457 139624755865408 environment.py:37] Action spec: {'action_type': DiscreteArray(shape=(), dtype=int32, name=action_type, minimum=0, maximum=2, num_values=3), 'touch_position': BoundedArray(shape=(2,), dtype=dtype('float32'), name='touch_position', minimum=[0. 0.], maximum=[1. 1.])} I0622 02:01:27.058849 139624755865408 environment.py:38] Observation spec: {'pixels': Array(shape=(2560, 1440, 3), dtype=dtype('uint8'), name='pixels'), 'timedelta': Array(shape=(), dtype=dtype('int64'), name='timedelta'), 'orientation': Array(shape=(4,), dtype=dtype('uint8'), name='orientation')} I0622 02:01:27.059457 139624755865408 environment.py:39] Task extras spec: {'ball': Array(shape=(4,), dtype=dtype('int32'), name='ball'), 'computer': Array(shape=(4,), dtype=dtype('int32'), name='computer'), 'human': Array(shape=(4,), dtype=dtype('int32'), name='human'), 'collision': Array(shape=(1,), dtype=dtype('int32'), name='collision'), 'state': Array(shape=(1,), dtype=dtype('int32'), name='state')} Traceback (most recent call last): File "run_acme_agent.py", line 88, in <module> app.run(main) File "/home/username/.local/lib/python3.8/site-packages/absl/app.py", line 312, in run _run_main(main, args) File "/home/username/.local/lib/python3.8/site-packages/absl/app.py", line 258, in _run_main sys.exit(main(argv)) File "run_acme_agent.py", line 73, in main num_actions=env_spec.actions.num_values), AttributeError: 'dict' object has no attribute 'num_values' I0622 02:01:27.711886 139624755865408 environment.py:127] Cleaning up AndroidEnv...
Thank you for any insights
The text was updated successfully, but these errors were encountered: