v0

package
v0.5.1-dev Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Default_DistributionConstraints_MinDomainMass = float64(1)
)

Default values for DistributionConstraints fields.

Variables

View Source
var (
	LifecycleStage_name = map[int32]string{
		0: "UNKNOWN_STAGE",
		1: "PLANNED",
		2: "ALPHA",
		3: "BETA",
		4: "PRODUCTION",
		5: "DEPRECATED",
		6: "DEBUG_ONLY",
	}
	LifecycleStage_value = map[string]int32{
		"UNKNOWN_STAGE": 0,
		"PLANNED":       1,
		"ALPHA":         2,
		"BETA":          3,
		"PRODUCTION":    4,
		"DEPRECATED":    5,
		"DEBUG_ONLY":    6,
	}
)

Enum value maps for LifecycleStage.

View Source
var (
	FeatureType_name = map[int32]string{
		0: "TYPE_UNKNOWN",
		1: "BYTES",
		2: "INT",
		3: "FLOAT",
		4: "STRUCT",
	}
	FeatureType_value = map[string]int32{
		"TYPE_UNKNOWN": 0,
		"BYTES":        1,
		"INT":          2,
		"FLOAT":        3,
		"STRUCT":       4,
	}
)

Enum value maps for FeatureType.

View Source
var (
	TimeDomain_IntegerTimeFormat_name = map[int32]string{
		0: "FORMAT_UNKNOWN",
		5: "UNIX_DAYS",
		1: "UNIX_SECONDS",
		2: "UNIX_MILLISECONDS",
		3: "UNIX_MICROSECONDS",
		4: "UNIX_NANOSECONDS",
	}
	TimeDomain_IntegerTimeFormat_value = map[string]int32{
		"FORMAT_UNKNOWN":    0,
		"UNIX_DAYS":         5,
		"UNIX_SECONDS":      1,
		"UNIX_MILLISECONDS": 2,
		"UNIX_MICROSECONDS": 3,
		"UNIX_NANOSECONDS":  4,
	}
)

Enum value maps for TimeDomain_IntegerTimeFormat.

View Source
var (
	TimeOfDayDomain_IntegerTimeOfDayFormat_name = map[int32]string{
		0: "FORMAT_UNKNOWN",
		1: "PACKED_64_NANOS",
	}
	TimeOfDayDomain_IntegerTimeOfDayFormat_value = map[string]int32{
		"FORMAT_UNKNOWN":  0,
		"PACKED_64_NANOS": 1,
	}
)

Enum value maps for TimeOfDayDomain_IntegerTimeOfDayFormat.

View Source
var File_tensorflow_metadata_proto_v0_path_proto protoreflect.FileDescriptor
View Source
var File_tensorflow_metadata_proto_v0_schema_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Annotation

type Annotation struct {

	// Tags can be used to mark features. For example, tag on user_age feature can
	// be `user_feature`, tag on user_country feature can be `location_feature`,
	// `user_feature`.
	Tag []string `protobuf:"bytes,1,rep,name=tag" json:"tag,omitempty"`
	// Free-text comments. This can be used as a description of the feature,
	// developer notes etc.
	Comment []string `protobuf:"bytes,2,rep,name=comment" json:"comment,omitempty"`
	// Application-specific metadata may be attached here.
	ExtraMetadata []*any.Any `protobuf:"bytes,3,rep,name=extra_metadata,json=extraMetadata" json:"extra_metadata,omitempty"`
	// contains filtered or unexported fields
}

Additional information about the schema or about a feature.

func (*Annotation) Descriptor deprecated

func (*Annotation) Descriptor() ([]byte, []int)

Deprecated: Use Annotation.ProtoReflect.Descriptor instead.

func (*Annotation) GetComment

func (x *Annotation) GetComment() []string

func (*Annotation) GetExtraMetadata

func (x *Annotation) GetExtraMetadata() []*any.Any

func (*Annotation) GetTag

func (x *Annotation) GetTag() []string

func (*Annotation) ProtoMessage

func (*Annotation) ProtoMessage()

func (*Annotation) ProtoReflect

func (x *Annotation) ProtoReflect() protoreflect.Message

func (*Annotation) Reset

func (x *Annotation) Reset()

func (*Annotation) String

func (x *Annotation) String() string

type BoolDomain

type BoolDomain struct {

	// Id of the domain. Required if the domain is defined at the schema level. If
	// so, then the name must be unique within the schema.
	Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// Strings values for TRUE/FALSE.
	TrueValue  *string `protobuf:"bytes,2,opt,name=true_value,json=trueValue" json:"true_value,omitempty"`
	FalseValue *string `protobuf:"bytes,3,opt,name=false_value,json=falseValue" json:"false_value,omitempty"`
	// contains filtered or unexported fields
}

Encodes information about the domain of a boolean attribute that encodes its TRUE/FALSE values as strings, or 0=false, 1=true. Note that FeatureType could be either INT or BYTES.

func (*BoolDomain) Descriptor deprecated

func (*BoolDomain) Descriptor() ([]byte, []int)

Deprecated: Use BoolDomain.ProtoReflect.Descriptor instead.

func (*BoolDomain) GetFalseValue

func (x *BoolDomain) GetFalseValue() string

func (*BoolDomain) GetName

func (x *BoolDomain) GetName() string

func (*BoolDomain) GetTrueValue

func (x *BoolDomain) GetTrueValue() string

func (*BoolDomain) ProtoMessage

func (*BoolDomain) ProtoMessage()

func (*BoolDomain) ProtoReflect

func (x *BoolDomain) ProtoReflect() protoreflect.Message

func (*BoolDomain) Reset

func (x *BoolDomain) Reset()

func (*BoolDomain) String

func (x *BoolDomain) String() string

type DatasetConstraints

type DatasetConstraints struct {

	// Tests differences in number of examples between the current data and the
	// previous span.
	NumExamplesDriftComparator *NumericValueComparator `` /* 136-byte string literal not displayed */
	// Tests comparisions in number of examples between the current data and the
	// previous version of that data.
	NumExamplesVersionComparator *NumericValueComparator `` /* 142-byte string literal not displayed */
	// Minimum number of examples in the dataset.
	MinExamplesCount *int64 `protobuf:"varint,3,opt,name=min_examples_count,json=minExamplesCount" json:"min_examples_count,omitempty"`
	// contains filtered or unexported fields
}

Constraints on the entire dataset.

func (*DatasetConstraints) Descriptor deprecated

func (*DatasetConstraints) Descriptor() ([]byte, []int)

Deprecated: Use DatasetConstraints.ProtoReflect.Descriptor instead.

func (*DatasetConstraints) GetMinExamplesCount

func (x *DatasetConstraints) GetMinExamplesCount() int64

func (*DatasetConstraints) GetNumExamplesDriftComparator

func (x *DatasetConstraints) GetNumExamplesDriftComparator() *NumericValueComparator

func (*DatasetConstraints) GetNumExamplesVersionComparator

func (x *DatasetConstraints) GetNumExamplesVersionComparator() *NumericValueComparator

func (*DatasetConstraints) ProtoMessage

func (*DatasetConstraints) ProtoMessage()

func (*DatasetConstraints) ProtoReflect

func (x *DatasetConstraints) ProtoReflect() protoreflect.Message

func (*DatasetConstraints) Reset

func (x *DatasetConstraints) Reset()

func (*DatasetConstraints) String

func (x *DatasetConstraints) String() string

type DistributionConstraints

type DistributionConstraints struct {

	// The minimum fraction (in [0,1]) of values across all examples that
	// should come from the feature's domain, e.g.:
	//   1.0  => All values must come from the domain.
	//    .9  => At least 90% of the values must come from the domain.
	MinDomainMass *float64 `protobuf:"fixed64,1,opt,name=min_domain_mass,json=minDomainMass,def=1" json:"min_domain_mass,omitempty"`
	// contains filtered or unexported fields
}

Models constraints on the distribution of a feature's values. TODO(martinz): replace min_domain_mass with max_off_domain (but slowly).

func (*DistributionConstraints) Descriptor deprecated

func (*DistributionConstraints) Descriptor() ([]byte, []int)

Deprecated: Use DistributionConstraints.ProtoReflect.Descriptor instead.

func (*DistributionConstraints) GetMinDomainMass

func (x *DistributionConstraints) GetMinDomainMass() float64

func (*DistributionConstraints) ProtoMessage

func (*DistributionConstraints) ProtoMessage()

func (*DistributionConstraints) ProtoReflect

func (x *DistributionConstraints) ProtoReflect() protoreflect.Message

func (*DistributionConstraints) Reset

func (x *DistributionConstraints) Reset()

func (*DistributionConstraints) String

func (x *DistributionConstraints) String() string

type Feature

type Feature struct {

	// The name of the feature.
	Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // required
	// This field is no longer supported. Instead, use:
	// lifecycle_stage: DEPRECATED
	// TODO(b/111450258): remove this.
	//
	// Deprecated: Do not use.
	Deprecated *bool `protobuf:"varint,2,opt,name=deprecated" json:"deprecated,omitempty"`
	// Types that are assignable to PresenceConstraints:
	//	*Feature_Presence
	//	*Feature_GroupPresence
	PresenceConstraints isFeature_PresenceConstraints `protobuf_oneof:"presence_constraints"`
	// The shape of the feature which governs the number of values that appear in
	// each example.
	//
	// Types that are assignable to ShapeType:
	//	*Feature_Shape
	//	*Feature_ValueCount
	ShapeType isFeature_ShapeType `protobuf_oneof:"shape_type"`
	// Physical type of the feature's values.
	// Note that you can have:
	// type: BYTES
	// int_domain: {
	//   min: 0
	//   max: 3
	// }
	// This would be a field that is syntactically BYTES (i.e. strings), but
	// semantically an int, i.e. it would be "0", "1", "2", or "3".
	Type *FeatureType `protobuf:"varint,6,opt,name=type,enum=tensorflow.metadata.v0.FeatureType" json:"type,omitempty"`
	// Domain for the values of the feature.
	//
	// Types that are assignable to DomainInfo:
	//	*Feature_Domain
	//	*Feature_IntDomain
	//	*Feature_FloatDomain
	//	*Feature_StringDomain
	//	*Feature_BoolDomain
	//	*Feature_StructDomain
	//	*Feature_NaturalLanguageDomain
	//	*Feature_ImageDomain
	//	*Feature_MidDomain
	//	*Feature_UrlDomain
	//	*Feature_TimeDomain
	//	*Feature_TimeOfDayDomain
	DomainInfo isFeature_DomainInfo `protobuf_oneof:"domain_info"`
	// Constraints on the distribution of the feature values.
	// Currently only supported for StringDomains.
	// TODO(b/69473628): Extend functionality to other domain types.
	DistributionConstraints *DistributionConstraints `protobuf:"bytes,15,opt,name=distribution_constraints,json=distributionConstraints" json:"distribution_constraints,omitempty"`
	// Additional information about the feature for documentation purpose.
	Annotation *Annotation `protobuf:"bytes,16,opt,name=annotation" json:"annotation,omitempty"`
	// Tests comparing the distribution to the associated serving data.
	SkewComparator *FeatureComparator `protobuf:"bytes,18,opt,name=skew_comparator,json=skewComparator" json:"skew_comparator,omitempty"`
	// Tests comparing the distribution between two consecutive spans (e.g. days).
	DriftComparator *FeatureComparator `protobuf:"bytes,21,opt,name=drift_comparator,json=driftComparator" json:"drift_comparator,omitempty"`
	// List of environments this feature is present in.
	// Should be disjoint from not_in_environment.
	// This feature is in environment "foo" if:
	// ("foo" is in in_environment or default_environments) AND
	// "foo" is not in not_in_environment.
	// See Schema::default_environments.
	InEnvironment []string `protobuf:"bytes,20,rep,name=in_environment,json=inEnvironment" json:"in_environment,omitempty"`
	// List of environments this feature is not present in.
	// Should be disjoint from of in_environment.
	// See Schema::default_environments and in_environment.
	NotInEnvironment []string `protobuf:"bytes,19,rep,name=not_in_environment,json=notInEnvironment" json:"not_in_environment,omitempty"`
	// The lifecycle stage of a feature. It can also apply to its descendants.
	// i.e., if a struct is DEPRECATED, its children are implicitly deprecated.
	LifecycleStage *LifecycleStage `` /* 141-byte string literal not displayed */
	// contains filtered or unexported fields
}

Describes schema-level information about a specific feature. NextID: 31

func (*Feature) Descriptor deprecated

func (*Feature) Descriptor() ([]byte, []int)

Deprecated: Use Feature.ProtoReflect.Descriptor instead.

func (*Feature) GetAnnotation

func (x *Feature) GetAnnotation() *Annotation

func (*Feature) GetBoolDomain

func (x *Feature) GetBoolDomain() *BoolDomain

func (*Feature) GetDeprecated deprecated

func (x *Feature) GetDeprecated() bool

Deprecated: Do not use.

func (*Feature) GetDistributionConstraints

func (x *Feature) GetDistributionConstraints() *DistributionConstraints

func (*Feature) GetDomain

func (x *Feature) GetDomain() string

func (*Feature) GetDomainInfo

func (m *Feature) GetDomainInfo() isFeature_DomainInfo

func (*Feature) GetDriftComparator

func (x *Feature) GetDriftComparator() *FeatureComparator

func (*Feature) GetFloatDomain

func (x *Feature) GetFloatDomain() *FloatDomain

func (*Feature) GetGroupPresence

func (x *Feature) GetGroupPresence() *FeaturePresenceWithinGroup

func (*Feature) GetImageDomain

func (x *Feature) GetImageDomain() *ImageDomain

func (*Feature) GetInEnvironment

func (x *Feature) GetInEnvironment() []string

func (*Feature) GetIntDomain

func (x *Feature) GetIntDomain() *IntDomain

func (*Feature) GetLifecycleStage

func (x *Feature) GetLifecycleStage() LifecycleStage

func (*Feature) GetMidDomain

func (x *Feature) GetMidDomain() *MIDDomain

func (*Feature) GetName

func (x *Feature) GetName() string

func (*Feature) GetNaturalLanguageDomain

func (x *Feature) GetNaturalLanguageDomain() *NaturalLanguageDomain

func (*Feature) GetNotInEnvironment

func (x *Feature) GetNotInEnvironment() []string

func (*Feature) GetPresence

func (x *Feature) GetPresence() *FeaturePresence

func (*Feature) GetPresenceConstraints

func (m *Feature) GetPresenceConstraints() isFeature_PresenceConstraints

func (*Feature) GetShape

func (x *Feature) GetShape() *FixedShape

func (*Feature) GetShapeType

func (m *Feature) GetShapeType() isFeature_ShapeType

func (*Feature) GetSkewComparator

func (x *Feature) GetSkewComparator() *FeatureComparator

func (*Feature) GetStringDomain

func (x *Feature) GetStringDomain() *StringDomain

func (*Feature) GetStructDomain

func (x *Feature) GetStructDomain() *StructDomain

func (*Feature) GetTimeDomain

func (x *Feature) GetTimeDomain() *TimeDomain

func (*Feature) GetTimeOfDayDomain

func (x *Feature) GetTimeOfDayDomain() *TimeOfDayDomain

func (*Feature) GetType

func (x *Feature) GetType() FeatureType

func (*Feature) GetUrlDomain

func (x *Feature) GetUrlDomain() *URLDomain

func (*Feature) GetValueCount

func (x *Feature) GetValueCount() *ValueCount

func (*Feature) ProtoMessage

func (*Feature) ProtoMessage()

func (*Feature) ProtoReflect

func (x *Feature) ProtoReflect() protoreflect.Message

func (*Feature) Reset

func (x *Feature) Reset()

func (*Feature) String

func (x *Feature) String() string

type FeatureComparator

type FeatureComparator struct {
	InfinityNorm *InfinityNorm `protobuf:"bytes,1,opt,name=infinity_norm,json=infinityNorm" json:"infinity_norm,omitempty"`
	// contains filtered or unexported fields
}

func (*FeatureComparator) Descriptor deprecated

func (*FeatureComparator) Descriptor() ([]byte, []int)

Deprecated: Use FeatureComparator.ProtoReflect.Descriptor instead.

func (*FeatureComparator) GetInfinityNorm

func (x *FeatureComparator) GetInfinityNorm() *InfinityNorm

func (*FeatureComparator) ProtoMessage

func (*FeatureComparator) ProtoMessage()

func (*FeatureComparator) ProtoReflect

func (x *FeatureComparator) ProtoReflect() protoreflect.Message

func (*FeatureComparator) Reset

func (x *FeatureComparator) Reset()

func (*FeatureComparator) String

func (x *FeatureComparator) String() string

type FeaturePresence

type FeaturePresence struct {

	// Minimum fraction of examples that have this feature.
	MinFraction *float64 `protobuf:"fixed64,1,opt,name=min_fraction,json=minFraction" json:"min_fraction,omitempty"`
	// Minimum number of examples that have this feature.
	MinCount *int64 `protobuf:"varint,2,opt,name=min_count,json=minCount" json:"min_count,omitempty"`
	// contains filtered or unexported fields
}

Describes constraints on the presence of the feature in the data.

func (*FeaturePresence) Descriptor deprecated

func (*FeaturePresence) Descriptor() ([]byte, []int)

Deprecated: Use FeaturePresence.ProtoReflect.Descriptor instead.

func (*FeaturePresence) GetMinCount

func (x *FeaturePresence) GetMinCount() int64

func (*FeaturePresence) GetMinFraction

func (x *FeaturePresence) GetMinFraction() float64

func (*FeaturePresence) ProtoMessage

func (*FeaturePresence) ProtoMessage()

func (*FeaturePresence) ProtoReflect

func (x *FeaturePresence) ProtoReflect() protoreflect.Message

func (*FeaturePresence) Reset

func (x *FeaturePresence) Reset()

func (*FeaturePresence) String

func (x *FeaturePresence) String() string

type FeaturePresenceWithinGroup

type FeaturePresenceWithinGroup struct {
	Required *bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"`
	// contains filtered or unexported fields
}

Records constraints on the presence of a feature inside a "group" context (e.g., .presence inside a group of features that define a sequence).

func (*FeaturePresenceWithinGroup) Descriptor deprecated

func (*FeaturePresenceWithinGroup) Descriptor() ([]byte, []int)

Deprecated: Use FeaturePresenceWithinGroup.ProtoReflect.Descriptor instead.

func (*FeaturePresenceWithinGroup) GetRequired

func (x *FeaturePresenceWithinGroup) GetRequired() bool

func (*FeaturePresenceWithinGroup) ProtoMessage

func (*FeaturePresenceWithinGroup) ProtoMessage()

func (*FeaturePresenceWithinGroup) ProtoReflect

func (*FeaturePresenceWithinGroup) Reset

func (x *FeaturePresenceWithinGroup) Reset()

func (*FeaturePresenceWithinGroup) String

func (x *FeaturePresenceWithinGroup) String() string

type FeatureType

type FeatureType int32

Describes the physical representation of a feature. It may be different than the logical representation, which is represented as a Domain.

const (
	FeatureType_TYPE_UNKNOWN FeatureType = 0
	FeatureType_BYTES        FeatureType = 1
	FeatureType_INT          FeatureType = 2
	FeatureType_FLOAT        FeatureType = 3
	FeatureType_STRUCT       FeatureType = 4
)

func (FeatureType) Descriptor

func (FeatureType) Enum

func (x FeatureType) Enum() *FeatureType

func (FeatureType) EnumDescriptor deprecated

func (FeatureType) EnumDescriptor() ([]byte, []int)

Deprecated: Use FeatureType.Descriptor instead.

func (FeatureType) Number

func (x FeatureType) Number() protoreflect.EnumNumber

func (FeatureType) String

func (x FeatureType) String() string

func (FeatureType) Type

func (*FeatureType) UnmarshalJSON deprecated

func (x *FeatureType) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type Feature_BoolDomain

type Feature_BoolDomain struct {
	BoolDomain *BoolDomain `protobuf:"bytes,13,opt,name=bool_domain,json=boolDomain,oneof"`
}

type Feature_Domain

type Feature_Domain struct {
	// Reference to a domain defined at the schema level.
	Domain string `protobuf:"bytes,7,opt,name=domain,oneof"`
}

type Feature_FloatDomain

type Feature_FloatDomain struct {
	FloatDomain *FloatDomain `protobuf:"bytes,10,opt,name=float_domain,json=floatDomain,oneof"`
}

type Feature_GroupPresence

type Feature_GroupPresence struct {
	// Only used in the context of a "group" context, e.g., inside a sequence.
	GroupPresence *FeaturePresenceWithinGroup `protobuf:"bytes,17,opt,name=group_presence,json=groupPresence,oneof"`
}

type Feature_ImageDomain

type Feature_ImageDomain struct {
	ImageDomain *ImageDomain `protobuf:"bytes,25,opt,name=image_domain,json=imageDomain,oneof"`
}

type Feature_IntDomain

type Feature_IntDomain struct {
	// Inline definitions of domains.
	IntDomain *IntDomain `protobuf:"bytes,9,opt,name=int_domain,json=intDomain,oneof"`
}

type Feature_MidDomain

type Feature_MidDomain struct {
	MidDomain *MIDDomain `protobuf:"bytes,26,opt,name=mid_domain,json=midDomain,oneof"`
}

type Feature_NaturalLanguageDomain

type Feature_NaturalLanguageDomain struct {
	// Supported semantic domains.
	NaturalLanguageDomain *NaturalLanguageDomain `protobuf:"bytes,24,opt,name=natural_language_domain,json=naturalLanguageDomain,oneof"`
}

type Feature_Presence

type Feature_Presence struct {
	// Constraints on the presence of this feature in the examples.
	Presence *FeaturePresence `protobuf:"bytes,14,opt,name=presence,oneof"`
}

type Feature_Shape

type Feature_Shape struct {
	// The feature has a fixed shape corresponding to a multi-dimensional
	// tensor.
	Shape *FixedShape `protobuf:"bytes,23,opt,name=shape,oneof"`
}

type Feature_StringDomain

type Feature_StringDomain struct {
	StringDomain *StringDomain `protobuf:"bytes,11,opt,name=string_domain,json=stringDomain,oneof"`
}

type Feature_StructDomain

type Feature_StructDomain struct {
	StructDomain *StructDomain `protobuf:"bytes,29,opt,name=struct_domain,json=structDomain,oneof"`
}

type Feature_TimeDomain

type Feature_TimeDomain struct {
	TimeDomain *TimeDomain `protobuf:"bytes,28,opt,name=time_domain,json=timeDomain,oneof"`
}

type Feature_TimeOfDayDomain

type Feature_TimeOfDayDomain struct {
	TimeOfDayDomain *TimeOfDayDomain `protobuf:"bytes,30,opt,name=time_of_day_domain,json=timeOfDayDomain,oneof"`
}

type Feature_UrlDomain

type Feature_UrlDomain struct {
	UrlDomain *URLDomain `protobuf:"bytes,27,opt,name=url_domain,json=urlDomain,oneof"`
}

type Feature_ValueCount

type Feature_ValueCount struct {
	// The feature doesn't have a well defined shape. All we know are limits on
	// the minimum and maximum number of values.
	ValueCount *ValueCount `protobuf:"bytes,5,opt,name=value_count,json=valueCount,oneof"`
}

type FixedShape

type FixedShape struct {

	// The dimensions that define the shape. The total number of values in each
	// example is the product of sizes of each dimension.
	Dim []*FixedShape_Dim `protobuf:"bytes,2,rep,name=dim" json:"dim,omitempty"`
	// contains filtered or unexported fields
}

Specifies a fixed shape for the feature's values. The immediate implication is that each feature has a fixed number of values. Moreover, these values can be parsed in a multi-dimensional tensor using the specified axis sizes. The FixedShape defines a lexicographical ordering of the data. For instance,

if there is a FixedShape {
  dim {size:3} dim {size:2}
}

then tensor[0][0]=field[0] then tensor[0][1]=field[1] then tensor[1][0]=field[2] then tensor[1][1]=field[3] then tensor[2][0]=field[4] then tensor[2][1]=field[5]

The FixedShape message is identical with the TensorFlow TensorShape proto message.

func (*FixedShape) Descriptor deprecated

func (*FixedShape) Descriptor() ([]byte, []int)

Deprecated: Use FixedShape.ProtoReflect.Descriptor instead.

func (*FixedShape) GetDim

func (x *FixedShape) GetDim() []*FixedShape_Dim

func (*FixedShape) ProtoMessage

func (*FixedShape) ProtoMessage()

func (*FixedShape) ProtoReflect

func (x *FixedShape) ProtoReflect() protoreflect.Message

func (*FixedShape) Reset

func (x *FixedShape) Reset()

func (*FixedShape) String

func (x *FixedShape) String() string

type FixedShape_Dim

type FixedShape_Dim struct {
	Size *int64 `protobuf:"varint,1,opt,name=size" json:"size,omitempty"`
	// Optional name of the tensor dimension.
	Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	// contains filtered or unexported fields
}

An axis in a multi-dimensional feature representation.

func (*FixedShape_Dim) Descriptor deprecated

func (*FixedShape_Dim) Descriptor() ([]byte, []int)

Deprecated: Use FixedShape_Dim.ProtoReflect.Descriptor instead.

func (*FixedShape_Dim) GetName

func (x *FixedShape_Dim) GetName() string

func (*FixedShape_Dim) GetSize

func (x *FixedShape_Dim) GetSize() int64

func (*FixedShape_Dim) ProtoMessage

func (*FixedShape_Dim) ProtoMessage()

func (*FixedShape_Dim) ProtoReflect

func (x *FixedShape_Dim) ProtoReflect() protoreflect.Message

func (*FixedShape_Dim) Reset

func (x *FixedShape_Dim) Reset()

func (*FixedShape_Dim) String

func (x *FixedShape_Dim) String() string

type FloatDomain

type FloatDomain struct {

	// Id of the domain. Required if the domain is defined at the schema level. If
	// so, then the name must be unique within the schema.
	Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// Min and max values of the domain.
	Min *float32 `protobuf:"fixed32,3,opt,name=min" json:"min,omitempty"`
	Max *float32 `protobuf:"fixed32,4,opt,name=max" json:"max,omitempty"`
	// contains filtered or unexported fields
}

Encodes information for domains of float values. Note that FeatureType could be either INT or BYTES.

func (*FloatDomain) Descriptor deprecated

func (*FloatDomain) Descriptor() ([]byte, []int)

Deprecated: Use FloatDomain.ProtoReflect.Descriptor instead.

func (*FloatDomain) GetMax

func (x *FloatDomain) GetMax() float32

