Last week, one of my customers gave me a feedback about my Joomla extension. It threw an error like “PDO: prepare0: Argument #1 (Squery) cannot be empty”. At the beginning, I thought it could be an PHP error. So I plan to update my local PHP version to repeat the error and fix it.
Read moreRetrieve the Model Files from Hugging Face Without Downloading Everything
In the previous post, I demonstrated how to obtain the complete file list of a dataset without downloading the actual files. In this post, I will illustrate how to retrieve the full file list of a model. The solution is nearly identical, but the code to write the URLs into a file differs slightly.
Read moreInstall Python 3.12 in CentOS 7 with SCL
In the previous post, I documented my attempt to install Python 3.12 on my CentOS 7, which ended in failure due to compilation errors. After an extensive search, I identified the issue as an outdated version of gcc, with CentOS 7 using gcc 4.8.5 while the latest version is gcc 13. Upgrading gcc to the latest version in CentOS proved challenging, but Software Collections (SCL) offered a potential solution. Given the considerable time investment required, I didn’t proceed with the SCL installation and experimentation. This post is motivated by that decision. I will explore SCL in this post, aiming to successfully run Python 3.12 with the assistance of SCL.
Read moreGet File List of Dataset from Huggingface without Downloading Data
Hugging Face is both a platform and a community focused on machine learning, particularly in the areas of natural language processing (NLP), computer vision, and audio processing. It is often referred to as the “GitHub of AI,” serving as the primary platform for hosting a vast majority of models and datasets in the AI community. It also furnishes tools that simplify the process of downloading models and datasets. With the Hugging Face Python libraries, achieving this task requires just a few lines of code. For instance, utilizing the huggingface_hub to load models and the datasets library to load datasets.
Read moreInstall Python 3.12 on CentOS 7
I’m currently immersed in learning AIGC, and Python is an essential tool for almost every aspect of it. In my attempt to set up Python on CentOS, I encountered installation challenges with both Python 3.12 and Python 3.11, leading to installation failures. Both of them gave me following error:
Python runtime state: initialized
Traceback (most recent call last):
File "/local/usr/local/src/python/Python-3.11.0/Lib/site.py", line 73, in <module>
import os
File "/local/usr/local/src/python/Python-3.11.0/Lib/os.py", line 29, in <module>
from _collections_abc import _check_methods
SystemError: <built-in function compile> returned NULL without setting an exception
make[1]: *** [Python/frozen_modules/abc.h] Error 1
make[1]: Leaving directory `/local/usr/local/src/python/Python-3.11.0'
make: *** [profile-opt] Error 2
Read more