Comments (32)
Thanks @yamada-github-account , @haoyu-x and yes, I also think it would be better to open a new issue regarding this.
from tf2rl.
Test code
# Generate trajectories
$ python examples/run_sac.py --env-name HalfCheetah-v2 --save-test-path --test-interval 50000 --gpu -1
$ ls results
20191220T185529.974847_SAC_
$ python examples/run_airl_sac.py --env-name HalfCheetah-v2 --test-interval 10000 --gpu -1 --expert-path-dir results/20191220T185529.974847_SAC_
from tf2rl.
hi @keiohta when I run
$ python ~/tf2rl-master/examples/run_gaifo_ddpg.py --env-name=HalfCheetah-v2 --expert-path-dir ~/GAIL/results/20200619T013740.036943_SAC_ --gpu -1 --dir-suffix GAIfO
run_gaifo_ddpg.py: error: unrecognized arguments: --gpu -1
can you help me ? Thank you!
from tf2rl.
@haoyu-x Hi! Thanks for reporting the bug. I fixed the error on this commit, so can you try on the latest master branch again?
from tf2rl.
from tf2rl.
Yeah, did you update the codes?
from tf2rl.
from tf2rl.
At least I resolved the error of --gpu
.
Let me check whether full code runs.
from tf2rl.
from tf2rl.
I confirmed the script runs on my machine. Can you provide me with the full error message?
$ python examples/run_sac.py --env-name=HalfCheetah-v2 --save-test-path --test-interval=50000 --max-steps 300000
$ ls results
20200627T221712.423081_SAC_
$ find results/20200627T221712.423081_SAC_/ -name *.pkl
results/20200627T221712.423081_SAC_/step_00050000_epi_02_return_02744.1677.pkl
results/20200627T221712.423081_SAC_/step_00050000_epi_04_return_02701.9388.pkl
results/20200627T221712.423081_SAC_/step_00050000_epi_00_return_03121.5797.pkl
results/20200627T221712.423081_SAC_/step_00050000_epi_01_return_02784.6256.pkl
results/20200627T221712.423081_SAC_/step_00050000_epi_03_return_02752.4279.pkl
$ python examples/run_gail_ddpg.py --env-name=HalfCheetah-v2 --expert-path-dir results/20200627T221712.423081_SAC_/ --gpu -1
...
22:23:48.107 [INFO] (irl_trainer.py:74) Total Epi: 19 Steps: 19000 Episode Steps: 1000 Return: 1174.4017 FPS: 118.79
22:23:56.162 [INFO] (irl_trainer.py:74) Total Epi: 20 Steps: 20000 Episode Steps: 1000 Return: 1889.9691 FPS: 124.15
22:23:57.861 [INFO] (irl_trainer.py:118) Evaluation Total Steps: 20000 Average Reward 2278.0820 over 5 episodes
from tf2rl.
from tf2rl.
Oh, I assumed you installed tf2rl on developer mode...
I have not reflected my change on PyPI, so I do now.
from tf2rl.
from tf2rl.
Now, you can get the latest codes through PyPI. Can you try following?
# Update tf2rl
$ pip install -U tf2rl
# Make sure the version is 0.1.14
$ pip list | grep tf2rl
# Run your script
$ python ~/tf2rl-master/examples/run_gaifo_ddpg.py --env-name=HalfCheetah-v2 --expert-path-dir ~/GAIL/results/20200619T013740.036943_SAC_ --gpu -1 --dir-suffix GAIfO
By the way, it seems that your path: ~/tf2rl-master
suggests that you did not install tf2rl using git clone
but you just download zip file, didn't you?
Anyway above command can detect the version, so please let me know if you still encounter the same problem.
from tf2rl.
from tf2rl.
from tf2rl.
I cannot see your screenshot.
Can you copy the message or retry uploading the picture?
from tf2rl.
from tf2rl.
I guess you collected the expert transitions on different environment (such as Pendulum-v0? because the state dimension of pendulum-v0 is 3).
Are you sure the expert data are collected on HalfCheetah-v2?
from tf2rl.
from tf2rl.
from tf2rl.
It's great your script runs successfully!
I cannot see your picture again... I just do:
$ tensorboard --logdir results
Does this answer your question?
from tf2rl.
from tf2rl.
You can add suffix to a resulted directory by adding --dir-suffix
option. #67 uses it as:
$ python examples/run_gail_ddpg.py --env-name=HalfCheetah-v2 --expert-path-dir results/20191213T203858.508559_SAC_ --gpu -1 --dir-suffix GAIL
$ python examples/run_gaifo_ddpg.py --env-name=HalfCheetah-v2 --expert-path-dir results/20191213T203858.508559_SAC_ --gpu -1 --dir-suffix GAIfO
$ python examples/run_vail_ddpg.py --env-name=HalfCheetah-v2 --expert-path-dir results/20191213T203858.508559_SAC_ --gpu -1 --dir-suffix VAIL
from tf2rl.
from tf2rl.
My pleasure! Please don't hesitate to open an issue if you encounter any difficulty or question.
I close this issue. Thanks for the report!
from tf2rl.
OMG, this issue is not related to your question. So, I have to reopen this one.
It would be better to open a new issue if it is not related to the original one ;)
from tf2rl.
from tf2rl.
from tf2rl.
Hi, @haoyu-x
Could you open a new issue?
This is the issue where developpers track and discuss AIRL implementation.
For me, your problem is not related with the main topic of this issue.
from tf2rl.
@keiohta I can't seem to find the run-airl-****.py files anywhere. Is this a commit issue? Am I missing something?
from tf2rl.
Hi @Aadit-Ambadkar , we haven't fully tested AIRL yet, but you can try it on different branch: https://github.com/keiohta/tf2rl/blob/airl/examples/run_airl_sac.py
from tf2rl.
Related Issues (20)
- GAIfO doesn't work with Ant-v2.
- Implement SAC+AE
- Add recent version of TensorFlow HOT 4
- Fix atari-py related errors HOT 1
- Implement RAD
- Fix categorical policy
- Wrapping For Absorbing State in case of off-policy GAIL/GAIfO/VAIL (DAC)
- Setting step size in trainer.py for evaluate policy HOT 2
- Discount not applied in evaluate_policy? HOT 9
- Unused argument `max_steps' in the function restore_latest_n_traj
- problem with load_trajectories function in experiments/utils.py HOT 3
- How to use multiple GPU to train HOT 2
- How to save the model and after the train of policy, how to use the policy on the new environment? HOT 1
- Improve document
- DeprecatedEnv error for Pendulum-v0 HOT 1
- "TypeError: 'range' object cannot be interpreted as an integer" when attempting to use the __call__() method of IRLTrainer
- ModuleNotFoundError: No module named 'future' HOT 1
- Example of GAIFO for atari?
- Possible error in critic update in SAC-AE algorithm HOT 2
- AttributeError: module 'tensorflow' has no attribute 'version' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tf2rl.