func (*FloatDomain) GetMin

func (x *FloatDomain) GetMin() float32

func (*FloatDomain) GetName

func (x *FloatDomain) GetName() string

func (*FloatDomain) ProtoMessage

func (*FloatDomain) ProtoMessage()

func (*FloatDomain) ProtoReflect

func (x *FloatDomain) ProtoReflect() protoreflect.Message

func (*FloatDomain) Reset

func (x *FloatDomain) Reset()

func (*FloatDomain) String

func (x *FloatDomain) String() string

type ImageDomain

type ImageDomain struct {
	// contains filtered or unexported fields
}

Image data.

func (*ImageDomain) Descriptor deprecated

func (*ImageDomain) Descriptor() ([]byte, []int)

Deprecated: Use ImageDomain.ProtoReflect.Descriptor instead.

func (*ImageDomain) ProtoMessage

func (*ImageDomain) ProtoMessage()

func (*ImageDomain) ProtoReflect

func (x *ImageDomain) ProtoReflect() protoreflect.Message

func (*ImageDomain) Reset

func (x *ImageDomain) Reset()

func (*ImageDomain) String

func (x *ImageDomain) String() string

type InfinityNorm

type InfinityNorm struct {

	// The InfinityNorm is in the interval [0.0, 1.0] so sensible bounds should
	// be in the interval [0.0, 1.0).
	Threshold *float64 `protobuf:"fixed64,1,opt,name=threshold" json:"threshold,omitempty"`
	// contains filtered or unexported fields
}

Checks that the L-infinity norm is below a certain threshold between the two discrete distributions. Since this is applied to a FeatureNameStatistics, it only considers the top k. L_infty(p,q) = max_i |p_i-q_i|

func (*InfinityNorm) Descriptor deprecated

func (*InfinityNorm) Descriptor() ([]byte, []int)

Deprecated: Use InfinityNorm.ProtoReflect.Descriptor instead.

func (*InfinityNorm) GetThreshold

func (x *InfinityNorm) GetThreshold() float64

func (*InfinityNorm) ProtoMessage

func (*InfinityNorm) ProtoMessage()

func (*InfinityNorm) ProtoReflect

func (x *InfinityNorm) ProtoReflect() protoreflect.Message

func (*InfinityNorm) Reset

func (x *InfinityNorm) Reset()

func (*InfinityNorm) String

func (x *InfinityNorm) String() string

type IntDomain

type IntDomain struct {

	// Id of the domain. Required if the domain is defined at the schema level. If
	// so, then the name must be unique within the schema.
	Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// Min and max values for the domain.
	Min *int64 `protobuf:"varint,3,opt,name=min" json:"min,omitempty"`
	Max *int64 `protobuf:"varint,4,opt,name=max" json:"max,omitempty"`
	// If true then the domain encodes categorical values (i.e., ids) rather than
	// ordinal values.
	IsCategorical *bool `protobuf:"varint,5,opt,name=is_categorical,json=isCategorical" json:"is_categorical,omitempty"`
	// contains filtered or unexported fields
}

Encodes information for domains of integer values. Note that FeatureType could be either INT or BYTES.

func (*IntDomain) Descriptor deprecated

func (*IntDomain) Descriptor() ([]byte, []int)

Deprecated: Use IntDomain.ProtoReflect.Descriptor instead.

func (*IntDomain) GetIsCategorical

func (x *IntDomain) GetIsCategorical() bool

func (*IntDomain) GetMax

func (x *IntDomain) GetMax() int64

func (*IntDomain) GetMin

func (x *IntDomain) GetMin() int64

func (*IntDomain) GetName

func (x *IntDomain) GetName() string

func (*IntDomain) ProtoMessage

func (*IntDomain) ProtoMessage()

func (*IntDomain) ProtoReflect

func (x *IntDomain) ProtoReflect() protoreflect.Message

func (*IntDomain) Reset

func (x *IntDomain) Reset()

func (*IntDomain) String

func (x *IntDomain) String() string

type LifecycleStage

type LifecycleStage int32

LifecycleStage. Only UNKNOWN_STAGE, BETA, and PRODUCTION features are actually validated. PLANNED, ALPHA, and DEBUG are treated as DEPRECATED.

const (
	LifecycleStage_UNKNOWN_STAGE LifecycleStage = 0 // Unknown stage.
	LifecycleStage_PLANNED       LifecycleStage = 1 // Planned feature, may not be created yet.
	LifecycleStage_ALPHA         LifecycleStage = 2 // Prototype feature, not used in experiments yet.
	LifecycleStage_BETA          LifecycleStage = 3 // Used in user-facing experiments.
	LifecycleStage_PRODUCTION    LifecycleStage = 4 // Used in a significant fraction of user traffic.
	LifecycleStage_DEPRECATED    LifecycleStage = 5 // No longer supported: do not use in new models.
	LifecycleStage_DEBUG_ONLY    LifecycleStage = 6 // Only exists for debugging purposes.
)

func (LifecycleStage) Descriptor

func (LifecycleStage) Enum

func (x LifecycleStage) Enum() *LifecycleStage

func (LifecycleStage) EnumDescriptor deprecated

func (LifecycleStage) EnumDescriptor() ([]byte, []int)

Deprecated: Use LifecycleStage.Descriptor instead.

func (LifecycleStage) Number

func (LifecycleStage) String

func (x LifecycleStage) String() string

func (LifecycleStage) Type

func (*LifecycleStage) UnmarshalJSON deprecated

func (x *LifecycleStage) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type MIDDomain

type MIDDomain struct {
	// contains filtered or unexported fields
}

Knowledge graph ID, see: https://www.wikidata.org/wiki/Property:P646

func (*MIDDomain) Descriptor deprecated

func (*MIDDomain) Descriptor() ([]byte, []int)

Deprecated: Use MIDDomain.ProtoReflect.Descriptor instead.

func (*MIDDomain) ProtoMessage

func (*MIDDomain) ProtoMessage()

func (*MIDDomain) ProtoReflect

func (x *MIDDomain) ProtoReflect() protoreflect.Message

func (*MIDDomain) Reset

func (x *MIDDomain) Reset()

func (*MIDDomain) String

func (x *MIDDomain) String() string

type NaturalLanguageDomain

type NaturalLanguageDomain struct {
	// contains filtered or unexported fields
}

Natural language text.

func (*NaturalLanguageDomain) Descriptor deprecated

func (*NaturalLanguageDomain) Descriptor() ([]byte, []int)

Deprecated: Use NaturalLanguageDomain.ProtoReflect.Descriptor instead.

func (*NaturalLanguageDomain) ProtoMessage

func (*NaturalLanguageDomain) ProtoMessage()

func (*NaturalLanguageDomain) ProtoReflect

func (x *NaturalLanguageDomain) ProtoReflect() protoreflect.Message

func (*NaturalLanguageDomain) Reset

func (x *NaturalLanguageDomain) Reset()

func (*NaturalLanguageDomain) String

func (x *NaturalLanguageDomain) String() string

type NumericValueComparator

type NumericValueComparator struct {
	MinFractionThreshold *float64 `protobuf:"fixed64,1,opt,name=min_fraction_threshold,json=minFractionThreshold" json:"min_fraction_threshold,omitempty"`
	MaxFractionThreshold *float64 `protobuf:"fixed64,2,opt,name=max_fraction_threshold,json=maxFractionThreshold" json:"max_fraction_threshold,omitempty"`
	// contains filtered or unexported fields
}

Checks that the ratio of the current value to the previous value is not below the min_fraction_threshold or above the max_fraction_threshold. That is, previous value * min_fraction_threshold <= current value <= previous value * max_fraction_threshold. To specify that the value cannot change, set both min_fraction_threshold and max_fraction_threshold to 1.0.

func (*NumericValueComparator) Descriptor deprecated

func (*NumericValueComparator) Descriptor() ([]byte, []int)

Deprecated: Use NumericValueComparator.ProtoReflect.Descriptor instead.

func (*NumericValueComparator) GetMaxFractionThreshold

func (x *NumericValueComparator) GetMaxFractionThreshold() float64

func (*NumericValueComparator) GetMinFractionThreshold

func (x *NumericValueComparator) GetMinFractionThreshold() float64

func (*NumericValueComparator) ProtoMessage

func (*NumericValueComparator) ProtoMessage()

func (*NumericValueComparator) ProtoReflect

func (x *NumericValueComparator) ProtoReflect() protoreflect.Message

func (*NumericValueComparator) Reset

func (x *NumericValueComparator) Reset()

func (*NumericValueComparator) String

func (x *NumericValueComparator) String() string

type Path

type Path struct {

	// Any string is a valid step.
	// However, whenever possible have a step be [A-Za-z0-9_]+.
	Step []string `protobuf:"bytes,1,rep,name=step" json:"step,omitempty"`
	// contains filtered or unexported fields
}

A path is a more general substitute for the name of a field or feature that can be used for flat examples as well as structured data. For example, if we had data in a protocol buffer:

message Person {
  int age = 1;
  optional string gender = 2;
  repeated Person parent = 3;
}

Thus, here the path {step:["parent", "age"]} in statistics would refer to the age of a parent, and {step:["parent", "parent", "age"]} would refer to the age of a grandparent. This allows us to distinguish between the statistics of parents' ages and grandparents' ages. In general, repeated messages are to be preferred to linked lists of arbitrary length. For SequenceExample, if we have a feature list "foo", this is represented by {step:["##SEQUENCE##", "foo"]}.

func (*Path) Descriptor deprecated

func (*Path) Descriptor() ([]byte, []int)

Deprecated: Use Path.ProtoReflect.Descriptor instead.

func (*Path) GetStep

func (x *Path) GetStep() []string

func (*Path) ProtoMessage

func (*Path) ProtoMessage()

func (*Path) ProtoReflect

func (x *Path) ProtoReflect() protoreflect.Message

func (*Path) Reset

func (x *Path) Reset()

func (*Path) String

func (x *Path) String() string

type Schema

type Schema struct {

	// Features described in this schema.
	Feature []*Feature `protobuf:"bytes,1,rep,name=feature" json:"feature,omitempty"`
	// Sparse features described in this schema.
	SparseFeature []*SparseFeature `protobuf:"bytes,6,rep,name=sparse_feature,json=sparseFeature" json:"sparse_feature,omitempty"`
	// Weighted features described in this schema.
	WeightedFeature []*WeightedFeature `protobuf:"bytes,12,rep,name=weighted_feature,json=weightedFeature" json:"weighted_feature,omitempty"`
	// declared as top-level features in <feature>.
	// String domains referenced in the features.
	StringDomain []*StringDomain `protobuf:"bytes,4,rep,name=string_domain,json=stringDomain" json:"string_domain,omitempty"`
	// top level float domains that can be reused by features
	FloatDomain []*FloatDomain `protobuf:"bytes,9,rep,name=float_domain,json=floatDomain" json:"float_domain,omitempty"`
	// top level int domains that can be reused by features
	IntDomain []*IntDomain `protobuf:"bytes,10,rep,name=int_domain,json=intDomain" json:"int_domain,omitempty"`
	// Default environments for each feature.
	// An environment represents both a type of location (e.g. a server or phone)
	// and a time (e.g. right before model X is run). In the standard scenario,
	// 99% of the features should be in the default environments TRAINING,
	// SERVING, and the LABEL (or labels) AND WEIGHT is only available at TRAINING
	// (not at serving).
	// Other possible variations:
	// 1. There may be TRAINING_MOBILE, SERVING_MOBILE, TRAINING_SERVICE,
	//    and SERVING_SERVICE.
	// 2. If one is ensembling three models, where the predictions of the first
	//    three models are available for the ensemble model, there may be
	//    TRAINING, SERVING_INITIAL, SERVING_ENSEMBLE.
	// See FeatureProto::not_in_environment and FeatureProto::in_environment.
	DefaultEnvironment []string `protobuf:"bytes,5,rep,name=default_environment,json=defaultEnvironment" json:"default_environment,omitempty"`
	// Additional information about the schema as a whole. Features may also
	// be annotated individually.
	Annotation *Annotation `protobuf:"bytes,8,opt,name=annotation" json:"annotation,omitempty"`
	// Dataset-level constraints. This is currently used for specifying
	// information about changes in num_examples.
	DatasetConstraints *DatasetConstraints `protobuf:"bytes,11,opt,name=dataset_constraints,json=datasetConstraints" json:"dataset_constraints,omitempty"`
	// TensorRepresentation groups. The keys are the names of the groups.
	// Key "" (empty string) denotes the "default" group, which is what should
	// be used when a group name is not provided.
	// See the documentation at TensorRepresentationGroup for more info.
	// Under development. DO NOT USE.
	TensorRepresentationGroup map[string]*TensorRepresentationGroup `` /* 206-byte string literal not displayed */
	// contains filtered or unexported fields
}

Message to represent schema information. NextID: 14

func (*Schema) Descriptor deprecated

func (*Schema) Descriptor() ([]byte, []int)

Deprecated: Use Schema.ProtoReflect.Descriptor instead.

func (*Schema) GetAnnotation

func (x *Schema) GetAnnotation() *Annotation

func (*Schema) GetDatasetConstraints

func (x *Schema) GetDatasetConstraints() *DatasetConstraints

func (*Schema) GetDefaultEnvironment

func (x *Schema) GetDefaultEnvironment() []string

func (*Schema) GetFeature

func (x *Schema) GetFeature() []*Feature

func (*Schema) GetFloatDomain

func (x *Schema) GetFloatDomain() []*FloatDomain

func (*Schema) GetIntDomain

func (x *Schema) GetIntDomain() []*IntDomain

func (*Schema) GetSparseFeature

func (x *Schema) GetSparseFeature() []*SparseFeature

func (*Schema) GetStringDomain

func (x *Schema) GetStringDomain() []*StringDomain

func (*Schema) GetTensorRepresentationGroup

func (x *Schema) GetTensorRepresentationGroup() map[string]*TensorRepresentationGroup

func (*Schema) GetWeightedFeature

func (x *Schema) GetWeightedFeature() []*WeightedFeature

func (*Schema) ProtoMessage

func (*Schema) ProtoMessage()

func (*Schema) ProtoReflect

func (x *Schema) ProtoReflect() protoreflect.Message

func (*Schema) Reset

func (x *Schema) Reset()

func (*Schema) String

func (x *Schema) String() string

type SparseFeature

type SparseFeature struct {

	// Name for the sparse feature. This should not clash with other features in
	// the same schema.
	Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // required
	// This field is no longer supported. Instead, use:
	// lifecycle_stage: DEPRECATED
	// TODO(b/111450258): remove this.
	//
	// Deprecated: Do not use.
	Deprecated *bool `protobuf:"varint,2,opt,name=deprecated" json:"deprecated,omitempty"`
	// The lifecycle_stage determines where a feature is expected to be used,
	// and therefore how important issues with it are.
	LifecycleStage *LifecycleStage `` /* 140-byte string literal not displayed */
	// Constraints on the presence of this feature in examples.
	// Deprecated, this is inferred by the referred features.
	//
	// Deprecated: Do not use.
	Presence *FeaturePresence `protobuf:"bytes,4,opt,name=presence" json:"presence,omitempty"`
	// Shape of the sparse tensor that this SparseFeature represents.
	// Currently not supported.
	// TODO(b/109669962): Consider deriving this from the referred features.
	DenseShape *FixedShape `protobuf:"bytes,5,opt,name=dense_shape,json=denseShape" json:"dense_shape,omitempty"`
	// Features that represent indexes. Should be integers >= 0.
	IndexFeature []*SparseFeature_IndexFeature `protobuf:"bytes,6,rep,name=index_feature,json=indexFeature" json:"index_feature,omitempty"` // at least one
	// If true then the index values are already sorted lexicographically.
	IsSorted     *bool                       `protobuf:"varint,8,opt,name=is_sorted,json=isSorted" json:"is_sorted,omitempty"`
	ValueFeature *SparseFeature_ValueFeature `protobuf:"bytes,9,opt,name=value_feature,json=valueFeature" json:"value_feature,omitempty"` // required
	// Type of value feature.
	// Deprecated, this is inferred by the referred features.
	//
	// Deprecated: Do not use.
	Type *FeatureType `protobuf:"varint,10,opt,name=type,enum=tensorflow.metadata.v0.FeatureType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

A sparse feature represents a sparse tensor that is encoded with a combination of raw features, namely index features and a value feature. Each index feature defines a list of indices in a different dimension.

func (*SparseFeature) Descriptor deprecated

func (*SparseFeature) Descriptor() ([]byte, []int)

Deprecated: Use SparseFeature.ProtoReflect.Descriptor instead.

func (*SparseFeature) GetDenseShape

func (x *SparseFeature) GetDenseShape() *FixedShape

func (*SparseFeature) GetDeprecated deprecated

func (x *SparseFeature) GetDeprecated() bool

Deprecated: Do not use.

func (*SparseFeature) GetIndexFeature

func (x *SparseFeature) GetIndexFeature() []*SparseFeature_IndexFeature

func (*SparseFeature) GetIsSorted

func (x *SparseFeature) GetIsSorted() bool

func (*SparseFeature) GetLifecycleStage

func (x *SparseFeature) GetLifecycleStage() LifecycleStage

func (*SparseFeature) GetName

func (x *SparseFeature) GetName() string

func (*SparseFeature) GetPresence deprecated

func (x *SparseFeature) GetPresence() *FeaturePresence

Deprecated: Do not use.

func (*SparseFeature) GetType deprecated

func (x *SparseFeature) GetType() FeatureType

Deprecated: Do not use.

func (*SparseFeature) GetValueFeature

func (x *SparseFeature) GetValueFeature() *SparseFeature_ValueFeature

func (*SparseFeature) ProtoMessage

func (*SparseFeature) ProtoMessage()

func (*SparseFeature) ProtoReflect

func (x *SparseFeature) ProtoReflect() protoreflect.Message

func (*SparseFeature) Reset

func (x *SparseFeature) Reset()

func (*SparseFeature) String

func (x *SparseFeature) String() string

type SparseFeature_IndexFeature

type SparseFeature_IndexFeature struct {

	// Name of the index-feature. This should be a reference to an existing
	// feature in the schema.
	Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*SparseFeature_IndexFeature) Descriptor deprecated

func (*SparseFeature_IndexFeature) Descriptor() ([]byte, []int)

Deprecated: Use SparseFeature_IndexFeature.ProtoReflect.Descriptor instead.

func (*SparseFeature_IndexFeature) GetName

func (x *SparseFeature_IndexFeature) GetName() string

func (*SparseFeature_IndexFeature) ProtoMessage

func (*SparseFeature_IndexFeature) ProtoMessage()

func (*SparseFeature_IndexFeature) ProtoReflect

func (*SparseFeature_IndexFeature) Reset

func (x *SparseFeature_IndexFeature) Reset()

func (*SparseFeature_IndexFeature) String

func (x *SparseFeature_IndexFeature) String() string

type SparseFeature_ValueFeature

type SparseFeature_ValueFeature struct {

	// Name of the value-feature. This should be a reference to an existing
	// feature in the schema.
	Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*SparseFeature_ValueFeature) Descriptor deprecated

func (*SparseFeature_ValueFeature) Descriptor() ([]byte, []int)

Deprecated: Use SparseFeature_ValueFeature.ProtoReflect.Descriptor instead.

func (*SparseFeature_ValueFeature) GetName

func (x *SparseFeature_ValueFeature) GetName() string

func (*SparseFeature_ValueFeature) ProtoMessage

func (*SparseFeature_ValueFeature) ProtoMessage()

func (*SparseFeature_ValueFeature) ProtoReflect

func (*SparseFeature_ValueFeature) Reset

func (x *SparseFeature_ValueFeature) Reset()

func (*SparseFeature_ValueFeature) String

func (x *SparseFeature_ValueFeature) String() string

type StringDomain

type StringDomain struct {

	// Id of the domain. Required if the domain is defined at the schema level. If
	// so, then the name must be unique within the schema.
	Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The values appearing in the domain.
	Value []string `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"`
	// contains filtered or unexported fields
}

Encodes information for domains of string values.

func (*StringDomain) Descriptor deprecated

func (*StringDomain) Descriptor() ([]byte, []int)

Deprecated: Use StringDomain.ProtoReflect.Descriptor instead.

func (*StringDomain) GetName

func (x *StringDomain) GetName() string

func (*StringDomain) GetValue

func (x *StringDomain) GetValue() []string

func (*StringDomain) ProtoMessage

func (*StringDomain) ProtoMessage()

func (*StringDomain) ProtoReflect

func (x *StringDomain) ProtoReflect() protoreflect.Message

func (*StringDomain) Reset

func (x *StringDomain) Reset()

func (*StringDomain) String

func (x *StringDomain) String() string

type StructDomain

type StructDomain struct {
	Feature       []*Feature       `protobuf:"bytes,1,rep,name=feature" json:"feature,omitempty"`
	SparseFeature []*SparseFeature `protobuf:"bytes,2,rep,name=sparse_feature,json=sparseFeature" json:"sparse_feature,omitempty"`
	// contains filtered or unexported fields
}

Domain for a recursive struct. NOTE: If a feature with a StructDomain is deprecated, then all the child features (features and sparse_features of the StructDomain) are also considered to be deprecated. Similarly child features can only be in environments of the parent feature.

func (*StructDomain) Descriptor deprecated

func (*StructDomain) Descriptor() ([]byte, []int)

Deprecated: Use StructDomain.ProtoReflect.Descriptor instead.

func (*StructDomain) GetFeature

func (x *StructDomain) GetFeature() []*Feature

func (*StructDomain) GetSparseFeature

func (x *StructDomain) GetSparseFeature() []*SparseFeature

func (*StructDomain) ProtoMessage

func (*StructDomain) ProtoMessage()

func (*StructDomain) ProtoReflect

func (x *StructDomain) ProtoReflect() protoreflect.Message

func (*StructDomain) Reset

func (x *StructDomain) Reset()

func (*StructDomain) String

func (x *StructDomain) String() string

type TensorRepresentation

type TensorRepresentation struct {

	// Types that are assignable to Kind:
	//	*TensorRepresentation_DenseTensor_
	//	*TensorRepresentation_VarlenSparseTensor
	//	*TensorRepresentation_SparseTensor_
	Kind isTensorRepresentation_Kind `protobuf_oneof:"kind"`
	// contains filtered or unexported fields
}

A TensorRepresentation captures the intent for converting columns in a dataset to TensorFlow Tensors (or more generally, tf.CompositeTensors). Note that one tf.CompositeTensor may consist of data from multiple columns, for example, a N-dimensional tf.SparseTensor may need N + 1 columns to provide the sparse indices and values. Note that the "column name" that a TensorRepresentation needs is a string, not a Path -- it means that the column name identifies a top-level Feature in the schema (i.e. you cannot specify a Feature nested in a STRUCT Feature).

func (*TensorRepresentation) Descriptor deprecated

func (*TensorRepresentation) Descriptor() ([]byte, []int)

Deprecated: Use TensorRepresentation.ProtoReflect.Descriptor instead.

func (*TensorRepresentation) GetDenseTensor

func (*TensorRepresentation) GetKind

func (m *TensorRepresentation) GetKind() isTensorRepresentation_Kind

func (*TensorRepresentation) GetSparseTensor

func (*TensorRepresentation) GetVarlenSparseTensor

func (*TensorRepresentation) ProtoMessage

func (*TensorRepresentation) ProtoMessage()

func (*TensorRepresentation) ProtoReflect

func (x *TensorRepresentation) ProtoReflect() protoreflect.Message

func (*TensorRepresentation) Reset

func (x *TensorRepresentation) Reset()

func (*TensorRepresentation) String

func (x *TensorRepresentation) String() string

type TensorRepresentationGroup

type TensorRepresentationGroup struct {
	TensorRepresentation map[string]*TensorRepresentation `` /* 188-byte string literal not displayed */
	// contains filtered or unexported fields
}

A TensorRepresentationGroup is a collection of TensorRepresentations with names. These names may serve as identifiers when converting the dataset to a collection of Tensors or tf.CompositeTensors. For example, given the following group:

{
  key: "dense_tensor"
  tensor_representation {
    dense_tensor {
      column_name: "univalent_feature"
      shape {
        dim {
          size: 1
        }
      }
      default_value {
        float_value: 0
      }
    }
  }
}
{
  key: "varlen_sparse_tensor"
  tensor_representation {
    varlen_sparse_tensor {
      column_name: "multivalent_feature"
    }
  }
}

Then the schema is expected to have feature "univalent_feature" and "multivalent_feature", and when a batch of data is converted to Tensors using this TensorRepresentationGroup, the result may be the following dict:

{
  "dense_tensor": tf.Tensor(...),
  "varlen_sparse_tensor": tf.SparseTensor(...),
}

func (*TensorRepresentationGroup) Descriptor deprecated

func (*TensorRepresentationGroup) Descriptor() ([]byte, []int)

Deprecated: Use TensorRepresentationGroup.ProtoReflect.Descriptor instead.

func (*TensorRepresentationGroup) GetTensorRepresentation

func (x *TensorRepresentationGroup) GetTensorRepresentation() map[string]*TensorRepresentation

func (*TensorRepresentationGroup) ProtoMessage

func (*TensorRepresentationGroup) ProtoMessage()

func (*TensorRepresentationGroup) ProtoReflect

func (*TensorRepresentationGroup) Reset

func (x *TensorRepresentationGroup) Reset()

func (*TensorRepresentationGroup) String

func (x *TensorRepresentationGroup) String() string

type TensorRepresentation_DefaultValue

type TensorRepresentation_DefaultValue struct {

	// Types that are assignable to Kind:
	//	*TensorRepresentation_DefaultValue_FloatValue
	//	*TensorRepresentation_DefaultValue_IntValue
	//	*TensorRepresentation_DefaultValue_BytesValue
	//	*TensorRepresentation_DefaultValue_UintValue
	Kind isTensorRepresentation_DefaultValue_Kind `protobuf_oneof:"kind"`
	// contains filtered or unexported fields
}

func (*TensorRepresentation_DefaultValue) Descriptor deprecated

func (*TensorRepresentation_DefaultValue) Descriptor() ([]byte, []int)

Deprecated: Use TensorRepresentation_DefaultValue.ProtoReflect.Descriptor instead.

func (*TensorRepresentation_DefaultValue) GetBytesValue

func (x *TensorRepresentation_DefaultValue) GetBytesValue() []byte

func (*TensorRepresentation_DefaultValue) GetFloatValue

func (x *TensorRepresentation_DefaultValue) GetFloatValue() float64

func (*TensorRepresentation_DefaultValue) GetIntValue

func (x *TensorRepresentation_DefaultValue) GetIntValue() int64

func (*TensorRepresentation_DefaultValue) GetKind

func (m *TensorRepresentation_DefaultValue) GetKind() isTensorRepresentation_DefaultValue_Kind

func (*TensorRepresentation_DefaultValue) GetUintValue

func (x *TensorRepresentation_DefaultValue) GetUintValue() uint64

func (*TensorRepresentation_DefaultValue) ProtoMessage

func (*TensorRepresentation_DefaultValue) ProtoMessage()

func (*TensorRepresentation_DefaultValue) ProtoReflect

func (*TensorRepresentation_DefaultValue) Reset

func (*TensorRepresentation_DefaultValue) String

type TensorRepresentation_DefaultValue_BytesValue

type TensorRepresentation_DefaultValue_BytesValue struct {
	BytesValue []byte `protobuf:"bytes,3,opt,name=bytes_value,json=bytesValue,oneof"`
}

type TensorRepresentation_DefaultValue_FloatValue

type TensorRepresentation_DefaultValue_FloatValue struct {
	FloatValue float64 `protobuf:"fixed64,1,opt,name=float_value,json=floatValue,oneof"`
}

type TensorRepresentation_DefaultValue_IntValue

type TensorRepresentation_DefaultValue_IntValue struct {
	// Note that the data column might be of a shorter integral type. It's the
	// user's responsitiblity to make sure the default value fits that type.
	IntValue int64 `protobuf:"varint,2,opt,name=int_value,json=intValue,oneof"`
}

type TensorRepresentation_DefaultValue_UintValue

type TensorRepresentation_DefaultValue_UintValue struct {
	// uint_value should only be used if the default value can't fit in a
	// int64 (`int_value`).
	UintValue uint64 `protobuf:"varint,4,opt,name=uint_value,json=uintValue,oneof"`
}

type TensorRepresentation_DenseTensor

type TensorRepresentation_DenseTensor struct {

	// Identifies the column in the dataset that provides the values of this
	// Tensor.
	ColumnName *string `protobuf:"bytes,1,opt,name=column_name,json=columnName" json:"column_name,omitempty"`
	// The shape of each row of the data (i.e. does not include the batch
	// dimension)
	Shape *FixedShape `protobuf:"bytes,2,opt,name=shape" json:"shape,omitempty"`
	// If this column is missing values in a row, the default_value will be
	// used to fill that row.
	DefaultValue *TensorRepresentation_DefaultValue `protobuf:"bytes,3,opt,name=default_value,json=defaultValue" json:"default_value,omitempty"`
	// contains filtered or unexported fields
}

A tf.Tensor

func (*TensorRepresentation_DenseTensor) Descriptor deprecated

func (*TensorRepresentation_DenseTensor) Descriptor() ([]byte, []int)

Deprecated: Use TensorRepresentation_DenseTensor.ProtoReflect.Descriptor instead.

func (*TensorRepresentation_DenseTensor) GetColumnName

func (x *TensorRepresentation_DenseTensor) GetColumnName() string

func (*TensorRepresentation_DenseTensor) GetDefaultValue

func (*TensorRepresentation_DenseTensor) GetShape

func (*TensorRepresentation_DenseTensor) ProtoMessage

func (*TensorRepresentation_DenseTensor) ProtoMessage()

func (*TensorRepresentation_DenseTensor) ProtoReflect

func (*TensorRepresentation_DenseTensor) Reset

func (*TensorRepresentation_DenseTensor) String

type TensorRepresentation_DenseTensor_

type TensorRepresentation_DenseTensor_ struct {
	DenseTensor *TensorRepresentation_DenseTensor `protobuf:"bytes,1,opt,name=dense_tensor,json=denseTensor,oneof"`
}

type TensorRepresentation_SparseTensor

type TensorRepresentation_SparseTensor struct {

	// The dense shape of the resulting SparseTensor (does not include the batch
	// dimension).
	DenseShape *FixedShape `protobuf:"bytes,1,opt,name=dense_shape,json=denseShape" json:"dense_shape,omitempty"`
	// The columns constitute the coordinates of the values.
	// indices_column[i][j] contains the coordinate of the i-th dimension of the
	// j-th value.
	IndexColumnNames []string `protobuf:"bytes,2,rep,name=index_column_names,json=indexColumnNames" json:"index_column_names,omitempty"`
	// The column that contains the values.
	ValueColumnName *string `protobuf:"bytes,3,opt,name=value_column_name,json=valueColumnName" json:"value_column_name,omitempty"`
	// contains filtered or unexported fields
}

A tf.SparseTensor whose indices and values come from separate data columns. This will replace Schema.sparse_feature eventually. The index columns must be of INT type, and all the columns must co-occur and have the same valency at the same row.

func (*TensorRepresentation_SparseTensor) Descriptor deprecated

func (*TensorRepresentation_SparseTensor) Descriptor() ([]byte, []int)

Deprecated: Use TensorRepresentation_SparseTensor.ProtoReflect.Descriptor instead.

func (*TensorRepresentation_SparseTensor) GetDenseShape

func (x *TensorRepresentation_SparseTensor) GetDenseShape() *FixedShape

func (*TensorRepresentation_SparseTensor) GetIndexColumnNames

func (x *TensorRepresentation_SparseTensor) GetIndexColumnNames() []string

func (*TensorRepresentation_SparseTensor) GetValueColumnName

func (x *TensorRepresentation_SparseTensor) GetValueColumnName() string

func (*TensorRepresentation_SparseTensor) ProtoMessage

func (*TensorRepresentation_SparseTensor) ProtoMessage()

func (*TensorRepresentation_SparseTensor) ProtoReflect

func (*TensorRepresentation_SparseTensor) Reset

func (*TensorRepresentation_SparseTensor) String

type TensorRepresentation_SparseTensor_

type TensorRepresentation_SparseTensor_ struct {
	SparseTensor *TensorRepresentation_SparseTensor `protobuf:"bytes,3,opt,name=sparse_tensor,json=sparseTensor,oneof"`
}

type TensorRepresentation_VarLenSparseTensor

type TensorRepresentation_VarLenSparseTensor struct {

	// Identifies the column in the dataset that should be converted to the
	// VarLenSparseTensor.
	ColumnName *string `protobuf:"bytes,1,opt,name=column_name,json=columnName" json:"column_name,omitempty"`
	// contains filtered or unexported fields
}

A ragged tf.SparseTensor that models nested lists.

func (*TensorRepresentation_VarLenSparseTensor) Descriptor deprecated

func (*TensorRepresentation_VarLenSparseTensor) Descriptor() ([]byte, []int)

Deprecated: Use TensorRepresentation_VarLenSparseTensor.ProtoReflect.Descriptor instead.

func (*TensorRepresentation_VarLenSparseTensor) GetColumnName

func (*TensorRepresentation_VarLenSparseTensor) ProtoMessage

func (*TensorRepresentation_VarLenSparseTensor) ProtoReflect

func (*TensorRepresentation_VarLenSparseTensor) Reset

func (*TensorRepresentation_VarLenSparseTensor) String

type TensorRepresentation_VarlenSparseTensor

type TensorRepresentation_VarlenSparseTensor struct {
	VarlenSparseTensor *TensorRepresentation_VarLenSparseTensor `protobuf:"bytes,2,opt,name=varlen_sparse_tensor,json=varlenSparseTensor,oneof"`
}

type TimeDomain

type TimeDomain struct {

	// Types that are assignable to Format:
	//	*TimeDomain_StringFormat
	//	*TimeDomain_IntegerFormat
	Format isTimeDomain_Format `protobuf_oneof:"format"`
	// contains filtered or unexported fields
}

Time or date representation.

func (*TimeDomain) Descriptor deprecated

func (*TimeDomain) Descriptor() ([]byte, []int)

Deprecated: Use TimeDomain.ProtoReflect.Descriptor instead.

func (*TimeDomain) GetFormat

func (m *TimeDomain) GetFormat() isTimeDomain_Format

func (*TimeDomain) GetIntegerFormat

func (x *TimeDomain) GetIntegerFormat() TimeDomain_IntegerTimeFormat

func (*TimeDomain) GetStringFormat

func (x *TimeDomain) GetStringFormat() string

func (*TimeDomain) ProtoMessage

func (*TimeDomain) ProtoMessage()

func (*TimeDomain) ProtoReflect

func (x *TimeDomain) ProtoReflect() protoreflect.Message

func (*TimeDomain) Reset

func (x *TimeDomain) Reset()

func (*TimeDomain) String

func (x *TimeDomain) String() string

type TimeDomain_IntegerFormat

type TimeDomain_IntegerFormat struct {
	// Expected format of integer times.
	IntegerFormat TimeDomain_IntegerTimeFormat `protobuf:"varint,2,opt,name=integer_format,json=integerFormat,enum=tensorflow.metadata.v0.TimeDomain_IntegerTimeFormat,oneof"`
}

type TimeDomain_IntegerTimeFormat

