Created
January 26, 2017 10:38
-
-
Save marcj/192bb114d86a33179a774c5e3d39ab15 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import math | |
import aetros.backend | |
job = aetros.backend.start_job('marcj/example-1', '----') | |
logging_channel = job.create_channel('logging_channel', type=aetros.backend.JobChannel.TEXT) | |
traces = [ | |
{ | |
'name': 'a', | |
'type': 'bar' | |
}, | |
{ | |
'name': 'b', | |
'type': 'bar' | |
} | |
] | |
layout = {'barmode': 'group'} | |
grouped_channel = job.create_channel('grouped', main_graph=True, traces=traces, layout=layout) | |
for i in range(1, 101): | |
a = math.sin(i/10.0)*math.cos(i/10.0)*math.log(i/10.0)+1 | |
b = math.sin(i/9.0)*math.cos(i/9.0)*math.log(i/14.0)+1 | |
grouped_channel.send(x=i, y=[a, b]) | |
job.progress(i, 100) | |
time.sleep(1) | |
job.done() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# marc @ macbook in ~/bude/example-models on git:master x [11:33:02] | |
$ floyd run "python example-1.py" | |
Creating module. Uploading 4 files ... | |
RUN ID NAME VERSION | |
---------------------- -------------------------------------------- --------- | |
zdJtTL4XwH4KTejua58hRQ demo_ABNtWDgWYyfqCqu2mgKVRb/example-models:1 1 | |
# marc @ macbook in ~/bude/example-models on git:master x [11:33:10] | |
$ floyd logs zdJtTL4XwH4KTejua58hRQ | |
2017-01-26 02:33:11,389 INFO - Preparing to run TaskInstance <TaskInstance: example-models (id: Ub9vGVV8296jovaop543Qo) (checksum: 6b91ee1a615e15a531eae0ba4ebfe2d7) (last update: 2017-01-26 02:33:11.240621) [queued]> | |
2017-01-26 02:33:11,405 INFO - Starting attempt 1 at 2017-01-26 02:33:11.396269 | |
2017-01-26 02:33:11,406 INFO - | |
-------------------------------------------------------------------------------- | |
2017-01-26 02:33:11,743 INFO - Command to execute : python example-1.py | |
2017-01-26 02:33:11,810 INFO - Starting container... | |
2017-01-26 02:33:11,979 INFO - | |
################################################################################ | |
2017-01-26 02:33:11,979 INFO - Run Output: | |
2017-01-26 02:33:12,350 INFO - Collecting keras (from -r floyd_requirements.txt (line 1)) | |
2017-01-26 02:33:12,450 INFO - Downloading Keras-1.2.1.tar.gz (173kB) | |
2017-01-26 02:33:12,971 INFO - Collecting aetros (from -r floyd_requirements.txt (line 2)) | |
2017-01-26 02:33:13,004 INFO - Downloading aetros-0.5.1.tar.gz | |
2017-01-26 02:33:13,227 INFO - Complete output from command python setup.py egg_info: | |
2017-01-26 02:33:13,228 INFO - Traceback (most recent call last): | |
2017-01-26 02:33:13,229 INFO - File "<string>", line 1, in <module> | |
2017-01-26 02:33:13,229 INFO - File "/tmp/pip-build-lbp5iw18/aetros/setup.py", line 3, in <module> | |
2017-01-26 02:33:13,230 INFO - import aetros | |
2017-01-26 02:33:13,230 INFO - File "/tmp/pip-build-lbp5iw18/aetros/aetros/__init__.py", line 8, in <module> | |
2017-01-26 02:33:13,231 INFO - from aetros.commands.ServerCommand import ServerCommand | |
2017-01-26 02:33:13,231 INFO - File "/tmp/pip-build-lbp5iw18/aetros/aetros/commands/ServerCommand.py", line 14, in <module> | |
2017-01-26 02:33:13,231 INFO - import psutil | |
2017-01-26 02:33:13,232 INFO - ImportError: No module named 'psutil' | |
2017-01-26 02:33:13,232 INFO - | |
2017-01-26 02:33:13,233 INFO - ---------------------------------------- | |
2017-01-26 02:33:13,235 INFO - Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-lbp5iw18/aetros/ | |
2017-01-26 02:33:13,420 INFO - Traceback (most recent call last): | |
2017-01-26 02:33:13,421 INFO - File "example-1.py", line 3, in <module> | |
2017-01-26 02:33:13,421 INFO - import aetros.backend | |
2017-01-26 02:33:13,422 INFO - ImportError: No module named 'aetros' | |
2017-01-26 02:33:13,451 INFO - | |
################################################################################ | |
2017-01-26 02:33:13,452 INFO - Waiting for container to complete... | |
2017-01-26 02:33:13,684 INFO - | |
-------------------------------------------------------------------------------- | |
2017-01-26 02:33:13,684 ERROR - [failed] Execution failed in 2 seconds for TaskInstance <TaskInstance: example-models (id: Ub9vGVV8296jovaop543Qo) (checksum: 6b91ee1a615e15a531eae0ba4ebfe2d7) (last update: 2017-01-26 02:33:13.661506) [failed]> | |
2017-01-26 02:33:13,684 ERROR - Docker container id ddaca6be94c2421319e0f1650c22f63358326302ae63f06c5ea4307502f9521c failed | |
Traceback (most recent call last): | |
File "/app/floyd/models/task_instance.py", line 607, in run | |
self.execute(module, context) | |
File "/app/floyd/models/task_instance.py", line 740, in execute | |
self.container.execute(module, context) | |
File "/app/floyd/containers/docker_container.py", line 410, in execute | |
self.wait() | |
File "/app/floyd/containers/docker_container.py", line 300, in wait | |
raise FloydException("Docker container id {} failed".format(self.docker_uuid)) | |
floyd.exceptions.FloydException: Docker container id ddaca6be94c2421319e0f1650c22f63358326302ae63f06c5ea4307502f9521c failed | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
keras | |
aetros |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment