mirror of https://github.com/skygpu/skynet.git
add binary data option to enqueue
parent
d680ea9b72
commit
d862954377
|
@ -111,6 +111,7 @@ def download():
|
||||||
@click.option('--step', '-s', default=26)
|
@click.option('--step', '-s', default=26)
|
||||||
@click.option('--seed', '-S', default=None)
|
@click.option('--seed', '-S', default=None)
|
||||||
@click.option('--upscaler', '-U', default='x4')
|
@click.option('--upscaler', '-U', default='x4')
|
||||||
|
@click.option('--binary_data', '-b', default='')
|
||||||
def enqueue(
|
def enqueue(
|
||||||
account: str,
|
account: str,
|
||||||
permission: str,
|
permission: str,
|
||||||
|
@ -127,6 +128,16 @@ def enqueue(
|
||||||
'dgpu', node_url, None, None)
|
'dgpu', node_url, None, None)
|
||||||
|
|
||||||
with open_cleos(node_url, key=key) as cleos:
|
with open_cleos(node_url, key=key) as cleos:
|
||||||
|
# if not kwargs['seed']:
|
||||||
|
# kwargs['seed'] = random.randint(0, 10e9)
|
||||||
|
#
|
||||||
|
# req = json.dumps({
|
||||||
|
# 'method': 'diffuse',
|
||||||
|
# 'params': kwargs
|
||||||
|
# })
|
||||||
|
# binary = ''
|
||||||
|
|
||||||
|
for i in range(jobs):
|
||||||
if not kwargs['seed']:
|
if not kwargs['seed']:
|
||||||
kwargs['seed'] = random.randint(0, 10e9)
|
kwargs['seed'] = random.randint(0, 10e9)
|
||||||
|
|
||||||
|
@ -134,9 +145,8 @@ def enqueue(
|
||||||
'method': 'diffuse',
|
'method': 'diffuse',
|
||||||
'params': kwargs
|
'params': kwargs
|
||||||
})
|
})
|
||||||
binary = ''
|
binary = kwargs['binary_data']
|
||||||
|
|
||||||
for i in range(jobs):
|
|
||||||
res = trio.run(cleos.a_push_action,
|
res = trio.run(cleos.a_push_action,
|
||||||
'telos.gpu',
|
'telos.gpu',
|
||||||
'enqueue',
|
'enqueue',
|
||||||
|
|
Loading…
Reference in New Issue