Git Product home page Git Product logo

inception-function's People

Contributors

alexellis avatar cpanato avatar rgee0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

inception-function's Issues

Invalid URL '': No schema supplied. Perhaps you meant http://?

So decided to get this working on my new MacBook Pro as can't get it to work on the server

Expected Behaviour

URL=https://upload.wikimedia.org/wikipedia/commons/6/61/Humpback_Whale_underwater_shot.jpg \ echo $URL | faas-cli invoke inception

[{"name": "great white shark", "score": 0.5343291759490967}, {"name": "tiger shark", "score": 0.09276486188173294}, {"name": "grey whale", "score": 0.05899052694439888}, {"name": "sea lion", "score": 0.05105864629149437}, {"name": "hammerhead", "score": 0.019910583272576332}, {"name": "sturgeon", "score": 0.013177040033042431}, {"name": "stingray", "score": 0.00763126602396369}, {"name": "electric ray", "score": 0.006749240681529045}, {"name": "killer whale", "score": 0.005086909048259258}, {"name": "ice bear", "score": 0.003828041721135378}]

Current Behaviour

URL=https://upload.wikimedia.org/wikipedia/commons/6/61/Humpback_Whale_underwater_shot.jpg
echo $URL | faas-cli invoke inception
Server returned unexpected status code: 500 - exit status 1
Traceback (most recent call last):
File "index.py", line 16, in
print(inception.invoke(st))
File "/root/inception.py", line 570, in invoke
image_path = download.maybe_download(body, data_dir)
File "/root/download.py", line 70, in maybe_download
download_local(url, file_path, agent)
File "/root/download.py", line 79, in download_local
r = requests.get(url, headers=headers)
File "/usr/local/lib/python3.5/dist-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 519, in request
prep = self.prepare_request(req)
File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 462, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File "/usr/local/lib/python3.5/dist-packages/requests/models.py", line 313, in prepare
self.prepare_url(url, params)
File "/usr/local/lib/python3.5/dist-packages/requests/models.py", line 387, in prepare_url
raise MissingSchema(error)
requests.exceptions.MissingSchema: Invalid URL '': No schema supplied. Perhaps you meant http://?

Steps to Reproduce (for bugs)

Installed OpenFaas on local machine
Installed Inception via store
Ran Inception

Your Environment

Docker 18.09.1, OSX 10.14.2 i7 2.5ghz
CLI:
commit: a141dedf94ffeed84412365fd591bdc8999c5a1b
version: 0.8.3

Gateway
uri: http://127.0.0.1:8080
version: 0.11.1
sha: c394b09ae65177b3c6948b2c22b890068a8e6283
commit: Bump to nats-queue-worker 0.7.0

Provider
name: faas-swarm
orchestration: swarm
version: 0.6.1
sha: 3cac0ccc2e8bb7f567739a33f7d414cdb58440aa

How to invoke via HTTP api properly ?

I got two questions:

  1. How to invoke this function through HTTP ? What do you give it in POST ?
  2. I think I found a really interesting bug:
signal: illegal instruction (core dumped)

Running Inception causes Server returned unexpected status code: 500 - signal: illegal instruction (core dumped)

Expected Behaviour

Running the example code should return [{"name": "great white shark", "score": 0.5343291759490967}, {"name": "tiger shark", "score": 0.09276486188173294}, {"name": "grey whale", "score": 0.05899052694439888}, {"name": "sea lion", "score": 0.05105864629149437}, {"name": "hammerhead", "score": 0.019910583272576332}, {"name": "sturgeon", "score": 0.013177040033042431}, {"name": "stingray", "score": 0.00763126602396369}, {"name": "electric ray", "score": 0.006749240681529045}, {"name": "killer whale", "score": 0.005086909048259258}, {"name": "ice bear", "score": 0.003828041721135378}]

Current Behaviour

URL=https://upload.wikimedia.org/wikipedia/commons/6/61/Humpback_Whale_underwater_shot.jpg echo $URL | faas-cli invoke inception
Server returned unexpected status code: 500 - signal: illegal instruction (core dumped)

Possible Solution

Steps to Reproduce (for bugs)

I installed the function via the function store

Context

Your Environment

Dual Intel(R) Xeon(R) CPU L5410 @ 2.33GHz
128GB DDR2

  • Docker version docker version (e.g. Docker 18.06 ):
    Client:
    Version: 18.09.1
    API version: 1.39
    Go version: go1.10.6
    Git commit: 4c52b90
    Built: Wed Jan 9 19:35:23 2019
    OS/Arch: linux/amd64
    Experimental: false

