-
Notifications
You must be signed in to change notification settings - Fork 152
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
Format all code using black #534
Conversation
"name": "PYTHONUNBUFFERED", | ||
"value": "0" | ||
} | ||
{"name": "CLUSTER_ID", "value": f"{self.cluster_id}"}, |
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.
mark
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.
#fmt: off
#fmt: on
"topology": "toy.4p_ssdd_l0.0", | ||
"durations": 560 | ||
} | ||
env_conf = {"scenario": "cim", "topology": "toy.4p_ssdd_l0.0", "durations": 560} |
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.
mark
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.
Ignore this file in the command.
(state_shaping_conf["look_back"] + 1) * (state_shaping_conf["max_ports_downstream"] + 1) * len(port_attributes) | ||
+ len(vessel_attributes) | ||
) | ||
state_dim = (state_shaping_conf["look_back"] + 1) * (state_shaping_conf["max_ports_downstream"] + 1) * len( |
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.
mark
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.
Add related descriptions into wiki.
@@ -28,7 +30,7 @@ class VectorEnvUsage(Enum): | |||
|
|||
# Showcase: how to access information from snapshot list in vector env. | |||
if env0_dec: | |||
ss0 = env.snapshot_list["vessels"][env0_dec.tick:env0_dec.vessel_idx:"remaining_space"] | |||
ss0 = env.snapshot_list["vessels"][env0_dec.tick : env0_dec.vessel_idx : "remaining_space"] |
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.
Mark.
Compared with line 83 in examples/simulator/data_model.py
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.
See this doc for explanations. I personally buy it.
@@ -382,30 +368,29 @@ def load_images(self) -> None: | |||
for image_file_name, image_file_details in name_to_image_file_details_in_master.items(): | |||
if ( | |||
image_file_name not in name_to_image_file_details_in_node | |||
or name_to_image_file_details_in_node[image_file_name]["md5_checksum"] != | |||
image_file_details["md5_checksum"] | |||
or name_to_image_file_details_in_node[image_file_name]["md5_checksum"] |
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.
anyway to add ()
in this case?
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.
Shorten variable name.
|
||
with self._redis_controller.lock(f"lock:name_to_node_details:{self._local_node_details['name']}"): | ||
node_details = self._redis_controller.get_node_details(node_name=self._local_node_details["name"]) | ||
# Update with mapping in master. | ||
node_details["image_files"] = name_to_image_file_details_in_master | ||
self._redis_controller.set_node_details( | ||
node_name=self._local_node_details["name"], | ||
node_details=node_details | ||
node_name=self._local_node_details["name"], node_details=node_details |
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.
Add tailing ,
or not?
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.
See this
next_agent_state_dict={ | ||
agent_name: self.next_agent_state_dict[agent_name] | ||
} if self.next_agent_state_dict is not None and agent_name in self.next_agent_state_dict else {}, | ||
next_agent_state_dict={agent_name: self.next_agent_state_dict[agent_name]} |
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.
mark
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.
[TBD] Do not DINGGE.
PARKING = 0 | ||
SAILING = 1 | ||
|
||
|
||
class ActionType(Enum): | ||
"""Type of CIM action.""" | ||
LOAD = "load", | ||
|
||
LOAD = ("load",) |
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.
mark
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.
Fix this.
@@ -19,11 +19,9 @@ | |||
1011: "Peers Disconnection Error", | |||
1012: "MARO Send Again Error", | |||
1013: "Peers Rejoin Timeout", | |||
|
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.
mark
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.
Exclude this file.
@@ -26,7 +26,7 @@ def __init__(self, pipe: Connection, *args, **kwargs): | |||
def run(self): | |||
"""Initialize environment and process commands.""" | |||
metrics = None | |||
decision_event = None, | |||
decision_event = (None,) |
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.
(duplicated) mark
@@ -139,11 +139,20 @@ | |||
""" | |||
|
|||
|
|||
def generate_config(sku_num: int, supplier_num: int, warehouse_num: int, retailer_num: int, grid_width: int, |
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 file should be checked out from this branch
75, | ||
84, | ||
67, | ||
53, |
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.
mark ><
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.
Add exclude mark.
@@ -7,28 +7,22 @@ | |||
|
|||
|
|||
def start_admin(*args, **kwargs): | |||
print("""If got python module or file not found error, please run | |||
print( | |||
"""If got python module or file not found error, please run |
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.
mark
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.
Fix the source code.
Still some isort & flake8 issues. Seems like it is a conflict?
|
See this discussion |
Description
Linked issue(s)/Pull request(s)
Type of Change
Related Component
Has Been Tested
Needs Follow Up Actions
Checklist