Skip to content

Commit

Permalink
#63 now we consider to keep labels for any split
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolay-r committed Aug 8, 2023
1 parent fe0fe25 commit 3623170
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions arekit_ss/framework/arekit/serialize_bert.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from arekit.common.data.const import ENTITIES, ENTITY_TYPES
from arekit.common.data.input.providers.rows.samples import BaseSampleRowProvider
from arekit.common.experiment.data_type import DataType
from arekit.contrib.utils.data.storages.row_cache import RowCacheStorage

from arekit.contrib.utils.io_utils.samples import SamplesIO
Expand All @@ -15,5 +14,5 @@ def serialize_bert_pipeline(writer, rows_provider, output_dir):
storage=RowCacheStorage(force_collect_columns=[ENTITIES, ENTITY_TYPES]),
balance_func=lambda _: False,
samples_io=SamplesIO(target_dir=output_dir, writer=writer),
save_labels_func=lambda data_type: data_type != DataType.Test,
save_labels_func=lambda _: True,
rows_provider=rows_provider)
5 changes: 2 additions & 3 deletions arekit_ss/framework/arekit/serialize_nn.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from arekit.common.data.const import ENTITIES, ENTITY_TYPES
from arekit.common.experiment.data_type import DataType
from arekit.contrib.networks.input.const import FrameVariantIndices, FrameConnotations
from arekit.contrib.utils.data.storages.row_cache import RowCacheStorage
from arekit.contrib.utils.data.writers.base import BaseWriter
Expand All @@ -23,5 +22,5 @@ def serialize_nn_pipeline(output_dir, writer, rows_provider):
samples_io=SamplesIO(target_dir=output_dir, writer=writer),
emb_io=NpEmbeddingIO(target_dir=output_dir),
balance_func=lambda _: False,
save_labels_func=lambda data_type: data_type != DataType.Test,
save_embedding=True)
save_labels_func=lambda _: True,
save_embedding=True)

0 comments on commit 3623170

Please sign in to comment.