type TimeDomain_IntegerTimeFormat int32
const (
	TimeDomain_FORMAT_UNKNOWN    TimeDomain_IntegerTimeFormat = 0
	TimeDomain_UNIX_DAYS         TimeDomain_IntegerTimeFormat = 5 // Number of days since 1970-01-01.
	TimeDomain_UNIX_SECONDS      TimeDomain_IntegerTimeFormat = 1
	TimeDomain_UNIX_MILLISECONDS TimeDomain_IntegerTimeFormat = 2
	TimeDomain_UNIX_MICROSECONDS TimeDomain_IntegerTimeFormat = 3
	TimeDomain_UNIX_NANOSECONDS  TimeDomain_IntegerTimeFormat = 4
)

func (TimeDomain_IntegerTimeFormat) Descriptor

func (TimeDomain_IntegerTimeFormat) Enum

func (TimeDomain_IntegerTimeFormat) EnumDescriptor deprecated

func (TimeDomain_IntegerTimeFormat) EnumDescriptor() ([]byte, []int)

Deprecated: Use TimeDomain_IntegerTimeFormat.Descriptor instead.

func (TimeDomain_IntegerTimeFormat) Number

func (TimeDomain_IntegerTimeFormat) String

func (TimeDomain_IntegerTimeFormat) Type

func (*TimeDomain_IntegerTimeFormat) UnmarshalJSON deprecated

func (x *TimeDomain_IntegerTimeFormat) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type TimeDomain_StringFormat

type TimeDomain_StringFormat struct {
	// Expected format that contains a combination of regular characters and
	// special format specifiers. Format specifiers are a subset of the
	// strptime standard.
	StringFormat string `protobuf:"bytes,1,opt,name=string_format,json=stringFormat,oneof"`
}

type TimeOfDayDomain

type TimeOfDayDomain struct {

	// Types that are assignable to Format:
	//	*TimeOfDayDomain_StringFormat
	//	*TimeOfDayDomain_IntegerFormat
	Format isTimeOfDayDomain_Format `protobuf_oneof:"format"`
	// contains filtered or unexported fields
}

Time of day, without a particular date.

func (*TimeOfDayDomain) Descriptor deprecated

func (*TimeOfDayDomain) Descriptor() ([]byte, []int)

Deprecated: Use TimeOfDayDomain.ProtoReflect.Descriptor instead.

func (*TimeOfDayDomain) GetFormat

func (m *TimeOfDayDomain) GetFormat() isTimeOfDayDomain_Format

func (*TimeOfDayDomain) GetIntegerFormat

func (*TimeOfDayDomain) GetStringFormat

func (x *TimeOfDayDomain) GetStringFormat() string

func (*TimeOfDayDomain) ProtoMessage

func (*TimeOfDayDomain) ProtoMessage()

func (*TimeOfDayDomain) ProtoReflect

func (x *TimeOfDayDomain) ProtoReflect() protoreflect.Message

func (*TimeOfDayDomain) Reset

func (x *TimeOfDayDomain) Reset()

func (*TimeOfDayDomain) String

func (x *TimeOfDayDomain) String() string

type TimeOfDayDomain_IntegerFormat

type TimeOfDayDomain_IntegerFormat struct {
	// Expected format of integer times.
	IntegerFormat TimeOfDayDomain_IntegerTimeOfDayFormat `` /* 135-byte string literal not displayed */
}

type TimeOfDayDomain_IntegerTimeOfDayFormat

type TimeOfDayDomain_IntegerTimeOfDayFormat int32
const (
	TimeOfDayDomain_FORMAT_UNKNOWN TimeOfDayDomain_IntegerTimeOfDayFormat = 0
	// Time values, containing hour/minute/second/nanos, encoded into 8-byte
	// bit fields following the ZetaSQL convention:
	//        6         5         4         3         2         1
	// MSB 3210987654321098765432109876543210987654321098765432109876543210 LSB
	//                      | H ||  M ||  S ||---------- nanos -----------|
	TimeOfDayDomain_PACKED_64_NANOS TimeOfDayDomain_IntegerTimeOfDayFormat = 1
)

func (TimeOfDayDomain_IntegerTimeOfDayFormat) Descriptor

func (TimeOfDayDomain_IntegerTimeOfDayFormat) Enum

func (TimeOfDayDomain_IntegerTimeOfDayFormat) EnumDescriptor deprecated

func (TimeOfDayDomain_IntegerTimeOfDayFormat) EnumDescriptor() ([]byte, []int)

Deprecated: Use TimeOfDayDomain_IntegerTimeOfDayFormat.Descriptor instead.

func (TimeOfDayDomain_IntegerTimeOfDayFormat) Number

func (TimeOfDayDomain_IntegerTimeOfDayFormat) String

func (TimeOfDayDomain_IntegerTimeOfDayFormat) Type

func (*TimeOfDayDomain_IntegerTimeOfDayFormat) UnmarshalJSON deprecated

func (x *TimeOfDayDomain_IntegerTimeOfDayFormat) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type TimeOfDayDomain_StringFormat

type TimeOfDayDomain_StringFormat struct {
	// Expected format that contains a combination of regular characters and
	// special format specifiers. Format specifiers are a subset of the
	// strptime standard.
	StringFormat string `protobuf:"bytes,1,opt,name=string_format,json=stringFormat,oneof"`
}

type URLDomain

type URLDomain struct {
	// contains filtered or unexported fields
}

A URL, see: https://en.wikipedia.org/wiki/URL

func (*URLDomain) Descriptor deprecated

func (*URLDomain) Descriptor() ([]byte, []int)

Deprecated: Use URLDomain.ProtoReflect.Descriptor instead.

func (*URLDomain) ProtoMessage

func (*URLDomain) ProtoMessage()

func (*URLDomain) ProtoReflect

func (x *URLDomain) ProtoReflect() protoreflect.Message

func (*URLDomain) Reset

func (x *URLDomain) Reset()

func (*URLDomain) String

func (x *URLDomain) String() string

type ValueCount

type ValueCount struct {
	Min *int64 `protobuf:"varint,1,opt,name=min" json:"min,omitempty"`
	Max *int64 `protobuf:"varint,2,opt,name=max" json:"max,omitempty"`
	// contains filtered or unexported fields
}

Limits on maximum and minimum number of values in a single example (when the feature is present). Use this when the minimum value count can be different than the maximum value count. Otherwise prefer FixedShape.

func (*ValueCount) Descriptor deprecated

func (*ValueCount) Descriptor() ([]byte, []int)

Deprecated: Use ValueCount.ProtoReflect.Descriptor instead.

func (*ValueCount) GetMax

func (x *ValueCount) GetMax() int64

func (*ValueCount) GetMin

func (x *ValueCount) GetMin() int64

func (*ValueCount) ProtoMessage

func (*ValueCount) ProtoMessage()

func (*ValueCount) ProtoReflect

func (x *ValueCount) ProtoReflect() protoreflect.Message

func (*ValueCount) Reset

func (x *ValueCount) Reset()

func (*ValueCount) String

func (x *ValueCount) String() string

type WeightedFeature

type WeightedFeature struct {

	// Name for the weighted feature. This should not clash with other features in
	// the same schema.
	Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // required
	// Path of a base feature to be weighted. Required.
	Feature *Path `protobuf:"bytes,2,opt,name=feature" json:"feature,omitempty"`
	// Path of weight feature to associate with the base feature. Must be same
	// shape as feature. Required.
	WeightFeature *Path `protobuf:"bytes,3,opt,name=weight_feature,json=weightFeature" json:"weight_feature,omitempty"`
	// The lifecycle_stage determines where a feature is expected to be used,
	// and therefore how important issues with it are.
	LifecycleStage *LifecycleStage `` /* 140-byte string literal not displayed */
	// contains filtered or unexported fields
}

Represents a weighted feature that is encoded as a combination of raw base features. The `weight_feature` should be a float feature with identical shape as the `feature`. This is useful for representing weights associated with categorical tokens (e.g. a TFIDF weight associated with each token). TODO(b/142122960): Handle WeightedCategorical end to end in TFX (validation, TFX Unit Testing, etc)

func (*WeightedFeature) Descriptor deprecated

func (*WeightedFeature) Descriptor() ([]byte, []int)

Deprecated: Use WeightedFeature.ProtoReflect.Descriptor instead.

func (*WeightedFeature) GetFeature

func (x *WeightedFeature) GetFeature() *Path

func (*WeightedFeature) GetLifecycleStage

func (x *WeightedFeature) GetLifecycleStage() LifecycleStage

func (*WeightedFeature) GetName

func (x *WeightedFeature) GetName() string

func (*WeightedFeature) GetWeightFeature

func (x *WeightedFeature) GetWeightFeature() *Path

func (*WeightedFeature) ProtoMessage

func (*WeightedFeature) ProtoMessage()

func (*WeightedFeature) ProtoReflect

func (x *WeightedFeature) ProtoReflect() protoreflect.Message

func (*WeightedFeature) Reset

func (x *WeightedFeature) Reset()

func (*WeightedFeature) String

func (x *WeightedFeature) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL