Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 558D2200CDB for ; Sat, 5 Aug 2017 20:07:04 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 53EBC164F51; Sat, 5 Aug 2017 18:07:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 733E5164F4F for ; Sat, 5 Aug 2017 20:07:03 +0200 (CEST) Received: (qmail 4321 invoked by uid 500); 5 Aug 2017 18:07:02 -0000 Mailing-List: contact user-help@predictionio.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@predictionio.incubator.apache.org Delivered-To: mailing list user@predictionio.incubator.apache.org Received: (qmail 4305 invoked by uid 99); 5 Aug 2017 18:07:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Aug 2017 18:07:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 20B9E1A1A17 for ; Sat, 5 Aug 2017 18:07:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.8 X-Spam-Level: X-Spam-Status: No, score=-0.8 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=occamsmachete-com.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 218oyOzbS_ET for ; Sat, 5 Aug 2017 18:07:01 +0000 (UTC) Received: from mail-pf0-f181.google.com (mail-pf0-f181.google.com [209.85.192.181]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 9F2545F6C2 for ; Sat, 5 Aug 2017 18:07:00 +0000 (UTC) Received: by mail-pf0-f181.google.com with SMTP id o86so19285812pfj.1 for ; Sat, 05 Aug 2017 11:07:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=occamsmachete-com.20150623.gappssmtp.com; s=20150623; h=from:mime-version:subject:date:references:to:in-reply-to:message-id; bh=DORu66MSTUGiPDPx/SzRmwIjraMa0Iu6tRYAl7PKhKA=; b=fDbBxS6YMAMduwSU3uMmG+p4j8QPSlABjsCaXWNQFTuwVlX9El3p9z3v9IxjHkWxzv SYOcPpZpQ7vdIfXs472+ikGhPl0JguoUEtLgmQwLuAfBPOBUdA7Z1nwPqVvprpglDTW2 eAk3n+r++AFgXIhmURZRlfDzyLApQqyx3f0j1reCzqOSn9MENTVkTConAZOss+CayR5G KzVVKQVOLJdftA7LJlDcnQblDrKfcEBI2M5nYqq8LXrzZMlC4YFSjsS3nAzFjZ/abySl 2aWjI7gAMZ4P2RKeFIb9uOa/3zR8o/LJaIQX8ARPM0+MDv3KW29TFwTkfTqAUMhgWbPn oBGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=DORu66MSTUGiPDPx/SzRmwIjraMa0Iu6tRYAl7PKhKA=; b=A2OLrOgLY8FtD+SDxXxAonhIcPwa2uquCYd6GsQ/blU/HyI0eXS/2kjg9C+lK1qJvk uY1g5b2Q7YlR7Lvhakdl/0Zp6w4rrG0l6mnvyT2aIXfH7YZ6U6zH8p8er0wuy7ADMBTw P/UjLOmWaEsI296H1viMhEneuoVeXay2Br01JEauuhmClBbnnF89Uqn2vsemrlfbJGiR 2mGuXBXy2vVM8KTVzqUV9hsFrnOBfgokVzb22orbgdNecRoYQyrEQ8bdwhzFLUJFcBjV TCRQsyICX9r1/SRhkQL31ct/ATa5YtJ6GhM+DFOeRH71+u0vhG8Qj56g+1oDtB0CuLoX FX0Q== X-Gm-Message-State: AIVw112pB5Xc//98twJZxiFTGpO1GZzzX8k9u5McXvgwhOE9FtW7XyOV CCYSQKU+uEUjhO3BsMWYog== X-Received: by 10.84.236.5 with SMTP id q5mr7597293plk.233.1501956413572; Sat, 05 Aug 2017 11:06:53 -0700 (PDT) Received: from [192.168.0.6] (c-24-18-213-211.hsd1.wa.comcast.net. [24.18.213.211]) by smtp.gmail.com with ESMTPSA id q89sm8165910pfd.156.2017.08.05.11.06.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Aug 2017 11:06:52 -0700 (PDT) From: Pat Ferrel Content-Type: multipart/alternative; boundary="Apple-Mail=_BF5C813A-0C88-47D7-81B6-6D7B8F7F4D13" Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Train and deploy on the fly dynamically Date: Sat, 5 Aug 2017 11:06:52 -0700 References: To: user@predictionio.incubator.apache.org In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3273) archived-at: Sat, 05 Aug 2017 18:07:04 -0000 --Apple-Mail=_BF5C813A-0C88-47D7-81B6-6D7B8F7F4D13 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 PredictionIO only supports batch training of models. If you want online = training that updates models with every new input be aware that DL4J is = not fast enough to guarantee what some call =E2=80=9Ckappa=E2=80=9D = style online learning and PIO does not directly support it.=20 One hack I have used with another online learning platform with a PIO = template is to put the algorithm code in an infinite loop, asking for = new input constantly, then training as it comes in. There are some undocumented ways to hook into new input but they are = undocumented for a reason so I personally would not recommend them. So you have 2 questions: Do you need online realtime model updates or just train with every input = (neural nets are iterative with new input and so the later is my guess) Are you able to modify the template code, the hack I mention will = require a template change, not a PIO change. On Aug 5, 2017, at 4:00 AM, William Cao wrote: Hi, PredictionIO Support: We are planning to use PredictionIO combine with deeplearning4j. and use = Java client SDK to have rest calls from Spring. One question I would like to post is we need to pass training data and = deploy in the run time instead of issue "pio train" and "pio deploy" = predictionIO commands. So can we do those things above through Java = client SDK, If yes, Would you please point us to some examples of = template? Thanks in advance. William Cao --Apple-Mail=_BF5C813A-0C88-47D7-81B6-6D7B8F7F4D13 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 PredictionIO only supports batch training of models. If you = want online training that updates models with every new input be aware = that DL4J is not fast enough to guarantee what some call =E2=80=9Ckappa=E2= =80=9D style online learning and PIO does not directly support = it. 

One hack I = have used with another online learning platform with a PIO template is = to put the algorithm code in an infinite loop, asking for new input = constantly, then training as it comes in.

There are some undocumented ways to = hook into new input but they are undocumented for a reason so I = personally would not recommend them.

So you have 2 questions:
  • Do you need online = realtime model updates or just train with every input (neural nets are = iterative with new input and so the later is my guess)
  • Are you able to modify the template code, the hack I mention = will require a template change, not a PIO change.


On Aug 5, 2017, at 4:00 AM, William Cao <william.caolh@gmail.com> wrote:

Hi, PredictionIO Support:

We are planning to use PredictionIO = combine with deeplearning4j. and use Java client SDK to have rest calls = from Spring.

One = question I would like to post is we need to pass training data and = deploy in the run time instead of issue "pio train" and "pio deploy" = predictionIO commands. So can we do those things above through Java = client SDK, If yes, Would you please point us to some examples of = template?

Thanks in = advance.

William = Cao

= --Apple-Mail=_BF5C813A-0C88-47D7-81B6-6D7B8F7F4D13--