-
Notifications
You must be signed in to change notification settings - Fork 6
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
148 add capability to run model using only model doi #180
base: master
Are you sure you want to change the base?
148 add capability to run model using only model doi #180
Conversation
Errors appear to be resultant of a timeout, which I am not sure how to address at this moment. |
@isaac-darling Ben recently made some changes (to either dev or main) that fixed these failing tests, could you pull those in so we can review your work? |
@@ -258,7 +258,7 @@ def run(self, name: str, inputs: Any, parameters: Optional[Dict[str, Any]] = Non | |||
"""Invoke a DLHub servable | |||
|
|||
Args: | |||
name: DLHub name of the servable of the form <user>/<servable_name> | |||
identifier: DOI of desired servable or DLHub name of the form <user>/<servable_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.
instead of replacing name, can you keep both? so the user has the option of supplying either the name
or the identifier
DOI
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.
as it is, identifier
can be a name or a DOI. only the name of the variable was changed. if that is a problem in and of itself, though, then of course I can add another input (although that would be a little clunky IMO because the user would have to use it by name)
|
||
if name not in self.fx_cache: | ||
# if identifier is a DOI | ||
if identifier.startswith("10.") or identifier.startswith("https://doi.org/"): |
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.
what if it's not a properly formatted DOI? Please throw an error to let the user know that their input was incorrect. Otherwise, this will probably hang or yield an uninformative error
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.
an error will be thrown if the DOI is not found (correct or not), which will at least tell them where to look. would you prefer a specific check for valid formatting?
This comment was marked as duplicate.
This comment was marked as duplicate.
1 similar comment
Pull Request Test Coverage Report for Build 3472256575
💛 - Coveralls |
Just an addition to the current run function to support DOIs as input. This seemed like the easiest solution to maintain, but of course could be switched to a stand-alone function.