Skip to content
This repository has been archived by the owner on Aug 15, 2019. It is now read-only.

Allow passthrough save handler to be async. #1200

Merged
merged 5 commits into from
Aug 3, 2018

Conversation

davidsoergel
Copy link
Member

@davidsoergel davidsoergel commented Aug 2, 2018

Allow the PassthroughSaver to accept an async saveHandler. This just works since IOHandler.save() was already async.

FEATURE


This change is Reviewable

@davidsoergel davidsoergel requested a review from caisq August 2, 2018 02:22
Copy link
Collaborator

@caisq caisq left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 approvals obtained (waiting on @davidsoergel and @caisq)


src/io/passthrough.ts, line 47 at r1 (raw file):


Hmm... the fact that it wasn't a Promise to begin with seems to be an oversight. For consistency going forward, I suggest changing it to only Promise. This should be fine because it is not reflected in our documentation on js.tensorflow.org yet. How does that sound?

Same for withSaveHandler below.

Copy link
Member Author

@davidsoergel davidsoergel left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 approvals obtained (waiting on @davidsoergel)


src/io/passthrough.ts, line 47 at r1 (raw file):

Previously, caisq (Shanqing Cai) wrote…

Hmm... the fact that it wasn't a Promise to begin with seems to be an oversight. For consistency going forward, I suggest changing it to only Promise. This should be fine because it is not reflected in our documentation on js.tensorflow.org yet. How does that sound?

Same for withSaveHandler below.

Yep, it was just an oversight, and I agree Promise-only is even better-- done.

@davidsoergel
Copy link
Member Author

davidsoergel commented Aug 2, 2018 via email

Copy link
Member Author

@davidsoergel davidsoergel left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 approvals obtained (waiting on @caisq)


src/io/passthrough.ts, line 47 at r1 (raw file):

Previously, davidsoergel (David Soergel) wrote…

Yep, it was just an oversight, and I agree Promise-only is even better-- done.

Done.

@dsmilkov
Copy link
Contributor

dsmilkov commented Aug 2, 2018

FYI, there are some minor build issues: https://travis-ci.org/tensorflow/tfjs-core/jobs/411427788#L489

Copy link
Member Author

@davidsoergel davidsoergel left a comment

Choose a reason for hiding this comment

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

Oops, done

Reviewable status: 0 of 1 approvals obtained (waiting on @caisq)

@davidsoergel davidsoergel merged commit 37789e7 into master Aug 3, 2018
@davidsoergel davidsoergel deleted the async-passthrough-save-handler branch August 3, 2018 15:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants