Giter Site home page Giter Site logo

Comments (17)

TrinhTuanHung2021 avatar TrinhTuanHung2021 commented on May 11, 2024

I used Sumo version 1.13.0.

image

from mixed_autonomy_intersections.

ZhongxiaYan avatar ZhongxiaYan commented on May 11, 2024

Hey, beside your command, are you using any input files (it sounds like you put n_workers=1 into a yaml file)? Can you run find EXP_DIR and send the list of file names to me?

from mixed_autonomy_intersections.

TrinhTuanHung2021 avatar TrinhTuanHung2021 commented on May 11, 2024

Hey, beside your command, are you using any input files (it sounds like you put n_workers=1 into a yaml file)? Can you run find EXP_DIR and send the list of file names to me?

Thank you for replying to me.
I used n_workers=1 into a yaml file to train

And after running find EXP_DIR

(MAI) osboxes@osboxes:~/Desktop/mixed_autonomy_intersections$ find EXP_DIR
EXP_DIR
EXP_DIR/models
EXP_DIR/models/model-0.pth
EXP_DIR/events.out.tfevents.1657280878.osboxes.4062.0
EXP_DIR/events.out.tfevents.1657262608.osboxes.25073.0
EXP_DIR/sumo
EXP_DIR/sumo/net.xml
EXP_DIR/sumo/add.xml
EXP_DIR/sumo/gui.xml
EXP_DIR/sumo/edg.xml
EXP_DIR/sumo/nod.xml
EXP_DIR/sumo/con.xml
EXP_DIR/train_results.csv
EXP_DIR/2022-07-08T15_27_52.log
EXP_DIR/events.out.tfevents.1657261672.osboxes.24729.0
EXP_DIR/2022-07-08T20_48_23.log
EXP_DIR/config.yaml
EXP_DIR/events.out.tfevents.1657280910.osboxes.4267.0
EXP_DIR/events.out.tfevents.1657280903.osboxes.4191.0
EXP_DIR/commit
EXP_DIR/commit/status.txt
EXP_DIR/commit/diff.txt
EXP_DIR/commit/hash.txt
EXP_DIR/2022-07-08T20_47_57.log
EXP_DIR/2022-07-08T15_43_28.log
EXP_DIR/events.out.tfevents.1657280976.osboxes.4513.0
EXP_DIR/2022-07-08T20_49_36.log
EXP_DIR/2022-07-08T20_48_30.log
(MAI) osboxes@osboxes:/Desktop/mixed_autonomy_intersections$

from mixed_autonomy_intersections.

TrinhTuanHung2021 avatar TrinhTuanHung2021 commented on May 11, 2024

I can not install Sumo version 1.1.0.
I tried to follow this instruction but I got errors so I used version 1.13

from mixed_autonomy_intersections.

ZhongxiaYan avatar ZhongxiaYan commented on May 11, 2024

I see, is there any other SUMO version that you can install? I would guess that the issue is that a vehicle somehow doesn't have a road_id, which shouldn't happen in SUMO 1.1.0.

So it looks like the program crashes after running for a bit? Does it crash when the first vehicle exits? If that's the case, then maybe in the new SUMO version, the vehicle's road_id gets set to '' when it exits, and you can add an if statement to handle that

from mixed_autonomy_intersections.

TrinhTuanHung2021 avatar TrinhTuanHung2021 commented on May 11, 2024

I see, is there any other SUMO version that you can install? I would guess that the issue is that a vehicle somehow doesn't have a road_id, which shouldn't happen in SUMO 1.1.0.

So it looks like the program crashes after running for a bit? Does it crash when the first vehicle exits? If that's the case, then maybe in the new SUMO version, the vehicle's road_id gets set to '' when it exits, and you can add an if statement to handle that

I only install Sumo version 1.8.0. It took me a lot of time to downgrade, but I can not install Sumo version 1.1.0 as your instructions.

After running about 17 seconds, the model had errors. Could you show me how to downgrade Sumo to 1.1.0?
image

from mixed_autonomy_intersections.

ZhongxiaYan avatar ZhongxiaYan commented on May 11, 2024

It's probably easier to fix the program rather than installing SUMO 1.1.0 at this point, since many of Mac's packages are now incompatible with 1.1.0. Again, I believe the issue is: "If that's the case, then maybe in the new SUMO version, the vehicle's road_id gets set to '' when it exits, and you can add an if statement to handle that." I'd suggest that you look into the issue from this perspective. SUMO 1.13.0 cannot be totally broken, because it runs for a while. It's probably just a small issue when vehicles exit. I won't be available for the next few days, but you can try this and let me know if it doesn't work

