You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@streampipes.apache.org by "SvenO3 (via GitHub)" <gi...@apache.org> on 2023/01/30 13:35:37 UTC

[PR] Add output data streams to python functions (streampipes)

SvenO3 opened a new pull request, #1181:
URL: https://github.com/apache/streampipes/pull/1181

   <!--
     ~ Licensed to the Apache Software Foundation (ASF) under one or more
     ~ contributor license agreements.  See the NOTICE file distributed with
     ~ this work for additional information regarding copyright ownership.
     ~ The ASF licenses this file to You under the Apache License, Version 2.0
     ~ (the "License"); you may not use this file except in compliance with
     ~ the License.  You may obtain a copy of the License at
     ~
     ~    http://www.apache.org/licenses/LICENSE-2.0
     ~
     ~ Unless required by applicable law or agreed to in writing, software
     ~ distributed under the License is distributed on an "AS IS" BASIS,
     ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     ~ See the License for the specific language governing permissions and
     ~ limitations under the License.
     ~
     -->
     
     <!--
   Thanks for contributing! Here are some tips you can follow to help us incorporate your contribution quickly and easily:
   1. If this is your first time, please read our contributor guidelines:
       - https://streampipes.apache.org/getinvolved.html
       - https://cwiki.apache.org/confluence/display/STREAMPIPES/Getting+Started
   2. Make sure the PR title is formatted like: `[#<GitHub issue id>] PR title ...`
   3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., `[WIP][#<GitHub issue id>] PR title ...`.
   4. Please write your PR title to summarize what this PR proposes/fixes.
   5. Link the PR to the corresponding GitHub issue (if present) in the `Development` section in the right menu bar. 
   6. Be sure to keep the PR description updated to reflect all changes.
   7. If possible, provide a concise example to reproduce the issue for a faster review.
   8. Make sure tests pass via `mvn clean install`.
   9. (Optional) If the contribution is large, please file an Apache ICLA
       - http://apache.org/licenses/icla.pdf
   -->
   
   ### Purpose
   <!--
   Please clarify what changes you are proposing and describe how those changes will address the issue.
   Furthermore, describe potential consequences the changes might have.
   -->
   This PR implements the support for output data streams for the python functions. This makes it possible to create a new data stream out of python and to write back live data to StreamPipes via that stream.
   It also provides an implementation to use Online Machine Learning with the StreamPipesFunctions using the River library. You can now train an Online ML model on a data stream and sends the prediction back to StreamPipes with very little effort.
   
    ### Remarks
   <!--
   Is there anything left we need to pay attention on?
   Are there some references that might be important? E.g. links to Confluence, or discussions
   on the mailing list or GitHub.
   -->
   PR introduces (a) breaking change(s): no
   
   PR introduces (a) deprecation(s): no
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add output data streams to python functions (streampipes)

Posted by "SvenO3 (via GitHub)" <gi...@apache.org>.
SvenO3 merged PR #1181:
URL: https://github.com/apache/streampipes/pull/1181


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add output data streams to python functions (streampipes)

Posted by "bossenti (via GitHub)" <gi...@apache.org>.
bossenti commented on code in PR #1181:
URL: https://github.com/apache/streampipes/pull/1181#discussion_r1095694699


##########
streampipes-client-python/streampipes_client/functions/machine_learning/__init__.py:
##########
@@ -0,0 +1,16 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more

Review Comment:
   lets move this into a dedicated module called `function_zoo`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add output data streams to python functions (streampipes)

Posted by "SvenO3 (via GitHub)" <gi...@apache.org>.
SvenO3 commented on code in PR #1181:
URL: https://github.com/apache/streampipes/pull/1181#discussion_r1095881029


##########
streampipes-client-python/streampipes_client/functions/machine_learning/__init__.py:
##########
@@ -0,0 +1,16 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more

Review Comment:
   Should `function_zoo` be a submodule of the `functions` module. Or should it be seperated to differentiate between implementation and examples?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add output data streams to python functions (streampipes)

Posted by "SvenO3 (via GitHub)" <gi...@apache.org>.
SvenO3 commented on PR #1181:
URL: https://github.com/apache/streampipes/pull/1181#issuecomment-1420474739

   > Needs to be merged in sync with #1228
   
   What's the best way to do this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add output data streams to python functions (streampipes)

Posted by "bossenti (via GitHub)" <gi...@apache.org>.
bossenti commented on PR #1181:
URL: https://github.com/apache/streampipes/pull/1181#issuecomment-1420488000

   Well, one of us has to do some work 😅
   Either we merge #1228 first, then you need to update this PR accordingly or we do it the way around :) 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add output data streams to python functions (streampipes)

Posted by "bossenti (via GitHub)" <gi...@apache.org>.
bossenti commented on code in PR #1181:
URL: https://github.com/apache/streampipes/pull/1181#discussion_r1097830906


##########
streampipes-client-python/streampipes_client/functions/machine_learning/__init__.py:
##########
@@ -0,0 +1,16 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more

Review Comment:
   I would see it as separate module on the same level like functions.
   Should also be beneficial in terms of imports



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add output data streams to python functions (streampipes)

Posted by "bossenti (via GitHub)" <gi...@apache.org>.
bossenti commented on PR #1181:
URL: https://github.com/apache/streampipes/pull/1181#issuecomment-1419690946

   Needs to be merged in sync with https://github.com/apache/streampipes/pull/1228


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add output data streams to python functions (streampipes)

Posted by "bossenti (via GitHub)" <gi...@apache.org>.
bossenti commented on PR #1181:
URL: https://github.com/apache/streampipes/pull/1181#issuecomment-1415761392

   almost forgot: please rebase the PR before we merge it because we upgraded `black`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org