-
Notifications
You must be signed in to change notification settings - Fork 138
Breaking down Layer.swift into a directory #102
Conversation
A few choices I took would be to create a separate core file for reshape, flatten, dense and other layers we might have. In the case of swift, we also have a layer protocol defined hence i decided to keep the layer.swift I know this review might take a while. |
Hi @Shashi456 ! Thanks for making this refactoring. I think this is absolutely the right thing to do. However to be fully transparent, we're right in the middle of landing our final fixes for the v0.3 release, and working to get a high quality, stable release. As a result, I think it probably makes most sense to revisit this in ~1.5-2 weeks after we have a solid v0.3 release shipped. Hope that helps provide a bit more context! All the best, |
@saeta should i close this pull till then? I don't mind the delay, I know v0.3 is launching. GOOD LUCK! hope it goes smoothly. |
Thanks! An earlier pending PR (#70) has the similar goal of breaking down |
@rxwei afaik, @eaplatanios told me he was working on creating an operators directory, and that i should work on breaking down on layers. @eaplatanios any comments? |
@Shashi456 @rxwei we can definitely bring that in as part of #70. I can port your changes over if you want and we can keep iterating there. |
Oh yes, that makes sense to me now! Sorry I had the wrong impression that #70 handled both layers and operators. Ok, let's merge this one for layers next week. Thanks @Shashi456 and @eaplatanios for coordinating! |
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.
Note: To be merged in the week of 4/22
Thanks for taking on this!
@rxwei have docker builds been turned off xD? |
Investigating! |
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.
LGTM if tests pass!
@rxwei I will delete the |
@rxwei I think this can be merged now. Docker hasn't been building for a while. |
We'll revisit this next week! |
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that 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 here in the pull request. Note to project maintainer: This is a terminal state, meaning the ℹ️ Googlers: Go here for more info. |
@rxwei can i start working on this again? |
Yes. Thanks! |
@dan-zheng @rxwei So I have reflected changes from the PR's before this, and i have built and test it there are no errors. So if you review this, I will delete the Layer.swift file and finalize this PR. It's been on hold for a while, and I think this is the right time to bring about this change. Edit: I tried testing on the nightly and a few errors popped up, most probably because these changes haven't been updated into it. But i will put the errors here. Please do comment if you have any thoughts on them.
|
@rxwei will you look at it this week? |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
@rxwei could you please look at this soon? |
Could you merge in the latest changes from master? I’ll look tonight. |
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.
Thanks @Shashi456. The changes look good overall. I have one more request other than some inline comments about formatting: I think that Layer.swift
should be placed directly under DeepLearning/
instead of being included in Layers
because 1) Layer.swift
does not define any concrete layer and 2) it may get confused with Core.swift
when they reside in the same directory.
@rxwei I will take care of the comments, once I address them, could you trigger a Kokoro build? |
Yes. |
@rxwei one final thing, probably not needed now, but do you want the layertest.swift to be broken down as well? I'm just saying that because ultimately we have a lot of different functionality within layers that needs to be tested. Or would you rather continue with what we have, and think about breaking it down later on? |
Yes, it should be broken into a few test files, but I'd suggest doing so only after the ongoing refactoring (e.g. #109). |
@rxwei I'm sorry for the minor indentation errors. I also just wanted to know, if there is any package like flake8 for python, which takes care of these indentations and style errors within swift? Something like that could make it convenient. |
Swift toolchains come with a |
@rxwei Feels good to have no build errors for once xD. |
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.
LGTM
After this gets merged, we need to update the revision of swift-apis that gets pulled into a toolchain build directory. Could you please start a PR to update https://github.com/apple/swift/blob/cdf3234b9b5f64b5202ba57d51d3b180aafc1b85/utils/update_checkout/update-checkout-config.json#L355 to the latest commit hash in swift-apis? |
@rxwei I will, but what does |
This PR got merged as 087618b, which has hash |
Fix #69