Skip to content

Commit

Permalink
fix steps
Browse files Browse the repository at this point in the history
  • Loading branch information
misko committed Jul 17, 2024
1 parent 54ba338 commit bcf96cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spf/notebooks/simple_train_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,15 +519,15 @@ def params_for_ds(ds):

for epoch in range(args.epochs):
# breakpoint()
if step >= args.steps:
if args.steps >= 0 and step >= args.steps:
break

for _, batch_data in enumerate(
tqdm(train_dataloader)
): # , total=len(train_dataloader)):
# if step > 200:
# return
if step >= args.steps:
if args.steps >= 0 and step >= args.steps:
break
if torch.rand(1).item() < 0.02:
gc.collect()
Expand Down Expand Up @@ -731,7 +731,7 @@ def get_parser_filter():
"--steps",
type=int,
required=False,
default=None,
default=-1,
)
parser.add_argument(
"--depth",
Expand Down

0 comments on commit bcf96cf

Please sign in to comment.