-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix __len__
of IterableDistributedAnnDataCollectionDataset
#93
Conversation
@@ -336,9 +337,13 @@ def main(args: ArgsType = None) -> None: | |||
elif isinstance(args, list): | |||
model_name = args.pop(0) | |||
elif args is None: | |||
model_name = sys.argv.pop(1) | |||
args = sys.argv[1:].copy() | |||
model_name = args.pop(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.
here and in other conditions, please assert that args (or argv) is well-formed (e.g. args has at least one element if it is a list, args has "model_name"
key if it is a dict or Namespace, etc.) and produce an informative exception message. Also, check that model_name
is in REGISTERED_MODELS
and if not, produce another informative exception message (e.g. the provided model name "blah blah" is invalid. Valid options are: {list(REGISTERED_MODELS.keys())}).
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.
Great suggestion!
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.
Just a small thing.
The
len
of iterable dataset should return the number of batches per replica. This fixes the previous bug in the progress bar where it would show the total number of cell as the number of steps per epoch.Another bug that is fixed is running multiple devices with new
cellarium.ml.cli
module. Instead of changingsys.argv
this PR copies it and passes it to themodel_cli
asargs
.Also enabled multi devices testing for scripts (#44).