摘要: 报错:AttributeError: module 'cv2.dnn' has no attribute 'DictValue' 修复方式:https://soulteary.com/2024/01/07/fix-opencv-dependency-errors-opencv-fixer.html 阅读全文
posted @ 2024-04-08 18:48 Shiyu_Huang 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 把服务器A的文件传给服务器B: 在服务器A上执行: rsync -avz --progress --stats -e ssh 服务器A上文件夹 服务器B用户名@服务器B的IP:服务器B上保存的地址(确保服务器B上保存的地址存在) 阅读全文
posted @ 2024-04-07 20:23 Shiyu_Huang 阅读(2) 评论(0) 推荐(0) 编辑
摘要: sinfo --states=idle 想进一步查看特定分区下的空闲节点: sinfo --states=idle -p your_partition_name 阅读全文
posted @ 2024-03-18 14:53 Shiyu_Huang 阅读(6) 评论(0) 推荐(0) 编辑
摘要: pytorch不能高于2.0, CUDA版本不能高于11.7 DS_BUILD_FUSED_ADAM=1 pip install deepspeed --no-build-isolation 阅读全文
posted @ 2023-11-29 19:41 Shiyu_Huang 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 如果直接安装不行:sudo apt-get install sshfs -y,在尝试使用手动安装 0. 参考网站:https://github.com/libfuse/sshfs 1. 下载sshfs源码:https://github.com/libfuse/sshfs/releases 2. 解压 阅读全文
posted @ 2023-08-21 21:17 Shiyu_Huang 阅读(236) 评论(0) 推荐(0) 编辑
摘要: import os from pathlib import Path from PyPDF2 import PdfReader, PdfWriter def extract_number_from_filename(path): # 从文件路径中提取文件名(不包括扩展名),然后再从文件名中提取前缀数 阅读全文
posted @ 2023-08-07 00:27 Shiyu_Huang 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 启动redis: mac: brew services start redis 查看redis启动信息: mac: brew services info redis 停止redis: brew services stop redis 阅读全文
posted @ 2023-08-01 11:36 Shiyu_Huang 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 通过执行chattr -i lib来解决 阅读全文
posted @ 2023-07-24 16:49 Shiyu_Huang 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 通过strace df来查看hang在哪个文件夹。 可以通过mount | grep 文件夹名 来查看挂载情况 最后根据实际情况对挂载位置进行修复或者卸载。 阅读全文
posted @ 2023-07-13 11:12 Shiyu_Huang 阅读(11) 评论(0) 推荐(0) 编辑
摘要: rm /var/lib/rpm/__db* rm /var/lib/rpm/.rpm.lock rm /var/lib/rpm/.dbenv.lock 阅读全文
posted @ 2023-07-13 10:39 Shiyu_Huang 阅读(41) 评论(0) 推荐(0) 编辑
摘要: sudo mv /var/lib/rpm/__db* /tmp; sudo rpm --rebuilddb; sudo yum clean all 阅读全文
posted @ 2023-07-13 10:13 Shiyu_Huang 阅读(7) 评论(0) 推荐(0) 编辑
摘要: vim /etc/profile 然后添加一下代码: RED='\033[0;31m' NONE='\033[0m' # reset colour attribues printf "${RED}This is in red ${NONE}\n" 阅读全文
posted @ 2023-06-20 13:45 Shiyu_Huang 阅读(14) 评论(0) 推荐(0) 编辑
摘要: sudo lshw -C display 阅读全文
posted @ 2023-06-13 15:00 Shiyu_Huang 阅读(203) 评论(0) 推荐(0) 编辑
摘要: kill -9 $(ps ax | grep gunicorn | awk '{print $1}') 阅读全文
posted @ 2023-06-13 14:23 Shiyu_Huang 阅读(42) 评论(0) 推荐(0) 编辑
摘要: https://zhuanlan.zhihu.com/p/629853761 阅读全文
posted @ 2023-05-16 15:49 Shiyu_Huang 阅读(58) 评论(0) 推荐(0) 编辑
摘要: git remote add upstream xxxxx 其中upstream可以修改为任何你觉得可以的名字 阅读全文
posted @ 2023-04-28 17:43 Shiyu_Huang 阅读(37) 评论(0) 推荐(0) 编辑
摘要: sudo yum install -y centos-release-scl sudo yum install -y devtoolset-7 如果使用zsh: scl enable devtoolset-7 zsh 如果使用bash: scl enable devtoolset-7 bash 阅读全文
posted @ 2023-04-18 21:32 Shiyu_Huang 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 1. 安装ffmpeg、gifsicle: brew install ffmpeg brew install gifsicle 2. 执行转换命令 ffmpeg -i in.mov -pix_fmt rgb8 output.gif && gifsicle -O3 output.gif -o outp 阅读全文
posted @ 2023-04-14 10:58 Shiyu_Huang 阅读(78) 评论(0) 推荐(0) 编辑
摘要: 1. 命令行传参, 条件语句 if [[ $1 = "happy" ]]; then echo "I'm happy" else echo "I'm not happy" fi 效果: 阅读全文
posted @ 2023-04-13 11:10 Shiyu_Huang 阅读(25) 评论(0) 推荐(0) 编辑
摘要: git stash git checkout -b new_branch git stash pop git add -A git commit -m "comments" git push 阅读全文
posted @ 2023-04-05 17:12 Shiyu_Huang 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 1. 更换163源 https://mirrors.163.com/.help/centos.html 2. 更换中科大源 https://mirrors.ustc.edu.cn/help/centos.html 3. 更换清华源 https://mirrors.tuna.tsinghua.edu. 阅读全文
posted @ 2023-04-04 17:56 Shiyu_Huang 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 1. 安装python (可安装任意版本) brew install python@3.9 2. 创建虚拟环境 cd ~ /opt/homebrew/bin/python3.9 -m venv ai3.9 3. 激活虚拟环境 source ~/ai3.9/bin/activate 4. 安装 pip 阅读全文
posted @ 2023-03-28 20:52 Shiyu_Huang 阅读(605) 评论(0) 推荐(0) 编辑
摘要: link: https://blog.csdn.net/weixin_38278993/article/details/100052961 阅读全文
posted @ 2023-03-28 17:08 Shiyu_Huang 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 参考: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html 阅读全文
posted @ 2023-03-22 13:57 Shiyu_Huang 阅读(61) 评论(0) 推荐(0) 编辑
摘要: 1. 下载cudnn: https://developer.nvidia.com/rdp/cudnn-download 2. 安装cudnn: https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#installcud 阅读全文
posted @ 2023-03-22 13:52 Shiyu_Huang 阅读(47) 评论(0) 推荐(0) 编辑
摘要: 查看Red Hat: cat /proc/version 查看CentOS: cat /etc/redhat-release 阅读全文
posted @ 2023-03-21 21:26 Shiyu_Huang 阅读(55) 评论(0) 推荐(0) 编辑
摘要: 解决办法: pip install setuptools==63.2.0 阅读全文
posted @ 2023-03-16 15:15 Shiyu_Huang 阅读(3955) 评论(0) 推荐(1) 编辑
摘要: 1. Fine-Tuning Language Models from Human Preferences reward model:774M参数量的GPT-2,先进行了有监督训练 训练loss: 其中r(x,y)代表reward model,x代表输入或者prompt,y代表输出或者reponse 阅读全文
posted @ 2023-03-10 14:51 Shiyu_Huang 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 模型名 参数量 模型大小(Pytorch) 训练数据 token长度 网络结构 训练硬件 训练时长 发布时间 来源 发布组织 GPT-2 small:124M medium:355M large:774M XL:1.5B small: 548MB medium:1.52GB large:3.25GB 阅读全文
posted @ 2023-03-06 15:00 Shiyu_Huang 阅读(1837) 评论(0) 推荐(0) 编辑
摘要: 以t5-base为例: 储存模型: from transformers import AutoModelForSeq2SeqLM if __name__ == '__main__': model_name = 't5-base' prefix = 'your_path' save_path = pr 阅读全文
posted @ 2023-03-03 21:22 Shiyu_Huang 阅读(403) 评论(0) 推荐(0) 编辑
摘要: 以t5-base为例 本地存储: from transformers import AutoTokenizer tokenizer = AutoTokenizer.from_pretrained('t5-base') tokenizer.save_pretrained('your_path') 本地 阅读全文
posted @ 2023-03-03 20:33 Shiyu_Huang 阅读(553) 评论(0) 推荐(0) 编辑
摘要: 有时候服务器访问不了外网,可以现在可以访问外网的机器上先把数据集给下好,然后传到对应服务器进行加载。 1. 首先下载并存储数据: import datasets dataset = datasets.load_dataset("dataset_name") dataset.save_to_disk( 阅读全文
posted @ 2023-03-03 17:14 Shiyu_Huang 阅读(3072) 评论(0) 推荐(0) 编辑
摘要: control + s进入搜索,然后输入要搜索的字符串,并按下回车键。 按下n查找下一个,按下shift+n查找上一个。 阅读全文
posted @ 2022-11-16 19:19 Shiyu_Huang 阅读(489) 评论(0) 推荐(0) 编辑
摘要: 修改vim /etc/apt/sources.list文件: 中科大源: deb https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse deb https://mirrors.ustc.edu.cn 阅读全文
posted @ 2022-11-09 16:31 Shiyu_Huang 阅读(1266) 评论(0) 推荐(0) 编辑
摘要: # 先删除用户的进程,再删除用户 killall -u 用户名 userdel -r -f 用户名 阅读全文
posted @ 2022-11-08 18:18 Shiyu_Huang 阅读(185) 评论(0) 推荐(0) 编辑
摘要: sudo vim /etc/vim/vimrc 在文件尾部,新建一行,输入:set nu 阅读全文
posted @ 2022-11-08 16:00 Shiyu_Huang 阅读(52) 评论(0) 推荐(0) 编辑
摘要: ln -s 已存在文件 未存在的文件 阅读全文
posted @ 2022-11-08 15:18 Shiyu_Huang 阅读(24) 评论(0) 推荐(0) 编辑
摘要: from collections import namedtuple Player = namedtuple('Player', ['name', 'number'])p1 = Player('Jordan', 23) print(p1.name) # get Jordan 阅读全文
posted @ 2022-11-02 16:43 Shiyu_Huang 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 查看vim /lib/systemd/system/docker.service 如果ExecStart=/usr/bin/dockerd-current则使用: 参考: https://blog.csdn.net/qq_35921773/article/details/125498358 如果Ex 阅读全文
posted @ 2022-10-15 13:20 Shiyu_Huang 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 1. 服务器上执行whereis sftp-server,找到sftp-server位置 2. 服务器上打开sshd_config: sudo vi /etc/ssh/sshd_config 把Subsystem这行替换成 Subsystem sftp 找到的sftp-server位置 3. 服务器 阅读全文
posted @ 2022-10-08 14:52 Shiyu_Huang 阅读(265) 评论(0) 推荐(0) 编辑