Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BEAM-9147] Add @Experimental annotation to VideoIntelligence related classes #11463

Merged
merged 2 commits into from
Apr 20, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[BEAM-9147] Add @experimental annotation to VideoIntelligence related…
… classes
  • Loading branch information
Michal Walenia committed Apr 20, 2020
commit 494482f03a4eb6031b31ab9d7bf6e0e75c530677
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import org.apache.beam.sdk.annotations.Experimental;
import org.apache.beam.sdk.transforms.DoFn;
import org.apache.beam.sdk.values.PCollectionView;

Expand All @@ -39,6 +40,7 @@
* @param <T> Class of input data being passed in - either ByteString - video data encoded into.
* String or String - a GCS URI of the video to be annotated.
*/
@Experimental
public abstract class AnnotateVideo<T> extends DoFn<T, List<VideoAnnotationResults>> {

protected final PCollectionView<Map<T, VideoContext>> contextSideInput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import org.apache.beam.sdk.annotations.Experimental;
import org.apache.beam.sdk.values.KV;
import org.apache.beam.sdk.values.PCollectionView;

Expand All @@ -37,6 +38,7 @@
*
* <p>Service account with proper permissions is required to use these transforms.
*/
@Experimental
public class VideoIntelligence {

/**
Expand Down Expand Up @@ -88,6 +90,7 @@ public static AnnotateVideoBytesWithContext annotateFromBytesWithContext(
* Implementation of AnnotateVideo accepting Strings as contents of input PCollection. Annotates
* videos found on GCS based on URIs from input PCollection.
*/
@Experimental
public static class AnnotateVideoFromURI extends AnnotateVideo<String> {

public AnnotateVideoFromURI(
Expand All @@ -114,6 +117,7 @@ public void processElement(ProcessContext context)
* Implementation of AnnotateVideo accepting ByteStrings as contents of input PCollection. Videos
* decoded from the ByteStrings are annotated.
*/
@Experimental
public static class AnnotateVideoFromBytes extends AnnotateVideo<ByteString> {

public AnnotateVideoFromBytes(
Expand Down Expand Up @@ -141,6 +145,7 @@ public void processElement(ProcessContext context)
* Implementation of AnnotateVideo accepting KVs as contents of input PCollection. Keys are the
* GCS URIs, values - VideoContext objects.
*/
@Experimental
public static class AnnotateVideoURIWithContext extends AnnotateVideo<KV<String, VideoContext>> {

public AnnotateVideoURIWithContext(List<Feature> featureList) {
Expand All @@ -163,6 +168,7 @@ public void processElement(ProcessContext context)
* Implementation of AnnotateVideo accepting KVs as contents of input PCollection. Keys are the
* ByteString encoded video contents, values - VideoContext objects.
*/
@Experimental
public static class AnnotateVideoBytesWithContext
extends AnnotateVideo<KV<ByteString, VideoContext>> {

Expand Down