Skip to content
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

Port diabetic_retinopathy task from OATML/bdl-benchmarks/diabetic_retninopathy* #175

Merged
merged 6 commits into from
Nov 19, 2020

Conversation

filangelos
Copy link
Collaborator

  • Add Kaggle's diabetic-retinopathy-detection dataset, with btgraham-300 preprocessing.
  • Add implementations for baselines.

@google-cla google-cla bot added the cla: yes label Sep 24, 2020
Copy link
Collaborator

@znado znado left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks fantastic :)


import tensorflow as tf
import uncertainty_baselines as ub
import utils # local file import
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to change this to from uncertainty_baselines.baselines.diabetic_retinopathy_detection import utils?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is uncertainty_baselines.baselines supposed to be available as a module? Other imports in the repo seem to only access the uncertainty_baselines subdirectory, and the ['datasets', 'models', 'optimizers', 'strategy_utils', 'utils'] modules

Comment on lines 37 to 42

# For datasets like UCI, the tf.data.Dataset returned by _read_examples will
# have elements that are Sequence[tf.Tensor], but for TFDS datasets they will be
# Dict[str, tf.Tensor].
PreProcessFn = Callable[
[Union[int, Sequence[tf.Tensor], Dict[str, tf.Tensor]]],
Dict[str, tf.Tensor]]
PreProcessFn = Callable[[Union[int, Sequence[tf.Tensor], Dict[str, tf.Tensor]]],
Dict[str, tf.Tensor]]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we revert these edits (maybe an auto-linter caused them?)

dataset = dataset.map(lambda d: (d['features'], d['labels'],
d['is_in_distribution']))
dataset = dataset.map(
lambda d: (d['features'], d['labels'], d['is_in_distribution']))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert

Comment on lines 101 to 102
json.dumps(hyperparameters, indent=2, sort_keys=True),
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we've generally avoided the hanging parentheses in the codebase, the other lint edits are fine (we haven't been super consistent on how to do indentations for vertical parameter/arg lists)

@google-cla
Copy link

google-cla bot commented Nov 18, 2020

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added cla: no and removed cla: yes labels Nov 18, 2020
@google-cla
Copy link

google-cla bot commented Nov 18, 2020

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@google-cla
Copy link

google-cla bot commented Nov 19, 2020

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@nband nband requested a review from znado November 19, 2020 15:51
@nband
Copy link
Collaborator

nband commented Nov 19, 2020

@googlebot I fixed it.

@google-cla
Copy link

google-cla bot commented Nov 19, 2020

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@nband
Copy link
Collaborator

nband commented Nov 19, 2020

@googlebot I consent.

@google-cla google-cla bot added cla: yes and removed cla: no labels Nov 19, 2020
@znado znado merged commit 5ef2a4d into master Nov 19, 2020
copybara-service bot pushed a commit that referenced this pull request Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants