Skip to content
New issue

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

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

Already on GitHub? # to your account

Grammar changes and spacings #116

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Currently these are:

2. TwHIN embeddings (projects/twhin) https://arxiv.org/abs/2202.05387


This project can be run inside a python virtualenv. We have only tried this on Linux machines and because we use torchrec it works best with an Nvidia GPU. To setup run

`./images/init_venv.sh` (Linux only).
Expand Down
1 change: 1 addition & 0 deletions checks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"enabled":true,"categories":{}}
2 changes: 1 addition & 1 deletion common/run_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def maybe_run_training(
`train_fn(**training_kwargs)`.

Otherwise, this function calls torchrun and points at the calling module
`module_name`. After this call, the necessary environment variables are set
`module_name`. After this call, the necessary environment variables are set
and training will commence.

Args:
Expand Down
2 changes: 1 addition & 1 deletion machines/list_ops.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Simple str.split() parsing of input string

usage example:
Usage example:
python list_ops.py --input_list=$INPUT [--sep=","] [--op=<len|select>] [--elem=$INDEX]

Args:
Expand Down
2 changes: 1 addition & 1 deletion projects/home/recap/data/preprocessors.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def call(self, inputs, training=None, mask=None):


class DownCast(tf.keras.Model):
"""Class for Down casting dataset before serialization and transferring to training host.
"""Class for Down-casting dataset before serialization and transferring to training host.
Depends on the data type and the actual data range, the down casting can be lossless or not.
It is strongly recommended to compare the metrics before and after down casting.
"""
Expand Down
4 changes: 2 additions & 2 deletions projects/home/recap/data/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def keyed_tensor_from_tensors_dict(
tensor_map: Mapping[str, torch.Tensor]
) -> "torchrec.KeyedTensor":
"""
Convert a dictionary of torch tensor to torchrec keyed tensor
Converts a dictionary of torch tensor to torchrec keyed tensor
Args:
tensor_map:

Expand Down Expand Up @@ -40,7 +40,7 @@ def _compute_jagged_tensor_from_tensor(tensor: torch.Tensor) -> Tuple[torch.Tens

def jagged_tensor_from_tensor(tensor: torch.Tensor) -> "torchrec.JaggedTensor":
"""
Convert a torch tensor to torchrec jagged tensor.
Converts a torch tensor to torchrec jagged tensor.
Note: Currently only support shape of [Batch_size] or [Batch_size x N] for dense tensors.
For sparse tensor the shape of .values() should be [Batch_size] or [Batch_size x N]; the
dense_shape of the sparse tensor can be arbitrary.
Expand Down
2 changes: 1 addition & 1 deletion projects/home/recap/model/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class ZScoreLogConfig(base_config.BaseConfig):
analysis_path: str
schema_path: str = pydantic.Field(
None,
description="Schema path which feaure statistics are generated with. Can be different from scehma in data config.",
description="Schema path which feature statistics are generated with. Can be different from scehma in data config.",
)
clip_magnitude: float = pydantic.Field(
5.0, description="Threshold to clip the normalized input values."
Expand Down
2 changes: 1 addition & 1 deletion projects/home/recap/model/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def unsanitize(sanitized_task_name):


def _build_single_task_model(task: model_config_mod.TaskModel, input_shape: int):
""" "Builds a model for a single task"""
"""Builds a model for a single task"""
if task.mlp_config:
return mlp.Mlp(in_features=input_shape, mlp_config=task.mlp_config)
elif task.dcn_config:
Expand Down
2 changes: 1 addition & 1 deletion projects/home/recap/model/model_and_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def __init__(
Args:
model: torch module to wrap.
loss_fn: Function for calculating loss, should accept logits and labels.
straitifiers: mapping of stratifier name and index of discrete features to emit for metrics stratification.
straitifiers: mapping of a stratifier name and index of discrete features to emit for metrics stratification.
"""
super().__init__()
self.model = model
Expand Down