Giter Club home page Giter Club logo

mixed_autonomy_intersections's People

Contributors

zhongxiayan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mixed_autonomy_intersections's Issues

the training crashes because of the raytask

the config yaml is:

av_frac: 0.5
device: cpu
directions: 4way
n_cols: 1
n_rollouts_per_step: 256
n_rows: 1
n_workers: 16
worker_kwargs:
- flow_rate_h: 700
  flow_rate_v: 700
- flow_rate_h: 850
  flow_rate_v: 850
- flow_rate_h: 850
  flow_rate_v: 700
- flow_rate_h: 850
  flow_rate_v: 550
- flow_rate_h: 850
  flow_rate_v: 400
- flow_rate_h: 700
  flow_rate_v: 850
- flow_rate_h: 550
  flow_rate_v: 850
- flow_rate_h: 400
  flow_rate_v: 850
- flow_rate_h: 1000
  flow_rate_v: 850
- flow_rate_h: 1000
  flow_rate_v: 700
- flow_rate_h: 1000
  flow_rate_v: 550
- flow_rate_h: 1000
  flow_rate_v: 400
- flow_rate_h: 850
  flow_rate_v: 1000
- flow_rate_h: 700
  flow_rate_v: 1000
- flow_rate_h: 550
  flow_rate_v: 1000
- flow_rate_h: 400
  flow_rate_v: 1000

the command is:

python intersection.py results/fourway_1x1_penetration0.5

the log is

i 104 | ii 255 | n_veh_step_mean 14.1 | n_veh_step_sum 2.82e+04 | n_veh_unique 387
2022-10-29 21:17:27,083 WARNING [worker.py:1829](http://worker.py:1829) -- A worker died or was killed while executing a task by an unexpected system error. To troubleshoot the problem, check the logs for the dead worker. RayTask ID: ffffffffffffffff8d9f376e21fe8973fcb0e4d701000000 Worker ID: 3fa7a262580beff71dedab84f2f6ab1a617716292ec00bb73de6dc8c Node ID: 9aedc44a625880aa7985a83bf5aa403f3d9601298409d51e53973e2c Worker IP address: 192.168.96.4 Worker port: 43775 Worker PID: 186329 Worker exit type: SYSTEM_ERROR Worker exit detail: Worker unexpectedly exits with a connection error code 2. End of file. There are some potential root causes. (1) The process is killed by SIGKILL by OOM killer due to high memory usage. (2) ray stop --force is called. (3) The worker is crashed unexpectedly due to SIGSEGV or other unexpected errors.
i 104 | ii  0 | policy_loss -2.01 | kl -5.98e-12 | entropy 0.211
i 104 | gd_time 119 | total_time 7.35e+04

i 105 | klcoef 0 | lr 0.001

Saved model /home/ubuntu/data/Jeffrey/mixed_autonomy_intersections/results_xlchan/fourway_1x1_penetration0.5/models/model-105.pth at step 105

Traceback (most recent call last):

  File "/home/ubuntu/data/Jeffrey/mixed_autonomy_intersections/intersection.py", line 313, in <module>

    c.run()

  File "/home/ubuntu/data/Jeffrey/mixed_autonomy_intersections/exp.py", line 357, in run

    c.train()

  File "/home/ubuntu/data/Jeffrey/mixed_autonomy_intersections/exp.py", line 289, in train

    rollouts = c.rollouts()

  File "/home/ubuntu/data/Jeffrey/mixed_autonomy_intersections/exp.py", line 174, in rollouts

    rollout_stats = flatten(ray.get([w.rollouts_single_process.remote() for w in c._rollout_workers]))

  File "/home/ubuntu/data/anacond3/envs/drl/lib/python3.8/site-packages/ray/_private/client_mode_hook.py", line 105, in wrapper

    return func(*args, **kwargs)

  File "/home/ubuntu/data/anacond3/envs/drl/lib/python3.8/site-packages/ray/_private/worker.py", line 2282, in get

    raise value

ray.exceptions.RayActorError: The actor died unexpectedly before finishing this task.

  class_name: GridExp

  actor_id: 8d9f376e21fe8973fcb0e4d701000000

  pid: 186329

  namespace: 7bd7b1ab-09a7-4e4d-ac05-d44f61be5dbd

  ip: 192.168.96.4

The actor is dead because its worker process has died. Worker exit type: SYSTEM_ERROR Worker exit detail: Worker unexpectedly exits with a connection error code 2. End of file. There are some potential root causes. (1) The process is killed by SIGKILL by OOM killer due to high memory usage. (2) ray stop --force is called. (3) The worker is crashed unexpectedly due to SIGSEGV or other unexpected errors.

My device has 48 CPUs. the version of ray is 2.0.1. Can you provide the detailed versions of python package?(Maybe it is not related to this issue.)
Is there any way to fix this?

Errors when trainning models

Hello

Thank you very much for sharing your code

But I had errors when running model at training step with n_workers: 1
I followed your instruction and take

python intersection.py EXP_DIR

Traceback (most recent call last):
File "intersection.py", line 312, in
c.run()
File "/home/osboxes/Desktop/mixed_autonomy_intersections/exp.py", line 357, in run
c.train()
File "/home/osboxes/Desktop/mixed_autonomy_intersections/exp.py", line 289, in train
rollouts = c.rollouts()
File "/home/osboxes/Desktop/mixed_autonomy_intersections/exp.py", line 176, in rollouts
rollout_stats = c.rollouts_single_process()
File "/home/osboxes/Desktop/mixed_autonomy_intersections/exp.py", line 182, in rollouts_single_process
rollout_stats = [c.var(i_rollout=i).rollout() for i in range(c.n_rollouts_per_worker)]
File "/home/osboxes/Desktop/mixed_autonomy_intersections/exp.py", line 182, in
rollout_stats = [c.var(i_rollout=i).rollout() for i in range(c.n_rollouts_per_worker)]
File "/home/osboxes/Desktop/mixed_autonomy_intersections/exp.py", line 201, in rollout
ret = c._env.reset()
File "/home/osboxes/Desktop/mixed_autonomy_intersections/env.py", line 1029, in reset
return self.norm_obs(self.env.reset())
File "intersection.py", line 108, in reset
ret = super().init_env()
File "/home/osboxes/Desktop/mixed_autonomy_intersections/env.py", line 932, in init_env
ret = self.step()
File "intersection.py", line 144, in step
super().step()
File "/home/osboxes/Desktop/mixed_autonomy_intersections/env.py", line 894, in step
self.ts.step()
File "/home/osboxes/Desktop/mixed_autonomy_intersections/env.py", line 791, in step
edge = self.edges[veh.road_id]
KeyError: ''

traci.exceptions.TraCIException: TraCI server already finished

File "/home/amax/Users/ljw/mixed_autonomy_intersections/exp.py", line 182, in rollouts_single_process
rollout_stats = [c.var(i_rollout=i).rollout() for i in range(c.n_rollouts_per_worker)]
File "/home/amax/Users/ljw/mixed_autonomy_intersections/exp.py", line 182, in
rollout_stats = [c.var(i_rollout=i).rollout() for i in range(c.n_rollouts_per_worker)]
File "/home/amax/Users/ljw/mixed_autonomy_intersections/exp.py", line 201, in rollout
ret = c._env.reset()
File "/home/amax/Users/ljw/mixed_autonomy_intersections/env.py", line 1029, in reset
return self.norm_obs(self.env.reset())
File "/home/amax/Users/ljw/mixed_autonomy_intersections/intersection.py", line 106, in reset
while not self.reset_sumo():
File "/home/amax/Users/ljw/mixed_autonomy_intersections/env.py", line 913, in reset_sumo
self.tc = sumo_def.start_sumo(self.tc)
File "/home/amax/Users/ljw/mixed_autonomy_intersections/env.py", line 345, in start_sumo
tc = traci.connect(self.port, 10, 'localhost', p)
File "/home/amax/.conda/envs/mixed/lib/python3.9/site-packages/traci/main.py", line 105, in connect
raise TraCIException("TraCI server already finished")
traci.exceptions.TraCIException: TraCI server already finished

'GridExp' object has no attribute 'wb'

Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
def randint(low, high=None, size=None, dtype=onp.int): # pylint: disable=missing-function-docstring
i 180 | klcoef 0 | lr 0.001
Traceback (most recent call last):
File "/home/amax/Users/ljw/mixed_autonomy_intersections/u.py", line 549, in getattr
return self[key]
KeyError: 'wb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "intersection.py", line 312, in
c.run()
File "/home/amax/Users/ljw/mixed_autonomy_intersections/exp.py", line 359, in run
c.train()
File "/home/amax/Users/ljw/mixed_autonomy_intersections/exp.py", line 289, in train
c.on_step_start()
File "/home/amax/Users/ljw/mixed_autonomy_intersections/exp.py", line 164, in on_step_start
c.log_stats(dict(**stats, **c._alg.on_step_start(), lr=lr))
File "/home/amax/Users/ljw/mixed_autonomy_intersections/exp.py", line 112, in log_stats
if c.wb:
File "/home/amax/Users/ljw/mixed_autonomy_intersections/u.py", line 551, in getattr
self.getattribute(key)
AttributeError: 'GridExp' object has no attribute 'wb'

Checkpoint and example config.yaml

Hi,

It is great news for me that the code is released! Thanks for your effort!
However, it seems that there is no checkpoint file and config.yaml in your repo?

Dawei

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.