Skip to content

Commit

Permalink
Add some placeholder missing docstrings and # noqa tags
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwilby committed Jun 4, 2024
1 parent 97373bc commit 678602a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
8 changes: 8 additions & 0 deletions deepsensor/model/convnp.py
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,14 @@ def ar_sample(


def concat_tasks(tasks: List[Task], multiple: int = 1) -> Task:
"""
Concatenate a list of tasks into a single task containing multiple batches.
```{warning}
`concat_tasks` has been moved to deepsensor.data.task and will be removed from "
"deepsensor.model.convnp in a future release.
```
"""
warnings.warn(
"concat_tasks has been moved to deepsensor.data.task and will be removed from "
"deepsensor.model.convnp in a future release.",
Expand Down
4 changes: 2 additions & 2 deletions deepsensor/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def std(self, task: Task):
var = self.variance(task)
return var**0.5

def stddev(self, *args, **kwargs):
def stddev(self, *args, **kwargs): # noqa
return self.std(*args, **kwargs)

def covariance(self, task: Task, *args, **kwargs):
Expand Down Expand Up @@ -609,7 +609,7 @@ def unnormalise_pred_array(arr, **kwargs):
return pred


def main(): # pragma: no cover
def main(): # pragma: no cover # noqa
import deepsensor.tensorflow
from deepsensor.data.loader import TaskLoader
from deepsensor.data.processor import DataProcessor
Expand Down
1 change: 1 addition & 0 deletions deepsensor/tensorflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@


def convert_to_tensor(arr):
"""Convert `arr` to tensorflow tensor."""
return tf.convert_to_tensor(arr)


Expand Down
1 change: 1 addition & 0 deletions deepsensor/torch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@


def convert_to_tensor(arr):
"""Convert `arr` to pytorch tensor."""
return torch.tensor(arr)


Expand Down
1 change: 1 addition & 0 deletions deepsensor/train/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ def __call__(
progress_bar=False,
tqdm_notebook=False,
) -> List[float]:
"""Train model for one epoch."""
return train_epoch(
model=self.model,
tasks=tasks,
Expand Down

0 comments on commit 678602a

Please sign in to comment.