-
Notifications
You must be signed in to change notification settings - Fork 86
Conversation
This PR needs Approvals as follows.
Please choose reviewers and requet reviews! Click to see how to approve each reviewsYou can approve this PR by triggered comments as follows.
See all trigger commentsPlease replace [Target] to review target
|
@@ -171,7 +171,7 @@ def _image_ids(self, data_type=None): | |||
return all_image_ids | |||
|
|||
image_ids = [ | |||
image_id for image_id, gt_boxes in zip(all_image_ids, all_gt_boxes_list) if len(gt_boxes) is not 0 | |||
image_id for image_id, gt_boxes in zip(all_image_ids, all_gt_boxes_list) if len(gt_boxes) != 0 |
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.
is not
is not allowed by newer flake8?
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.
no, errors F632 use ==/!= to compare str, bytes, and int literals
are appeared
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.
I see.
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.
is
compares identity (whether two reference points to the same object). ==
compares values.
there's no point using is
when comparing int values.
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.
Thank you for improving the code quality!
I left some small comments.
blueoil/cmd/output_event.py
Outdated
return [] | ||
|
||
|
||
def _column_name(event_accumulator, metrics_key): | ||
return "{}:{}".format(os.path.basename(event_accumulator.path), metrics_key) | ||
|
||
|
||
def output(tensorboard_dir, output_dir, metrics_keys, steps, output_file_base="metrics"): | ||
def output( | ||
tensorboard_dir, output_dir, metrics_keys, steps, output_file_base="metrics" |
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.
Could you fix the indentation to distinguish the arguments and the contents of the function?
def output(
tensorboard_dir, output_dir, metrics_keys, steps, output_file_base="metrics"):
or something like this.
def output(tensorboard_dir, output_dir, metrics_keys,
steps, output_file_base="metrics"):
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.
sorry these was formatted by the formatter I mis-configured. thank you!
blueoil/cmd/output_event.py
Outdated
""".format( | ||
output_csv, output_md | ||
) |
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.
You can write this in a single line.
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.
OA
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.
Readability Approval (reverse-shadowing)
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.
Readability Approval
@@ -171,7 +171,7 @@ def _image_ids(self, data_type=None): | |||
return all_image_ids | |||
|
|||
image_ids = [ | |||
image_id for image_id, gt_boxes in zip(all_image_ids, all_gt_boxes_list) if len(gt_boxes) is not 0 | |||
image_id for image_id, gt_boxes in zip(all_image_ids, all_gt_boxes_list) if len(gt_boxes) != 0 |
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.
is
compares identity (whether two reference points to the same object). ==
compares values.
there's no point using is
when comparing int values.
/ready |
⏳Merge job is queued... |
What this patch does to fix the issue.
Link to any relevant issues or pull requests.