-
Notifications
You must be signed in to change notification settings - Fork 10
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
How To Enjoy!!! #8
Comments
Hi, welcome! Essentially you'll use it like this: def make_env(rank, env_conf, seed=0):
"""
Utility function for multiprocessed env.
:param env_id: (str) the environment ID
:param num_env: (int) the number of environments you wish to have in subprocesses
:param seed: (int) the initial seed for RNG
:param rank: (int) index of the subprocess
"""
def _init():
env = StreamWrapper(
RedGymEnv(env_conf),
stream_metadata = {
"user": "some_username",
"env_id": rank,
"color": "#0033ff",
"extra": "", # any extra text you put here will be displayed
}
)
env.reset(seed=(seed + rank))
return env
set_random_seed(seed)
return _init |
Hod do you find the env_id ? |
@Neya45 |
Hey @PWhiddy - This is amazing. I have set up the StreamWrapper as above, but what do i 'run' in python to start this?? |
Hey! When you say "what do I run to start this", do you mean run a training script with the stream wrapper streaming to the shared map server, or do you mean running your own private local map streaming server? For the former, see the v2 training script an example which now automatically does this by default. For the latter, you'll want to serve the files in the root directory with a simple http server, and you can use node to run the websocket server which is in the Note if you're running your own map server you'll need to adjust the websocket url in the stream wrapper to point to your version. |
I am a beginner from China. I really want to know where this env is added, or where it exists to edit, and which file to run. I really hope to join you.
The text was updated successfully, but these errors were encountered: