python功能模块详述1002python功能模块详述_Python tq1包_程序模块 - PyPI - Python中文网...

tq—简单的命令行作业管理器

68747470733a2f2f70797069702e696e2f76657273696f6e2f7471312f62616467652e737667

74716c73312e706e67

英文描述:

TQ(任务队列)是一个简单的命令行作业管理器。原则上TQ是

一个非常灵活和智能的ATD(8),它可以安排一系列的工作

有效的方法。

(1)默认情况下,TQ将按FIFO顺序逐个运行作业。

(2)优先级高的作业将提前处理。

(3)给定估计的占用系数,可以在

尽量平行。

作业队列的管理基于sqlite3数据库,其中

存储有关每个作业的信息,包括开始和结束时间。

中材(中文说明):

一、检测方法。

自动驾驶仪,自动驾驶仪

全面质量管理

预测

英国内政部

英国

功能tq将您的命令保存在队列中,并逐个执行它们。

支持优先级属性。调度程序将首先执行高优先级命令行。

支持资源占用系数。调度程序将尽可能长时间并行执行命令行。

程序输出将重定向到添加任务的目录下的tq.out和tq.err。

队列保存在sqlite3中。即使发生断电也不会丢失任何数据。

无依赖性,重量轻。这个工具只依赖于python3本身。(支持sqlite3)

安装

pypi上提供了这些工具。只需发出以下命令:pip3 install tq1

注意,python3 >= 3.6是必需的,因为使用了新的语言功能

在密码里。没有计划支持较低版本的python。

真实生活示例

TQ可用于以异步方式处理某些命令。例如$ tq -- git push # Doesn't block. Have it done in async.

$ vim mycode.py

TQ可用于管理一系列计算实验,例如

深度学习实验,例如$ tq r5 -- caffe train -solver net1forfun.prototxt

$ tq r5 -- caffe train -solver net2forfun.prototxt

$ tq 1 5 -- python3 train.py --lr 1e-2

$ tq 1 5 -- python3 train.py --lr 1e-3

$ tq 1 5 -- python3 train.py --lr 1e-4

$ tq 1 5 -- python3 train.py --lr 1e-5

$ tq p10 -- python3 important_train.py

一个人只要把许多计算任务放在队列中,TQ就会很聪明

根据给定的优先级和资源安排这些实验

占用参数。

用法Usage: tq ACTION [COMMAND_ARGS]

tq [P R] -- TASK

Available Actions:

start start TQ's daemon

stop stop TQ's daemon

log dump log to screen

ls fancy print of task queue

db print database content to screen

rm remove task with specified id, see ID with tq ls

clean remove finished tasks from queue

purge remove log file and sqlite3 db file

Apending Task:

-- TASK append TASK to the queue

p

-- TASK append TASK with priority P to the queue

r -- TASK append TASK with resource occupancy R to the queue

P R -- TASK append TASK with priority P and estimated occupancy R

int P default 0 range [INT_MIN, INT_MAX], large=important

int R detault 10 range [1, 10], large=consuming

用法示例0. Daemon: to start or stop the daemon

tq start

tq stop

1. Serial: the two given tasks should be executed one by one

tq -- sleep 100

tq -- sleep 100

2. Parallel: each task occupies 40% of resource.

In this example two tasks will be active at the same time.

tq r4 -- sleep 100

tq r4 -- sleep 100

tq r4 -- sleep 100

3. Priority: break the FIFO order of tasks. 1 > default Priority.

tq p1 -- sleep 100

4. Special Case: run the given task right away ignoring Pri and Rsc

tq 1 0 -- sleep 100

另请参见

ATD(8),高温秃鹰,扭矩,泥浆,PBS。

许可证

麻省理工学院执照。

欢迎加入QQ群-->: 979659372

9ddc589a9bae9dd81334056da3504a2c.png

推荐PyPI第三方库

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值