Retrospective of Google Summer of Code 2020 with TensorFlow

by Seungjae Ryan Lee

Swift for TensorFlow


Swift for TensorFlow (S4TF) is Google’s product to bring machine learning to Swift. Python has been the primary language for prototyping and developing machine learning models, with the two most popular machine learning libraries (TensorFlow and PyTorch) both being Python libraries. Python has a great benefit of being easy to use. However, native Python is very slow and relies on external libraries like NumPy for computation. Swift, on the other hand, is faster and safer, while still being easy to use.

This summer, I participated in Google Summer of Code to work with developers in the Swift for TensorFlow team. Google Summer of Code connects student developers with open source organizations by assigned mentors from the organizations to help students contribute to open-source software. I had the pleasure of being mentored by Brad Larson and Dan Zheng from the Swift for TensorFlow team.

In this post, I summarize my experience of Google Summer of code with the TensorFlow team. I discuss what went well, what could have gone better, and provide some advice to future participants.

Summary of Work

The project consisted of two parts: implementing Deep Q-Network (DQN) and implementing Proximal Policy Optimization (PPO). Both parts are located in the tensorflow/swift-models GitHub repository.

All the code related to Deep Q-Network (DQN) was merged via pull request PR#617. The code features a full implementation of Deep Q-Network tested on the CartPole-v0 OpenAI Gym environment, augmented with Double DQN, Combined Experience Replay, and soft target updates. To learn more about the PR, check this blog post.

Proximal Policy Optimization (PPO) was added to the repository via pull request PR#655. This code features PPO-Clip, the more popular of the two versions mentioned in the original paper. PPO is also tested on the CartPole-v0 environment. You can a full description of the PPO code in this blog post.


  1. Deep Q-Network (Original Paper)
  2. Proximal Policy Optimization (Original Paper)
  3. Final Presentation: Coming soon

The Good

The Google Summer of Code experience was a great way to be introduced to the Swift language. I never read or wrote a single line of Swift before the summer, although I had been very interested in learning it. GSoC was a great place to learn a new language for two reasons: by reading open-source code you gain a good understanding of the language and its strengths, and you have access to mentors who are experts of the language. For the same reason, it is a great opportunity to learn any new framework or tool used by the organization.

This project was also a great opportunity to experience professional code reviews. Code reviews are a vital component of a software developer’s job, but it is difficult to receive them as a student. Although I have given and received code reviews from previous internships, my mentors gave amazing code reviews and raised the bar for code quality. This is a valuable experience that any student planning to be a software developer would appreciate.

The Could-Be-Better

Although the summer experience was great, I found the end of the program a bit lackluster. Google Summer of Code can benefit from supporting students who wish to continue contributing after the end of the program. The GSoC Guide has a page on staying engaged with your community, but it only gives general advice. It would be helpful to get more specific advice on how one can continue to contribute, possibly by improving the project further or working on a new project.

Also, as a second-year participant, one thing I missed from this year’s Google Summer of Code is connecting with other participants. Although offline meetups were impossible due to COVID-19, online meetups would have been a nice addition to the program. In GSoC 2019, there was an optional survey where students could fill out their location and their interests. Then, the students could contact one another to contact one another. GSoC could systemize this approach and maintain chat channels for different interest groups to promote communication between participants.

For Prospective Students

Writing a Good Proposal

If you are considering applying to Google Summer of Code, I advise you to start early! Google Summer of Code provides an archive with a list of organizations that participated in the past years with all their past projects. Check the most recent year of GSoC and find all the organizations that pique your interest. (For me, it was TensorFlow, OpenMined, and NumFOCUS.) Read what the past projects have accomplished to gain a better understanding of what your project could be about.

Although you can contribute to the organization before Google Summer of Code, do not feel the pressure to do so: I was accepted in both 2019 and 2020 in projects that I have never contributed to. Instead, focus on writing a good proposal. A good proposal should be:

  • Feasible: Your project should be small enough to be completed over the summer.
  • Descriptive: Your proposal should clearly indicate how you will work on the project.
  • Relevant: Your project should help the open-source code in some way, and also help you in some way.

Your project needs to be feasible. The people who read your project proposal will know the open-source code better than you, and they have a good sense of how long a project might take. If your project seems impossible to complete, it is unlikely that they will accept it. When considering feasibility, consider how much relevant experience you have. You should be familiar with a good portion of the project.

A great way to gauge how feasible your project is by writing a detailed proposal. Once you decide on a project, create a weekly timeline of the summer with clear checkpoints. If you are having trouble dividing the project into weekly tasks, you should do more background research for your project. When you create a weekly timeline, always include one “buffer week” per month to account for unexpected circumstances. There are many reasons, both personal and external, that your project might be delayed. These buffer weeks will lessen your pressure against time and will allow you to write a more realistic proposal.

Finally, a great proposal must clearly indicate how your project is relevant to you and your organization. Remember that the goal of Google Summer of Code is to “bring more student developers into open source software development.” There should be a section in your proposal where you describe why you want to work on this project, and what you expect to learn from this experience. Likewise, the project should also benefit the organization in some way, so dedicate a section describing how your project will help the organization’s open-source code. Concrete details like expected deliverables are great.

Google Summer of Code also provides a guide to writing a good proposal. You should definitely take a look before starting your proposal.

After Acceptance

If your proposal has been accepted, congratulations! You will receive an email from your organization and your mentor(s). The mentors will be your most valuable resources for the summer. Try to contact them before the summer to discuss your project. They could provide thoughts about your proposal and point you to additional resources. This is also a good time to discuss the method and frequency of communication. Be clear on what you expect, and try to schedule meetings throughout the summer in advance if possible.

Once the summer starts, your effort is what drives the project. You should try your best to stay on your proposed timeline and provide weekly updates to your mentors. (Remember, the summer is ~10 weeks, so each week is 10% of your time!) However, if some unforeseen circumstances occur that may delay your progress, communicate the issue to your mentors as soon as possible. If the issue is related to the organization or the code, they might be able to help, and even if it is a personal issue, they won’t be left wondering why the project has been stagnant.

Once the summer is over, you will get a final evaluation from your mentors. Consider writing a blog post like this to help future GSoC students and share your project!

Good luck to all future Google Summer of Code participants! Feel free to leave any questions or feedback in the comments.


Google Summer of Code is definitely a worthwhile experience for students interested in software development. As a participant, you will gain valuable experience contributing to open-source code written by multiple contributors. You will also understand the importance of consistency in code and testing and learn how to write good issues and pull requests. Most importantly, you will be introduced to the world of open-source, where you can collaborate with numerous talented developers to develop amazing software and make a lasting impact.

Google Summer of Code 2020 Completion Certificate

Related Posts

comments powered by Disqus