Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions merlin/dataloader/ops/embeddings/embedding_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def compute_output_schema(
col_schemas.append(
ColumnSchema(
name=self.embedding_name,
tags=[Tags.CONTINUOUS],
tags=[Tags.CONTINUOUS, Tags.EMBEDDING],
dtype=self._get_dtype(self.embeddings),
is_list=True,
is_ragged=False,
Expand Down Expand Up @@ -189,7 +189,7 @@ def compute_output_schema(
col_schemas.append(
ColumnSchema(
name=self.embedding_name,
tags=[Tags.CONTINUOUS],
tags=[Tags.CONTINUOUS, Tags.EMBEDDING],
dtype=self.embeddings.dtype,
is_list=True,
is_ragged=False,
Expand Down
24 changes: 12 additions & 12 deletions tests/unit/dataloader/test_tf_embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ def test_embedding_tf_np_mmap_dl_no_lookup(tmpdir, embedding_ids, np_embeddings_
dataset = dataset.repartition(10)
schema = dataset.schema
for col_name in cat_names:
schema[col_name] = schema[col_name].with_tags(Tags.CATEGORICAL)
schema[col_name] = schema[col_name].with_tags([Tags.CATEGORICAL, Tags.EMBEDDING])
dataset.schema = schema

for col_name in cat_names:
schema[col_name] = schema[col_name].with_tags(Tags.CATEGORICAL)
schema[col_name] = schema[col_name].with_tags([Tags.CATEGORICAL, Tags.EMBEDDING])
dataset.schema = schema
data_loader = Loader(
dataset,
Expand Down Expand Up @@ -91,11 +91,11 @@ def test_embedding_tf_np_mmap_dl_with_lookup(tmpdir, rev_embedding_ids, np_embed
dataset = dataset.repartition(10)
schema = dataset.schema
for col_name in cat_names:
schema[col_name] = schema[col_name].with_tags(Tags.CATEGORICAL)
schema[col_name] = schema[col_name].with_tags([Tags.CATEGORICAL, Tags.EMBEDDING])
dataset.schema = schema

for col_name in cat_names:
schema[col_name] = schema[col_name].with_tags(Tags.CATEGORICAL)
schema[col_name] = schema[col_name].with_tags([Tags.CATEGORICAL, Tags.EMBEDDING])
dataset.schema = schema
data_loader = Loader(
dataset,
Expand Down Expand Up @@ -125,11 +125,11 @@ def test_embedding_tf_np_dl_no_lookup(tmpdir, embedding_ids, embeddings_from_dat
dataset = dataset.repartition(10)
schema = dataset.schema
for col_name in cat_names:
schema[col_name] = schema[col_name].with_tags(Tags.CATEGORICAL)
schema[col_name] = schema[col_name].with_tags([Tags.CATEGORICAL, Tags.EMBEDDING])
dataset.schema = schema

for col_name in cat_names:
schema[col_name] = schema[col_name].with_tags(Tags.CATEGORICAL)
schema[col_name] = schema[col_name].with_tags([Tags.CATEGORICAL, Tags.EMBEDDING])
dataset.schema = schema
paths = sorted(glob.glob(f"{embeddings_from_dataframe}/*"))
embeddings_ds = Dataset(paths)
Expand Down Expand Up @@ -163,11 +163,11 @@ def test_embedding_tf_np_dl_with_lookup(tmpdir, rev_embedding_ids, embeddings_fr
dataset = dataset.repartition(10)
schema = dataset.schema
for col_name in cat_names:
schema[col_name] = schema[col_name].with_tags(Tags.CATEGORICAL)
schema[col_name] = schema[col_name].with_tags([Tags.CATEGORICAL, Tags.EMBEDDING])
dataset.schema = schema

for col_name in cat_names:
schema[col_name] = schema[col_name].with_tags(Tags.CATEGORICAL)
schema[col_name] = schema[col_name].with_tags([Tags.CATEGORICAL, Tags.EMBEDDING])
dataset.schema = schema
paths = sorted(glob.glob(f"{embeddings_from_dataframe}/*"))
embeddings_ds = Dataset(paths)
Expand Down Expand Up @@ -202,11 +202,11 @@ def test_embedding_tf_dl_no_lookup(tmpdir, embedding_ids, embeddings_from_datafr
dataset = dataset.repartition(10)
schema = dataset.schema
for col_name in cat_names:
schema[col_name] = schema[col_name].with_tags(Tags.CATEGORICAL)
schema[col_name] = schema[col_name].with_tags([Tags.CATEGORICAL, Tags.EMBEDDING])
dataset.schema = schema

for col_name in cat_names:
schema[col_name] = schema[col_name].with_tags(Tags.CATEGORICAL)
schema[col_name] = schema[col_name].with_tags([Tags.CATEGORICAL, Tags.EMBEDDING])
dataset.schema = schema
paths = sorted(glob.glob(f"{embeddings_from_dataframe}/*"))
embeddings_ds = Dataset(paths)
Expand Down Expand Up @@ -241,11 +241,11 @@ def test_embedding_tf_dl_with_lookup(tmpdir, rev_embedding_ids, embeddings_from_
dataset = dataset.repartition(10)
schema = dataset.schema
for col_name in cat_names:
schema[col_name] = schema[col_name].with_tags(Tags.CATEGORICAL)
schema[col_name] = schema[col_name].with_tags([Tags.CATEGORICAL, Tags.EMBEDDING])
dataset.schema = schema

for col_name in cat_names:
schema[col_name] = schema[col_name].with_tags(Tags.CATEGORICAL)
schema[col_name] = schema[col_name].with_tags([Tags.CATEGORICAL, Tags.EMBEDDING])
dataset.schema = schema
paths = sorted(glob.glob(f"{embeddings_from_dataframe}/*"))
embeddings_ds = Dataset(paths)
Expand Down
12 changes: 6 additions & 6 deletions tests/unit/dataloader/test_torch_embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_embedding_torch_np_mmap_dl_with_lookup(
dataset = dataset.repartition(10)
schema = dataset.schema
for col_name in cat_names:
schema[col_name] = schema[col_name].with_tags(Tags.CATEGORICAL)
schema[col_name] = schema[col_name].with_tags([Tags.CATEGORICAL, Tags.EMBEDDING])
dataset.schema = schema

data_loader = Loader(
Expand Down Expand Up @@ -81,7 +81,7 @@ def test_embedding_torch_np_mmap_dl_no_lookup(tmpdir, embedding_ids, np_embeddin
dataset = dataset.repartition(10)
schema = dataset.schema
for col_name in cat_names:
schema[col_name] = schema[col_name].with_tags(Tags.CATEGORICAL)
schema[col_name] = schema[col_name].with_tags([Tags.CATEGORICAL, Tags.EMBEDDING])
dataset.schema = schema

data_loader = Loader(
Expand Down Expand Up @@ -115,7 +115,7 @@ def test_embedding_torch_np_dl_with_lookup(
dataset = dataset.repartition(10)
schema = dataset.schema
for col_name in cat_names:
schema[col_name] = schema[col_name].with_tags(Tags.CATEGORICAL)
schema[col_name] = schema[col_name].with_tags([Tags.CATEGORICAL, Tags.EMBEDDING])
dataset.schema = schema
paths = sorted(glob.glob(f"{embeddings_from_dataframe}/*"))
embeddings_ds = Dataset(paths)
Expand Down Expand Up @@ -150,7 +150,7 @@ def test_embedding_torch_np_dl_no_lookup(tmpdir, embedding_ids, embeddings_from_
dataset = dataset.repartition(10)
schema = dataset.schema
for col_name in cat_names:
schema[col_name] = schema[col_name].with_tags(Tags.CATEGORICAL)
schema[col_name] = schema[col_name].with_tags([Tags.CATEGORICAL, Tags.EMBEDDING])
dataset.schema = schema
paths = sorted(glob.glob(f"{embeddings_from_dataframe}/*"))
embeddings_ds = Dataset(paths)
Expand Down Expand Up @@ -184,7 +184,7 @@ def test_embedding_torch_dl_with_lookup(tmpdir, rev_embedding_ids, embeddings_fr
dataset = dataset.repartition(10)
schema = dataset.schema
for col_name in cat_names:
schema[col_name] = schema[col_name].with_tags(Tags.CATEGORICAL)
schema[col_name] = schema[col_name].with_tags([Tags.CATEGORICAL, Tags.EMBEDDING])
dataset.schema = schema
paths = sorted(glob.glob(f"{embeddings_from_dataframe}/*"))
embeddings_ds = Dataset(paths)
Expand Down Expand Up @@ -218,7 +218,7 @@ def test_embedding_torch_dl_no_lookup(tmpdir, embedding_ids, embeddings_from_dat
dataset = dataset.repartition(10)
schema = dataset.schema
for col_name in cat_names:
schema[col_name] = schema[col_name].with_tags(Tags.CATEGORICAL)
schema[col_name] = schema[col_name].with_tags([Tags.CATEGORICAL, Tags.EMBEDDING])
dataset.schema = schema
paths = sorted(glob.glob(f"{embeddings_from_dataframe}/*"))
embeddings_ds = Dataset(paths)
Expand Down