-
Notifications
You must be signed in to change notification settings - Fork 266
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
Video recording #360
Comments
Hi, the lab does not have this capability now, contributions are certainly welcome! If you'd like to work on it, I'd suggest a minimal method insertion like the one done for rendering here, just to ensure API consistency and simplicity. |
I was able to get it working — the commit is here: colllin@b7d70cd Example usage: $ RECORD=true python run_lab.py data/dqn_cartpole_2019_123/dqn_cartpole_spec.json dqn_cartpole enjoy@dqn_cartpole_t0_s0_ckpt-best I have some open questions that prevent me from submitting as a PR:
Alternatively, if the integration is too complex, we could close this issue and you could point other people here to merge my commit into their project if they want to record video. Thank you for your help & attention! |
Hey, this looks good! It is also simple enough to integrate nicely in. We'd be more than happy to accept a PR; this will be a wonderful addition to the lab. The enjoy mode thing is probably complaining about a specific That said, it suffices to test just on a gym environment now since unity tests are mostly excluded. Most tests are located in test files while directly mirror the original file structure. Feel free to add just 1 simple test. |
Thanks @kengz, I’d be happy to write a test, add some docs, and submit a PR. Can you help me with something though? When I run the following commands (basically right out of the docs), $ python run_lab.py slm_lab/spec/demo.json dqn_cartpole train
...
$ python run_lab.py data/dqn_cartpole_2019_.../dqn_cartpole_spec.json dqn_cartpole enjoy@dqn_cartpole_t0_s1
Traceback (most recent call last):
File "run_lab.py", line 84, in <module>
main()
File "run_lab.py", line 73, in main
read_spec_and_run(*args)
File "run_lab.py", line 57, in read_spec_and_run
run_spec(spec, lab_mode)
File "run_lab.py", line 42, in run_spec
Session(spec).run()
File "/home/ubuntu/SLM-Lab/slm_lab/experiment/control.py", line 115, in run
metrics = analysis.analyze_session(self.spec, self.agent.body.eval_df, 'eval')
File "/home/ubuntu/SLM-Lab/slm_lab/experiment/analysis.py", line 232, in analyze_session
assert len(session_df) > 1, f'Need more than 1 datapoint to calculate metrics'
AssertionError: Need more than 1 datapoint to calculate metrics Am I missing something? It seems that |
Hey, pretty sure you added code is not causing that since it doesnt have any side effects. |
hi @colllin are you still facing the issue? |
Hey, thanks for checking in! I was hoping to copy & paste a test that was similar to what I needed, but couldn’t find a simple test around enjoy mode as a starting point. If you could point me to an example, that would help me out, otherwise I’ll take another look at it this weekend now that I understand the repo a little better.
…
On Jun 29, 2019 at 8:45 AM, <Wah Loon Keng ***@***.***)> wrote:
hi @colllin (https://github.com/colllin) are you still facing the issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub (#360?email_source=notifications&email_token=AABNMQ2KYI2KXXS7BBW3ICTP45YPXA5CNFSM4HVC7JKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY32BVI#issuecomment-506962133), or mute the thread (https://github.com/notifications/unsubscribe-auth/AABNMQ4OOGRVQMQFJ5QLDHDP45YPXANCNFSM4HVC7JKA).
|
test it under the module of that added method; doing so might be cleaner. Just get an SLM-Lab/slm_lab/spec/random_baseline.py Lines 87 to 88 in ac2e5b3
however, if it's problematic, just add a minimal invocation test or no test, since the addition is short. |
Hello 👋
I searched the repo a bit but I’m fairly new to it. I’m running on a headless server and I’m trying to understand if SLM-Lab has the capability for video recording of an episode. I saw that it installs the ffmpeg module in
ubuntu_setup.sh
, but don’t see if/where ffmpeg is being used. Does it have this capability? Can you point me to the code? If not, I can try to add it if you’d be interested.The text was updated successfully, but these errors were encountered: