-
Notifications
You must be signed in to change notification settings - Fork 86
Fix MAX_STEPS = 0 error by add suggestion and exit #1195
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
|
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
@iizukak Thank you. |
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 left 1 question.
bae1274
to
b66c326
Compare
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.
RA
with small suggestions.
Thank you!
blueoil/cmd/train.py
Outdated
@@ -192,8 +193,14 @@ def start_training(config, profile_step): | |||
# Calculate max steps. The priority of config.MAX_EPOCHS is higher than config.MAX_STEPS. | |||
if "MAX_EPOCHS" in config: | |||
max_steps = int(train_dataset.num_per_epoch / config.BATCH_SIZE * config.MAX_EPOCHS) | |||
if max_steps < 1: | |||
print("The max_steps is less than 1, consider reduce BATCH_SIZE. exit.") |
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.
print("The max_steps is less than 1, consider reduce BATCH_SIZE. exit.") | |
print("The max_steps is less than 1, consider reduce BATCH_SIZE. exit.", file=sys.stderr) |
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.
Fixed
blueoil/cmd/train.py
Outdated
else: | ||
max_steps = config.MAX_STEPS | ||
if max_steps < 1: | ||
print("The max_steps is less than 1, consider set MAX_STEPS greater than 0. exit.") |
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.
print("The max_steps is less than 1, consider set MAX_STEPS greater than 0. exit.") | |
print("The max_steps is less than 1, consider set MAX_STEPS greater than 0. exit.", file=sys.stderr) |
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.
Fixed
@tfujiwar Thank you. I fixed your suggestion. I will merge this after it passed CI. |
/ready |
⏳Merge job is queued... |
What this patch does to fix the issue.
Change the minimum no. of
MAX_STEPS
to 1.Link to any relevant issues or pull requests.
#1194