Essential Python skills for using transformers on Colab
Presented by Vanderbilt Data Science Institute data scientists:
- Dr. Jesse Spencer-Smith, Chief Data Scientist
- Dr. Charreau Bell, Senior Data Scientist
- Umang Chaudhry, Data Scientist
The objective of these workshops is to develop foundational skills in basic Python and pandas to faciliate work in Python primarily using HuggingFace, an extremely user-friendly API for transformers. This workshop will cover Python basics, but mainly focus on providing a blend of intuitive understanding of the tools along with fundamental Python skills for success with a user-friendly Python API.
The target audience for this workshop is truly beginners - participants who have little to no experience with programming in any language. Participants who have experience programming in other languages (e.g., R, C, C++, Java, etc) will learn the syntactical basics of programming in Python, although resources provided at the end of this readme may provide an accelerated method for learning Python syntax for those who are already familiar with programming in general.
Our objective is provide intuition and understanding around programming to democratize the use of user-friendly APIs such as HuggingFace, which does not require deep expertise in Python. We'll provide familiarity with some syntactical and structural elements of Python, and in this way, provide a solid foundation for you to independently grow additional programming skills upon.
In this course, you'll learn:
- Conceptualization of Python execution on Google Colab
- Basic Python data elements and data structures
- Functions and API interpretation
- Iteration and conditional execution
- Python syntax enabling understanding of HF API and tutorials
This course is focused on building a solid foundation for your success in building your models using HF. This course will not:
- Make you an expert on general Python programming
- Cover the details of object-oriented programming
To get the most out of this crash course in Python:
- Open Colab (workbook) notebooks and actively write code along with the instructor
- Actively participate in discussion
- Actively participate in breakout rooms
- Perform homework assignments before coming to class the next day
- Relax your mind and ask questions
- Let us know how you are doing using Fastcups at https://cups.fast.ai/vanderbilt-ai-summer!
Day 1
- Introduction to Python programming
- Introduction to Google Colab
- Python data elements
- Python data structures
Day 2
- Functions
- Functions and APIs
- Introduction to iteration
Day 3
- Iteration, cont'd
- Introduction to pandas
- Practice with interpreting HuggingFace course and API documentation
During these workshops, we'll have a number of breakout rooms where you'll work with others for discussion or develop code to solve an assignment. Please screenshot or paste your results in the following Google doc:
https://docs.google.com/document/d/12csRB2CAD8jXZQdK5eLz8p52g9KfdoLFo2qRFTFCRDI/edit?usp=sharing
During a live session, open https://cups.fast.ai/vanderbilt-ai-summer and click on the green, yellow, or red cup to indicate how you are doing!
Video recordings of these workshops can be found at the links below:
- Day 1: https://vanderbilt.zoom.us/rec/share/wxxql2gdDF9ca-8Q62jiIt9BMTXulQURZWAxNpPKdndYI-Cv5yU2Sn0vaSrmyFZ8.20ynJHLntsy0lG-2
- Day 2: https://vanderbilt.zoom.us/rec/share/o9puONghfrw0gdnAWMjO6Y2S2aQquwnEOfqoiSSY4taD9TiZ77pUMf0www130kk0.lx6EghoLA7RMh7aS
- Day 3: https://vanderbilt.zoom.us/rec/share/fU9qzNs-jXmdONVHIVJv43SOaNfYLwtrjSglPlMZXh4RU4gm6eCn-hpe-ZOSp220.4yskOCGVhrJ2m-9i?startTime=1652363795000
A number of examples will be left to the reader. Please complete these assignments prior to coming to the next day of the course. These homework assignments are designed to augment your understanding of Python, enable you to avoid common pitfalls of programming, resolve known areas of ambiguity that often arise in our new learners, and navigate and understand common errors that Python will throw.
- A Whirlwind Tour of Python, Jake VanderPlas
- Python Data Science Handbook, Jake VanderPlas
- Programming with Python, Software Carpentries
- Introduction to Python (Datacamp Youtube Playlist)
- Introduction to Python (freeCodeCamp.org)
- Fastcups https://cups.fast.ai/vanderbilt-ai-summer (to be used synchronously during class)