[
https://issues.apache.org/jira/browse/BEAM-2953?focusedWorklogId=155678&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-155678
]
ASF GitHub Bot logged work on BEAM-2953:
----------------------------------------
Author: ASF GitHub Bot
Created on: 18/Oct/18 02:22
Start Date: 18/Oct/18 02:22
Worklog Time Spent: 10m
Work Description: rezarokni commented on a change in pull request #6540:
[BEAM-2953] Advanced Timeseries examples.
URL: https://github.com/apache/beam/pull/6540#discussion_r226150860
##########
File path:
sdks/java/extensions/timeseries/src/main/java/org/apache/beam/sdk/extensions/timeseries/io/tf/TFExampleToBytes.java
##########
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+package org.apache.beam.sdk.extensions.timeseries.io.tf;
+
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.transforms.DoFn;
+import org.tensorflow.example.Example;
+
+/** Convert TensorFlow Example object to byte[]. */
+@Experimental
+public class TFExampleToBytes extends DoFn<Example, byte[]> {
Review comment:
This was mainly used for pushing data into TFRecords, however in the last
commit I have modified the code so that rather than use a transform I make use
of a lambda function which calls the getBytes:
https://github.com/rezarokni/beam/blob/timeseries/examples/java/src/main/java/org/apache/beam/examples/timeseries/TimeSeriesExampleToFile.java
https://github.com/rezarokni/beam/blob/timeseries/sdks/java/extensions/timeseries/src/main/java/org/apache/beam/sdk/extensions/timeseries/utils/TSAccumSequences.java#L50
So I think given this refactor I should be able to just delete these ToBytes
transforms...
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 155678)
Time Spent: 4h 10m (was: 4h)
> Timeseries processing extensions using state API
> ------------------------------------------------
>
> Key: BEAM-2953
> URL: https://issues.apache.org/jira/browse/BEAM-2953
> Project: Beam
> Issue Type: Improvement
> Components: sdk-ideas
> Affects Versions: 2.7.0
> Reporter: Reza ardeshir rokni
> Assignee: Reuven Lax
> Priority: Minor
> Time Spent: 4h 10m
> Remaining Estimate: 0h
>
> A general set of timeseries transforms that abstract the user from the
> process of dealing with some of the common problems when dealing with
> timeseries using BEAM (in stream or batch mode).
> BEAM can be used to build out some very interesting pre-processing stages for
> time series data. Some examples that will be useful:
> - Downsampling time series based on simple MIN, MAX, COUNT, SUM, LAST, FIRST
> - Creating a value for each downsampled window even if no value has been
> emitted for the specific key.
> - Loading the value of a downsample with the previous value (used in FX with
> previous close being brought into current open value)
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)