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

Removed unnecessary colons and fixed typos in the documentation #4616

Merged
merged 7 commits into from
May 11, 2022
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Added support for graph-level outputs in `to_hetero` ([#4582](https://github.com/pyg-team/pytorch_geometric/pull/4582))
- Added `CHANGELOG.md` ([#4581](https://github.com/pyg-team/pytorch_geometric/pull/4581))
### Changed
- Removed unnecessary colons and fixed typos in the documentation ([#4616](https://github.com/pyg-team/pytorch_geometric/pull/4616))
- The `bias` argument in `TAGConv` is now actually applied ([#4597](https://github.com/pyg-team/pytorch_geometric/pull/4597))
- Fixed subclass behaviour of `process` and `download` in `Datsaet` ([#4586](https://github.com/pyg-team/pytorch_geometric/pull/4586))
### Removed
6 changes: 3 additions & 3 deletions torch_geometric/data/lightning_datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ class LightningDataset(LightningDataModule):
trainer.fit(model, datamodule)

Args:
train_dataset: (Dataset) The training dataset.
val_dataset: (Dataset, optional) The validation dataset.
train_dataset (Dataset): The training dataset.
val_dataset (Dataset, optional): The validation dataset.
(default: :obj:`None`)
test_dataset: (Dataset, optional) The test dataset.
test_dataset (Dataset, optional): The test dataset.
(default: :obj:`None`)
batch_size (int, optional): How many samples per batch to load.
(default: :obj:`1`)
Expand Down
2 changes: 1 addition & 1 deletion torch_geometric/datasets/tu_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class TUDataset(InMemoryDataset):
use_edge_attr (bool, optional): If :obj:`True`, the dataset will
contain additional continuous edge attributes (if present).
(default: :obj:`False`)
cleaned: (bool, optional): If :obj:`True`, the dataset will
cleaned (bool, optional): If :obj:`True`, the dataset will
contain only non-isomorphic graphs. (default: :obj:`False`)

Stats:
Expand Down
2 changes: 1 addition & 1 deletion torch_geometric/nn/conv/cluster_gcn_conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ClusterGCNConv(MessagePassing):
in_channels (int): Size of each input sample, or :obj:`-1` to derive
the size from the first input(s) to the forward method.
out_channels (int): Size of each output sample.
diag_lambda: (float, optional): Diagonal enhancement value
diag_lambda (float, optional): Diagonal enhancement value
:math:`\lambda`. (default: :obj:`0.`)
add_self_loops (bool, optional): If set to :obj:`False`, will not add
self-loops to the input graph. (default: :obj:`True`)
Expand Down
4 changes: 2 additions & 2 deletions torch_geometric/nn/conv/han_conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ def forward(
Args:
x_dict (Dict[str, Tensor]): A dictionary holding input node
features for each individual node type.
edge_index_dict: (Dict[str, Union[Tensor, SparseTensor]]): A
edge_index_dict (Dict[str, Union[Tensor, SparseTensor]]): A
dictionary holding graph connectivity information for each
individual edge type, either as a :obj:`torch.LongTensor` of
shape :obj:`[2, num_edges]` or a
:obj:`torch_sparse.SparseTensor`.

:rtype: :obj:`Dict[str, Optional[Tensor]]` - The ouput node embeddings
:rtype: :obj:`Dict[str, Optional[Tensor]]` - The output node embeddings
for each node type.
In case a node type does not receive any message, its output will
be set to :obj:`None`.
Expand Down
4 changes: 2 additions & 2 deletions torch_geometric/nn/conv/hgt_conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@ def forward(
Args:
x_dict (Dict[str, Tensor]): A dictionary holding input node
features for each individual node type.
edge_index_dict: (Dict[str, Union[Tensor, SparseTensor]]): A
edge_index_dict (Dict[str, Union[Tensor, SparseTensor]]): A
dictionary holding graph connectivity information for each
individual edge type, either as a :obj:`torch.LongTensor` of
shape :obj:`[2, num_edges]` or a
:obj:`torch_sparse.SparseTensor`.

:rtype: :obj:`Dict[str, Optional[Tensor]]` - The ouput node embeddings
:rtype: :obj:`Dict[str, Optional[Tensor]]` - The output node embeddings
for each node type.
In case a node type does not receive any message, its output will
be set to :obj:`None`.
Expand Down
2 changes: 1 addition & 1 deletion torch_geometric/nn/conv/pna_conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class PNAConv(MessagePassing):
aggregators (list of str): Set of aggregation function identifiers,
namely :obj:`"sum"`, :obj:`"mean"`, :obj:`"min"`, :obj:`"max"`,
:obj:`"var"` and :obj:`"std"`.
scalers: (list of str): Set of scaling function identifiers, namely
scalers (list of str): Set of scaling function identifiers, namely
:obj:`"identity"`, :obj:`"amplification"`,
:obj:`"attenuation"`, :obj:`"linear"` and
:obj:`"inverse_linear"`.
Expand Down
4 changes: 2 additions & 2 deletions torch_geometric/nn/conv/point_transformer_conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ class PointTransformerConv(MessagePassing):
A tuple corresponds to the sizes of source and target
dimensionalities.
out_channels (int): Size of each output sample.
pos_nn : (torch.nn.Module, optional): A neural network
pos_nn (torch.nn.Module, optional): A neural network
:math:`h_\mathbf{\Theta}` which maps relative spatial coordinates
:obj:`pos_j - pos_i` of shape :obj:`[-1, 3]` to shape
:obj:`[-1, out_channels]`.
Will default to a :class:`torch.nn.Linear` transformation if not
further specified. (default: :obj:`None`)
attn_nn : (torch.nn.Module, optional): A neural network
attn_nn (torch.nn.Module, optional): A neural network
:math:`\gamma_\mathbf{\Theta}` which maps transformed
node features of shape :obj:`[-1, out_channels]`
to shape :obj:`[-1, out_channels]`. (default: :obj:`None`)
Expand Down
2 changes: 1 addition & 1 deletion torch_geometric/nn/fx.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Transformer(object):
In case :obj:`input_map` is not further specified, will try to
automatically determine the correct type of input arguments.
(default: :obj:`None`)
debug: (bool, optional): If set to :obj:`True`, will perform
debug (bool, optional): If set to :obj:`True`, will perform
transformation in debug mode. (default: :obj:`False`)
"""
def __init__(
Expand Down
2 changes: 1 addition & 1 deletion torch_geometric/nn/models/deepgcn.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class DeepGCNLayer(torch.nn.Module):
block (string, optional): The skip connection operation to use
(:obj:`"res+"`, :obj:`"res"`, :obj:`"dense"` or :obj:`"plain"`).
(default: :obj:`"res+"`)
dropout: (float, optional): Whether to apply or dropout.
dropout (float, optional): Whether to apply or dropout.
(default: :obj:`0.`)
ckpt_grad (bool, optional): If set to :obj:`True`, will checkpoint this
part of the model. Checkpointing works by trading compute for
Expand Down
10 changes: 5 additions & 5 deletions torch_geometric/nn/models/dimenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,20 +269,20 @@ class DimeNet(torch.nn.Module):
num_bilinear (int): Size of the bilinear layer tensor.
num_spherical (int): Number of spherical harmonics.
num_radial (int): Number of radial basis functions.
cutoff: (float, optional): Cutoff distance for interatomic
cutoff (float, optional): Cutoff distance for interatomic
interactions. (default: :obj:`5.0`)
max_num_neighbors (int, optional): The maximum number of neighbors to
collect for each node within the :attr:`cutoff` distance.
(default: :obj:`32`)
envelope_exponent (int, optional): Shape of the smooth cutoff.
(default: :obj:`5`)
num_before_skip: (int, optional): Number of residual layers in the
num_before_skip (int, optional): Number of residual layers in the
interaction blocks before the skip connection. (default: :obj:`1`)
num_after_skip: (int, optional): Number of residual layers in the
num_after_skip (int, optional): Number of residual layers in the
interaction blocks after the skip connection. (default: :obj:`2`)
num_output_layers: (int, optional): Number of linear layers for the
num_output_layers (int, optional): Number of linear layers for the
output blocks. (default: :obj:`3`)
act: (Callable, optional): The activation funtion.
act (Callable, optional): The activation function.
(default: :obj:`swish`)
"""

Expand Down
2 changes: 1 addition & 1 deletion torch_geometric/nn/to_hetero_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def forward(self, x, edge_index):
In case :obj:`input_map` is not further specified, will try to
automatically determine the correct type of input arguments.
(default: :obj:`None`)
debug: (bool, optional): If set to :obj:`True`, will perform
debug (bool, optional): If set to :obj:`True`, will perform
transformation in debug mode. (default: :obj:`False`)
"""
transformer = ToHeteroTransformer(module, metadata, aggr, input_map, debug)
Expand Down
2 changes: 1 addition & 1 deletion torch_geometric/nn/to_hetero_with_bases_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def forward(self, x, edge_index):
In case :obj:`input_map` is not further specified, will try to
automatically determine the correct type of input arguments.
(default: :obj:`None`)
debug: (bool, optional): If set to :obj:`True`, will perform
debug (bool, optional): If set to :obj:`True`, will perform
transformation in debug mode. (default: :obj:`False`)
"""
transformer = ToHeteroWithBasesTransformer(module, metadata, num_bases,
Expand Down
2 changes: 1 addition & 1 deletion torch_geometric/transforms/add_self_loops.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AddSelfLoops(BaseTransform):
(functional name: :obj:`add_self_loops`).

Args:
attr: (str, optional): The name of the attribute of edge weights
attr (str, optional): The name of the attribute of edge weights
or multi-dimensional edge features to pass to
:meth:`torch_geometric.utils.add_self_loops`.
(default: :obj:`"edge_weight"`)
Expand Down
2 changes: 1 addition & 1 deletion torch_geometric/transforms/to_sparse_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ToSparseTensor(BaseTransform):
:obj:`data.edge_index` for now.

Args:
attr: (str, optional): The name of the attribute to add as a value to
attr (str, optional): The name of the attribute to add as a value to
the :class:`~torch_sparse.SparseTensor` object (if present).
(default: :obj:`edge_weight`)
remove_edge_index (bool, optional): If set to :obj:`False`, the
Expand Down
2 changes: 1 addition & 1 deletion torch_geometric/utils/subgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def k_hop_subgraph(node_idx, num_hops, edge_index, relabel_nodes=False,
Args:
node_idx (int, list, tuple or :obj:`torch.Tensor`): The central
node(s).
num_hops: (int): The number of hops :math:`k`.
num_hops (int): The number of hops :math:`k`.
edge_index (LongTensor): The edge indices.
relabel_nodes (bool, optional): If set to :obj:`True`, the resulting
:obj:`edge_index` will be relabeled to hold consecutive indices
Expand Down