from mixed_autonomy_intersections.

TrinhTuanHung2021 avatar TrinhTuanHung2021 commented on May 11, 2024

Thank you very much. I will try to find a way to fix it

from mixed_autonomy_intersections.

TrinhTuanHung2021 avatar TrinhTuanHung2021 commented on May 11, 2024

Hello
I have just build Sumo with 1.1. And I create the new EXP_DIR folder with empty config.yaml
I run your model again with
python intersection.py EXP_DIR

Errors:

(PPO) osboxes@osboxes:~/Desktop/mixed_autonomy_intersections$ python intersection.py EXP_DIR

Traceback (most recent call last):
File "intersection.py", line 263, in
c = GridExp.from_args(globals(), locals())
File "/home/osboxes/Desktop/mixed_autonomy_intersections/u.py", line 800, in from_args
return cls(args.res, **kwargs).save()
File "/home/osboxes/Desktop/mixed_autonomy_intersections/exp.py", line 15, in init
super().init(res, *args, **kwargs)
File "/home/osboxes/Desktop/mixed_autonomy_intersections/u.py", line 739, in init
self.load()
File "/home/osboxes/Desktop/mixed_autonomy_intersections/u.py", line 763, in load
for k, v in self.path.load().items():
AttributeError: 'NoneType' object has no attribute 'items'

from mixed_autonomy_intersections.

TrinhTuanHung2021 avatar TrinhTuanHung2021 commented on May 11, 2024

I create the new config.yaml with hyperparameter
av_frac: 0.333
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

and i run your model again
python intersection.py EXP_DIR

Errors

flow_rate_v: 700

  • flow_rate_h: 700
    flow_rate_v: 1000
  • flow_rate_h: 1000
    flow_rate_v: 850
  • flow_rate_h: 850
    flow_rate_v: 1000
    )
    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 106, in reset
    while not self.reset_sumo():
    File "/home/osboxes/Desktop/mixed_autonomy_intersections/env.py", line 910, in reset_sumo
    kwargs = self.def_sumo()
    File "intersection.py", line 19, in def_sumo
    nodes = builder.add_nodes(
    File "/home/osboxes/Desktop/mixed_autonomy_intersections/env.py", line 225, in add_nodes
    ret[:] = nodes
    File "/home/osboxes/Desktop/mixed_autonomy_intersections/env.py", line 67, in getattr
    return self[k]
    File "/home/osboxes/Desktop/mixed_autonomy_intersections/env.py", line 54, in getitem
    return self._dict.getitem(k)
    KeyError: 'array_interface'

from mixed_autonomy_intersections.

ZhongxiaYan avatar ZhongxiaYan commented on May 11, 2024

I see, do you have the newest version of the code? I think I fixed the array_interface issue with this commit d2fbe88

from mixed_autonomy_intersections.

TrinhTuanHung2021 avatar TrinhTuanHung2021 commented on May 11, 2024

I see, do you have the newest version of the code? I think I fixed the array_interface issue with this commit d2fbe88

Thank you for your quick reply!

Maybe, I used the old version. I downloaded your code by using git clone
Could you please upload your code again?

from mixed_autonomy_intersections.

ZhongxiaYan avatar ZhongxiaYan commented on May 11, 2024

The newest code is already on GitHub, what commit are you on?

from mixed_autonomy_intersections.

TrinhTuanHung2021 avatar TrinhTuanHung2021 commented on May 11, 2024

The newest code is already on GitHub, what commit are you on?

I have just downloaded it again from GitHub and tried to train or evaluate the old result. But I still had the same error KeyError: '__array_interface__'

from mixed_autonomy_intersections.

ZhongxiaYan avatar ZhongxiaYan commented on May 11, 2024

Hm okay, can you try changing line env.py line 225 to

for i, node in enumerate(nodes):
    ret[i] = node

from mixed_autonomy_intersections.

TrinhTuanHung2021 avatar TrinhTuanHung2021 commented on May 11, 2024

Hm okay, can you try changing line env.py line 225 to

for i, node in enumerate(nodes):
    ret[i] = node

Thank you very much
I can run your model

Happy mid-autumn festival!

image

from mixed_autonomy_intersections.

ZhongxiaYan avatar ZhongxiaYan commented on May 11, 2024

You too!

from mixed_autonomy_intersections.

Related Issues (10)

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.