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
Better folder structure and file names #625
Conversation
This looks great. Should we also adjust for the names of the examples and scenarios in this PR? |
@AboudyKreidieh Sure, I'll do that. Also the multiagent envs. |
Thanks @nathanlct ! I think it's better if we wait a bit and discuss in the group meeting. I have discussed with @Yasharzf some good ideas about the names. Maybe we can incorporate them into these. |
I am working on this. Please wait... :) |
Consider linking #600, continue talking about this next week |
…hing is uniform now
@AboudyKreidieh This is ready for your help now! |
Alright! All the checks are passed now. Can someone please review this? @AboudyKreidieh @eugenevinitsky? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine. I will approve once you merge in master and it looks good post the conflicts being resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM minus comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing I'd like to see in this PR before we merge it is some deprecation warnings for old features, given these refactoring changes can be really cumbersome for users who have some code that they have written themselves. Stuff like
from flow.envs.base_env import Env
Yielding
flow.envs.base_env.Env will be deprecated in a future release, please use flow.envs.base.Env instead
with the codebase also returning the correct object. I tried to do that for some objects in flow/core/params.py and in PR #698
also, this feature is for flow 0.5.0, so please hold off on merging |
@AboudyKreidieh this is a great idea. Could you just hint me on which files or which imports I need to add this? I think I need to add something like
Am I right? |
@ashkan-software that's right. and in cases when they might be imported, add deprecations to the init.py files, as I also did in that PR |
…tter-file-names
…tter-file-names
@ashkan-software can you look into the deprecation procedure? One valuable resource might be looking into how tensorflow approaches this. maybe look into tensorflow/python/util/deprecation_wrapper.py |
- added a deprecation function for classes and functions - renames deprecation_warning ->deprecated_attribute - added deprecation warnings for all old names of environments - updated version to 0.5.0.dev
I added a warning that looks like this:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the deprecation! This was supposed to be done by me, but I am sorry that I was super busy with my papers!
Anyways, the way you have done it is really smart!
Do we also need to make deprecated file (such as bottleneck_env
) for the following files?
- multiagent_env
- bay_bridge.base
- scenarios.grid
- scenarios.loop
Everything else looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Lets never do this again haha.
Pull request information
Description
This PR introduces major changes to file names and folder structures, as well as fo some class names, mainly for the following folders:
envs
multiagent_envs
(now is a subfolder underenvs
)scenarios
examples
cooperative_merge
(andloop_merge
)TODO:
multiagent_envs
intoenvs
--> AYsugiyama
,loop
,ring
->ring
) --> AY, NLThis is how the new
envs
folder looks like (some classes names have also been changed):This is how the new
scenarios
folder looks like (some classes names have also been changed):