PyCon Hong Kong 2024

PyCon Hong Kong 2024

To see our schedule with full functionality, like timezone conversion and personal scheduling, please enable JavaScript and go here.
09:15
09:15
45min
Registration
LT9
10:00
10:00
60min
Live stream (TBC)
LT7
10:00
10min
Opening Remarks by PyCon HK
Scotty Kwok

Opening remarks and announcement

LT9
10:10
10:10
10min
Opening Remarks by CityU HK
Dr. Ray Cheung

Opening Speech by College of Computing CityU HK

LT9
10:20
10:20
5min
Group Photo
LT9
10:25
10:25
5min
[Keynote] PyCon Hong Kong - the Story
Sammy Fung

[Pre-recorded Video] Passionate volunteer start the PyCon HK in Hong Kong in 2015, which turns the local python community to its next decade. In this short video, Sammy tells the story of PyCon HK and how did he involve it.

Perspectives
LT9
10:30
10:30
30min
[Sponsored Keynote] Large Language Models Optimization with Python
Haowen Huang

This talk will cover various aspects of optimizing Large Language Models (LLMs) with Python, including quick start, availability optimization, and throughput optimization. Explore cutting-edge techniques involved in areas such as model compilation, model compression, model inference batching, distributed training, and Large Model Inference (LMI) containers. Discover practical examples of optimizing some open-source models using techniques like LMI containers, Low-Rank Adaptation (LoRA), Fully Sharded Data Parallelism (FSDP), Paged Attention, Rolling Batch, and more.

LLM
LT9
11:00
11:00
10min
10-min break
LT9
11:00
10min
10-min break
LT8
11:00
10min
10-min break
LT7
11:10
11:10
30min
Pydantic Logfire: Empowering Python Observability
HEMANGI

Pydantic Logfire is an advanced observability platform tailored for Python applications, integrating seamlessly with the popular Pydantic library. Built on the principles of simplicity and power, Pydantic Logfire offers deep insights into application behavior through Python-centric telemetry, structured logging, and powerful SQL querying capabilities. Leveraging OpenTelemetry for comprehensive instrumentation, it ensures Python developers can efficiently monitor, debug, and optimize their codebases. From small scripts to enterprise deployments, Pydantic Logfire transforms raw data into actionable insights, simplifying the observability journey for Python developers.

Libraries / Tools
LT7
11:10
15min
Sign and verify Python package with Sigstore keyless signing
Frankie Ng

Organizations are challenged in ensuring that the container image they are deploying is exactly what was produced in development and nothing has changed before it runs in production. Cryptographic signing of container images helps to verify the integrity of the image and makes sure it has not been tampered since its creation. Verification of the image signature also confirms that the expected software creator, whose identity was certified at the moment of signing, published the container image in their possession.
In this presentation, I will use an open source project “Sigstore”: a cryptographic signature tool that is for improving software supply chain security. The Sigstore framework empowers software developers and consumers to securely sign and verify software artifacts. Signatures are generated with ephemeral signing keys so there’s no need to manage keys. Signing events are recorded in a tamper-resistant public log so software developers can audit signing events.

Libraries / Tools
LT9
11:10
30min
Taiwan LLM: Bridging the Linguistic Divide with a Culturally Aligned Language Model
Yenting Lin

[ONLINE presentation] This talk introduces TAIWAN-LLM, a pioneering Large Language Model specifically designed for Traditional Chinese as used in Taiwan. We'll discuss how TAIWAN-LLM addresses the underrepresentation of Traditional Chinese in existing language models, bridging the linguistic and cultural divide. The presentation will cover our approach to developing a culturally aligned model, including the use of a comprehensive Taiwanese corpus, instruction fine-tuning, and real user feedback incorporation. We'll share evaluation results demonstrating TAIWAN-LLM's superior performance in understanding and generating Traditional Chinese text compared to existing models.

LLM
LT8
11:25
11:25
15min
Network Automation for Improved Efficiency using Ansible and Python
TIMOTHY LAM

This presentation highlights how network automation with Python and Ansible enhances management efficiency. It addresses the challenges of traditional manual network tasks, which are time-consuming, error-prone, and hard to scale. By showcasing Python's and Ansible's capabilities, the presentation demonstrates how automation leads to improved efficiency, reduced errors, and faster deployments, allowing network administrators to focus on critical tasks and ensuring a more reliable and secure network environment.

DevOps
LT9
11:40
11:40
10min
10-min break
LT9
11:40
10min
10-min break
LT8
11:40
10min
10-min break
LT7
11:50
11:50
30min
Build AI-powered RAG application with MySQL9.0
Ryan Kuan

In this session, we will show you how you can quickly build an AI-powered RAG application with MySQL9.0 and python:
* Build your own document repository in vector store in MySQL 9.0
* Integrate LLM in your application to process questions
* Generate context-aware answers from your vector store

LLM
LT9
11:50
30min
Hackman: IoT & membership platform on Raspberry Pi & Nix for Hong Kong's first Hackerspace
Nigel Choi

We build everything ourselves at Dim Sum Labs, Hong Kong's first Hackerspace. This includes Hackman, the IoT system that manages our membership and controls the space's door, lights, appliances, and electricity usage. Hackman is written in Python and runs entirely on a Raspberry Pi 5. We will bring a replica of Hackman and some attachments (we can't bring the door, though) and give a live demo. You will hear about how we use Nix, DevOps/GitOps, a staging Raspberry Pi, and software engineering practices that make it reliable. We will show how it can be easily extended using Redis.

DevOps
LT8
11:50
30min
High Throughput Python
Dr. Adrian Tam

Python is infamous for its slowless and the GIL problem. In Python 3.4, asyncio was introduced to allow non-blocking I/O, and concurrent.futures was introduced for an easier syntax to write parallel code. But still, Python is not super fast. In this talk, I will show case 10+ ways of generating data in parallel in Python and compare their performance. The unfortunate conclusion is that nothing is always the best, even with the free-threaded Python of 3.13, the silver bullet does not exist.

Performance
LT7
12:20
12:20
5min
5-min break
LT9
12:20
5min
5-min break
LT8
12:20
5min
5-min break
LT7
12:25
12:25
30min
Local 知識擂台LLM大格鬥
Winnie Yeung, Marcus Lau

[ONLINE presentation] In the LLM world, every one is using GPT-4 as the golden standard. Are there cases where smaller language model can outperform GPT4 in terms of its richness in language expression and wealth of local knowledge? We want to present our discovery work on evaluating a suite of LLMs in the area of Cantonese skills, Hong Kong local geography and social knowledge.

We will demo our open-sourced platform for others to play with the Cantonese, Hong Kong-specific chatbot arena as well. 一齊黎挑機啦!

LLM
LT7
12:25
15min
Two roads diverged: the gap between web development and data science in Python
Chan Sau Yee

While being a Data Scientist was once touted the sexiest job of the 21st century, how different is the life of a Python Web Developer? The author, who has served in both roles, shares her take on the difference (or lack thereof) between the two professions.

Perspectives
LT9
12:25
30min
如果HK Python User Group唔壯大,錦鯉就大鑊了!
Calvin Tsang

作為一個多年組織 OSC /PYCON的中年大叔,想分享一下如何經營本地社區,再分享外地的經驗,希望更多人可以參與到,讓我能有機會變回一個參加者身份。

Perspectives
LT8
12:40
12:40
15min
End-to-end GPU Acceleration for scikit-learn and XGBoost
Jiaming Yuan

With the ever-growing data size and the increasing complexity of data science workflows, high-performance computing becomes crucial for data scientists to tackle real-world problems. Attendees will learn to leverage RAPIDS projects with GPUs to accelerate and scale up scikit-learn and XGBoost model training workflows.

Performance
LT9
12:55
12:55
65min
Lunch break 🍚
LT9
12:55
65min
Lunch break 🍚
LT8
12:55
65min
Lunch break 🍚
LT7
14:00
14:00
30min
How do I debug my PySpark workloads?
Hyukjin Kwon, Allison Wang

PySpark is widely adopted for data analysis in distributed computing environments. It supports not only the standard DataFrame API but also Python User Defined Functions (UDFs), Python Data Sources, Python UDTFs, and more. However, debugging and profiling applications in such distributed environments are often challenging - you can't simply add a breakpoint and inspect variables in your IDE.

In this presentation, I will demonstrate effective methods for debugging and profiling PySpark applications using existing tools. These include profiling tools that utilize cProfile, a standard Python profiler, along with various tricks and best practices for monitoring and debugging PySpark applications.

Libraries / Tools
LT7
14:00
30min
Numbast: Bridging the gap between CUDA C++ and Python
Michael Wang
  • Numba is a popular JIT compiler that translates Python code into optimized machine code for various hardware targets, and Numba-CUDA supports compilation of Python code for execution on NVIDIA devices. Whilst Numba-CUDA provides many basic accelerated programming function blocks out of the box, manually creating bindings for a CUDA device library is still laborious.
  • Numbast is an auto device binding generation tool created by NVIDIA. Numbast provides an end-to-end binding generation mechanism that quickly bridges the gap between the CUDA ecosystem and Python CUDA.
  • In this talk, attendees will learn about recent progress of accelerated computing in Python with Numba-CUDA, the internal mechanisms of Numbast, and get hands-on experience of crafting CUDA kernels in Numba-CUDA, as well as creating bindings with Numbast.
  • Additionally, we will provide an insight into how Numba is used across RAPIDS, Nvidia’s accelerated computing solution that focuses on making accelerated computing more accessible to the general python community. Time permitting, we will also introduce how user-defined functions (UDF) are used in cudf.pandas.
Performance
LT8
14:00
30min
Python to Deploy Enterprise-Grade Delta Lake on AWS
Alan, Ka Hei Ng, Jacky Kwok

This session explores how enterprises can build robust transactional data lakes using the open-source Delta Lake format and Python tools. The presenters will first discuss the exponential growth in enterprise data volumes and how data lakes provide a compelling solution to cost-effectively retain and extract value from vast amounts of structured and unstructured data.
The session outlines key limitations of traditional data lakes, such as the lack of database-like capabilities for efficient updates, maintaining performance at scale, and ensuring data consistency.
To address these challenges, the session will showcase how the Delta Lake format, along with complementary Python tools like PySpark and Delta-rs, can be leveraged on AWS to build highly optimized and manageable data lake architectures. The presenters will dive into two real-world use cases, covering both large-scale batch processing and smaller-scale data workloads, highlighting best practices and architectural patterns for Python developers.

Libraries / Tools
LT9
14:30
14:30
10min
10-min break
LT9
14:30
10min
10-min break
LT8
14:30
10min
10-min break
LT7
14:40
14:40
30min
Autonomous AI Agents for Dummies
Tarun Jain

AI Agentic workflows will drive massive AI progress this year. This is what Professor Andrew Ng said about the rise of agents. With the growing popularity of large language models, Agents are what everyone is talking about. In simple terms, Agents can be defined as LLMs with the ability to self-reason and plan, just like humans. In my talk, I will focus on how to build an Autonomous Agentic workflow and the components required. Additionally, I will cover the concepts of planning and reasoning Agentic prompting such as REACT, LATS and so on to motivate the audience to stay updated with the Agentic world.

LLM
LT9
14:40
30min
Operate with Confidence -- OpenTelemetry in Python
Alex Au

In this era of microservices, the '3 Pillars of System Observability', a.k.a. logging, metrics monitoring and traffic tracing are pivotal in giving developers quick feedbacks on the performance and behaviour of their application. With good observability practices, not only developers can understand the bottleneck and stability of their app, they can even be benefited from faster iteration cycle due to reliable feedback loops.

In this talk, the usage of OpenTelemetry package, a well-known open-source Observability stack, in Python will be addressed. OpenTelemetry is a vendor- and tool-agnostic, Observability stack integrating with a broad variety of Observability backends, including open source tools like Jaeger and Prometheus, as well as commercial offerings.

With the introduction of usage of OpenTelemetry in Python, it is hoped that users have more understanding on the '3 Pillars of System Observability', actively and confidently monitor their Python workloads, and define a suitable and meaningful Service Level Objective (SLO) for their program.

Libraries / Tools
LT8
14:40
30min
Spark-less local data stack in 2024
Nok Lam Chan

In 2024, the Composable Data Stack is getting more mature and it's only getting easier to mix tools for different use cases. The capabilities of local data stacks continue to grow with advancements in tools like Polars and DuckDB, the necessity of using Spark for end users is increasingly being questioned.

Traditionally, Spark has been regarded as the most mature and reliable data processing framework, making it a default choice for many. However, the landscape has evolved significantly by 2024, with numerous libraries now offering more efficient and versatile local data processing solutions.

This presentation will explore these new alternatives, focusing on:

SQLFrame: A framework providing a Spark DataFrame API that can interface with different computing engines.
Ibis: A unified API that seamlessly integrates dataframes and databases, eliminating the need to commit to a single engine.
SQLGlot: A powerful tool for transpiling SQL queries between different dialects, enhancing compatibility and flexibility.
Our goal is not to declare the obsolescence of Spark but to highlight efficient alternatives that may be better suited for specific environments and use cases. Attendees will gain insights into how these modern tools can be leveraged to optimize their local data processing workflows, potentially reducing the need for Spark in certain scenarios.

Libraries / Tools
LT7
15:10
15:10
5min
5-min break
LT9
15:10
5min
5-min break
LT8
15:10
5min
5-min break
LT7
15:15
15:15
15min
Accelerating Python's performance with C and Cython
Leo Chen

Although Python is popular and known for rapid development and great ecosystem, performance may often be an issue when running certain types of tasks. For example, we ran into performance issues when we had to parse and chunk CSV files of arbitrary sizes.

Utilising C for core functions and a wrapper with Cython, we were able to quickly build a lightweight Python module that improved the performance of our use case!

Through this talk, we'd demonstrate how tools like Cython could make Python even more powerful.

Performance
LT9
15:15
15min
Leveraging Multi-Models and Open WebUI to Mimic ChatGPT with Data Security Considerations
Dr. Chung Ng

In an era where data security and control are paramount, leveraging local and in-house AI solutions has become increasingly significant. This presentation will explore how to use Open WebUI to build on-device GPT models or in-house server-based GPT systems, offering robust alternatives to cloud-based AI solutions like Copilot, ChatGPT-4o. The focus will be on ensuring data remains local or within company control, addressing key security considerations.

LLM
LT8
15:15
15min
Power PyTorch Training with Centralized AI Data Lake and Advanced Data Selection Techniques
Yang Cen

AI data is often stored in separate silos: databases, parquets/ORC files in cloud storage, and embeddings in vector databases, creating complexities in data management.

To address the above issue, the Lance columnar format is specifically designed for multimodal AI. It has unique combination of capabilities including fast scan and point query, storing large blobs inline, and zero-cost schema evolutions, enabling the creation of a centralized, massive-scale, all-in-one data lake that can store all kinds of AI data—structured, unstructured, and embeddings—in one cohesive dataset.

Lance-Pytorch Dataset utilizes Lance’s embedded query engine. Written in Rust, it can quickly identify the most relevant and useful data for training without ever materializing such datasets using external systems. PyTorch training can leverage this unified data lake to seamlessly access and train from all data types, facilitating the creation of high-quality models.

This approach allows organizations to train or fine-tune foundation models that encompass comprehensive organizational knowledge, and significantly accelerates the training process while maintaining model quality.

Libraries / Tools
LT7
15:30
15:30
30min
30-min break ☕︎
LT9
15:30
30min
30-min break ☕︎
LT8
15:30
30min
30-min break ☕︎
LT7
16:00
16:00
30min
Enhancing Web Image Accessibility for Visually Impaired Individuals with Gemini Pro Vision and Google Cloud Platform
Cyrus Wong, Markus Tsang, YIU Kelvin

Background

The inability of visually impaired individuals access image information due to the lack of adherence to W3C web accessibility initiatives by websites. Currently, about 60% of websites lack meaningful alternate text for their images. Moreover, it is unfeasible to retroactively add descriptive text to all existing websites manually.

LLM
LT7
16:00
30min
How to organize and deploy your Python applications with Docker
Cristiano Pierandrei

Deploying Python applications can be difficult. In this introductory talk, I will share what I learned to help you avoid common problems.
We will learn how to set up your Python projects to make them easy to deploy in Docker containers, from simple scripts to medium-sized projects made of several packages.
We will also look at how to use Docker Compose and understand its strengths and limits.
By the end of this talk, you will know how to deploy your Python applications using Docker easily and effectively.

DevOps
LT9
16:00
30min
Time to Skip Tedious Steps - Spare Efforts with PyTorch Lightning
Henry, Wai Yin Wong

With the rapid advancement in deep learning, models become super large and consume significant resources, making efficiency and simplicity more critical than ever. In this talk, we introduce PyTorch Lightning, a deep learning framework that emerges as a powerful tool that streamlines the process of building, training, and scaling models, allowing researchers and practitioners to focus on what truly matters: innovation.

We will begin with an overview of PyTorch Lightning, discussing the key benefits it offers over traditional PyTorch. We will explore how PyTorch Lightning abstracts away the boilerplate code associated with model training, making it easier to implement and experiment with complex models. Then, we walk through the process of training a ResNet in PyTorch Lightning for image classification task and explore some advanced features in PyTorch Lightning.

For those interested in revisiting the content from the talk, feel free to check out the links below:
- GitHub Code Demo: github/wyhwong/PyConHK2024-PyTorch-Lightning
- Slides: OneDrive

Libraries / Tools
LT8
16:30
16:30
10min
10-min break
LT9
16:30
10min
10-min break
LT8
16:30
10min
10-min break
LT7
16:40
16:40
30min
Algorithmic Artistry: Musical Ideas for Pythonists
Chuck-jee Chau

The almighty Python language has earned its widespread popularity. Can we build a music machine with Python that creates captivating music, with mind-blowing sounds and instruments we haven't heard before? There are numerous Python libraries for music manipulation and generation. In this talk, we will explore interactions ranging from sound synthesis to algorithmic music making, catering to both coding musicians and musical coders, all within the Python ecosystem!
(Materials are available as a Colab Notebook: https://tinyurl.com/pycon24-music )

Perspectives
LT9
16:40
30min
Simplifying Python Web App Operations: Automating K8s Ops with Open Source
YangSoo Yoon

After creating a great web app using Python such as with flask, the next hurdle to production is how to make it available to users and operate it. And not just your app, but also ingress, the database, observability and the list goes on. We will go through your options for simplifying the operations of your web app using open source tooling. This will include using k8s directly, helm charts, IaaC using pulumi and new tooling developed by Canonical using juju. By the end of the talk you will have seen the benefits and drawbacks of each which will help you make an informed decision on which tool best suits your needs!

DevOps
LT8
17:10
17:10
10min
10-min break
LT9
17:10
10min
10-min break
LT8
17:10
10min
10-min break
LT7
17:20
17:20
5min
Data Validation in Python
Meixin Wang

For data engineers to set up reliable data pipelines, it is crucial to conduct validations at each step to ensure the high quality of the data. Great Expectations (GX) is an open source framework that provides an intuitive way -- Expectations -- to define and manage data quality.
This lighting talk will explore how to leverage Great Expectations to automate data quality checks and increase transparency in your data pipeline. To demonstrate GX's features, we will explore two examples of Expectations (basic and conditional).

Lightning ⚡
LT9
17:25
17:25
5min
Async all the way: FastAPI and the ASGI era
Taemin Ha

In the rapidly-evolving world of Python web development, the emergence of frameworks like FastAPI has changed how software engineers build highly-performant, asynchronous applications in Python. This lightning talk will explore how the FastAPI framework makes use of the power of an Asynchronous Server Gateway Interface (ASGI) web server to enable concurrent request handling, in contrast with the traditional Web Server Gateway Interface (WSGI) approach.

Through a live demonstration, the differences between WSGI and ASGI applications will be illustrated. Synchronous applications can be blocked by long-running tasks such as I/O operations, whereas asynchronous web servers handle requests concurrently even while the thread is occupied with different tasks.

By showcasing how FastAPI's design allows for concurrent processing of multiple requests without blocking, this talk will highlight the significant performance benefits and scalability advantages provided by ASGI-powered frameworks.

Lightning ⚡
LT9
17:30
17:30
5min
Creative Problem Solving with Graphs
Xiao Ying

Graphs and networks are fundamental data structures that are rapidly growing in popularity with practicing engineers due to their use of simple elements like nodes and edges. Many real-world problems can be translated into graph problems, and we can use Python libraries, such as NetworkX, for creative problem-solving.

Take a day-to-day example as simple as arranging desks in an office. Is there an optimal way to arrange people by organizational structure and/or proximity to their informal social network in order to facilitate a conducive workplace environment that also takes into account noise levels for at-desk meetings, etc.? If we were to model this in a graph data structure with nodes being people with different properties, and edges describing relationships, this will enable us to see things in different perspectives and to come up with some innovative solutions to this problem.

Lightning ⚡
LT9
17:35
17:35
5min
Interactive game with Mediapipe
Judy Wong

我哋時不時喺商場啲攤位見到啲互動遊戲-今次會講吓Python喺呢度點樣起作用
Everyone loves gaming - especially those with movements. In this we share how we made our interactive game and other "teamlab" ideas with Python tools such as Mediapipe.

Lightning ⚡
LT9
17:40
17:40
5min
How many iPhones does it take to ship a new Python version?
Chan Sau Yee

For people new to Python, it can be hard to grasp the difference between, say, Python 3.5 and Python 3.6. This lightning talk aims to conceptualise the effort it requires to ship a new Python version, by comparing that to the development of iPhone models.

Lightning ⚡
LT9
17:45
17:45
5min
匯豐咩價位? / How much is HSBC now?
Dr. Adrian Tam

Using Playwright, you can write a program to harvest the stock price of HSBC in 5 minutes' work.

Lightning ⚡
LT9
17:50
17:50
5min
Group Photos
LT9
17:55
17:55
15min
Closing remarks
Scotty Kwok

Closing remarks and announcements

LT9
18:30
18:30
240min
Dinner 品香樓中西風味餐廳 🥳🍺 🍖🍤🍗
LT9
No sessions on Sunday, Nov. 17, 2024.