Server: Docker Engine - Community
Engine:
Version: 18.09.1
API version: 1.39 (minimum version 1.12)
Go version: go1.10.6
Git commit: 4c52b90
Built: Wed Jan 9 19:02:44 2019
OS/Arch: linux/amd64
Experimental: false

  • Are you using Docker Swarm or Kubernetes (FaaS-netes)?
    Swarm

  • Operating System and version (e.g. Linux, Windows, MacOS):
    Ubuntu 16.04

  • How much RAM is available on your nodes?
    422d6498a3fb inception.1.4knd787uo9z1r0wdt8s5ptsa8 0.00% 1.258MiB / 123.5GiB 0.00% 15.1kB / 6.32kB 56.9MB / 0B 7

  • Are you running on x86_64 or ARM?
    x86_64

  • Link to your project or a code example to reproduce issue:
    Its the code here

  • Please also follow the [troubleshooting guide]

inception and scaling with OpenFaaS

We are trying to run inception function on Intel based devices on
OpenFaaS (one master, one slave). We are have not been able to scale
it out. Wondering if this is general problem with OpenFaaS or just a problem with this function.

Expected Behaviour

Expecting that if inception is called multiple times that OpenFaaS would start scaling it out.

Current Behaviour

Apparently the alert manager scales only when it detects many (short?) function invocations per second. However, in this case, the inception function executes for several seconds and, hence, alert manager fails to scale out.

Steps to Reproduce (for bugs)

Just following inception function instructions and invoking it several times.

Your Environment

  • FaaS-CLI version ( Full output from: faas-cli version ): 0.8.8

  • Docker version docker version): 18.06

  • Are you using Docker Swarm or Kubernetes (FaaS-netes)? Kubernetes

  • Operating System and version (e.g. Linux, Windows, MacOS): Ubuntu 16.04.6 LTS

  • How much RAM is available on your nodes? 32 BB

  • Are you running on x86_64 or ARM? x86_64

Timeout & crash? on function usage

I have been unable to use the function (with gateway timeout of 60s), however I have only tested locally with minikube.

Expected Behaviour

echo http://scottleedavis.com/assets/img/scott.jpeg | faas-cli invoke inception returns json classfication

Current Behaviour

$ echo http://scottleedavis.com/assets/img/scott.jpeg | faas-cli invoke inception
Server returned unexpected status code: 502 -
$ echo http://scottleedavis.com/assets/img/twitter.png | faas-cli invoke inception
Server returned unexpected status code: 404 - error finding function inception.openfaas-fn: server returned non-200 status code (500) for function, inception

Possible Solution

Since the second call produces a 404 I am less inclined to simply increase the timeout.

Steps to Reproduce (for bugs)

  1. <install inception following the README.md>
  2. echo http://scottleedavis.com/assets/img/scott.jpeg | faas-cli invoke inception
  3. see 502, run again
  4. see 404

Context

I am experimenting with building an image analysis/classification pipeline based on cozyish, written purely in openfaas, called gezellig

Your Environment

  • FaaS-CLI version ( Full output from: faas-cli version ):
  ___                   _____           ____
 / _ \ _ __   ___ _ __ |  ___|_ _  __ _/ ___|
| | | | '_ \ / _ \ '_ \| |_ / _` |/ _` \___ \
| |_| | |_) |  __/ | | |  _| (_| | (_| |___) |
 \___/| .__/ \___|_| |_|_|  \__,_|\__,_|____/
      |_|

CLI:
 commit:  b7a67fe8d6a02aef35caae615ba56333e7337bfe
 version: 0.9.5

Gateway
 uri:     http://192.168.99.104:31112
 version: 0.18.0
 sha:     137b63e61fe55e0aea7df466931198c37817f743
 commit:  Add namespaces endpoint


Provider
 name:          faas-netes
 orchestration: kubernetes
 version:       0.9.4
 sha:           7eb226a33d819983c9d27911365d8708e59ebf80
  • Docker version docker version (e.g. Docker 18.06 ):
$ docker version
Client: Docker Engine - Community
 Version:           19.03.4
 API version:       1.40
 Go version:        go1.12.10
 Git commit:        9013bf5
 Built:             Thu Oct 17 23:44:48 2019
 OS/Arch:           darwin/amd64
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          19.03.4
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.10
  Git commit:       9013bf5
  Built:            Thu Oct 17 23:50:38 2019
  OS/Arch:          linux/amd64
  Experimental:     true
 containerd:
  Version:          v1.2.10
  GitCommit:        b34a5c8af56e510852c35414db4c1f4fa6172339
 runc:
  Version:          1.0.0-rc8+dev
  GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683
  • Are you using Docker Swarm or Kubernetes (FaaS-netes)?
    kubernetes, currently minikube for evaluation

  • Operating System and version (e.g. Linux, Windows, MacOS):
    OSX 10.14.6

  • How much RAM is available on your nodes?
    16g on machine, standard setup for minikube

  • Are you running on x86_64 or ARM?
    x86

  • Link to your project or a code example to reproduce issue:
    https://github.com/servernull/gezellig/blob/master/run.sh#L14

  • Please also follow the troubleshooting guide and paste in any other diagnostic information you have:
    The troubleshooting link doesn't work for me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.