File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 4
4
<h3>Neural spatiotemporal forecasting with PyTorch</h3>
5
5
<hr>
6
6
<p>
7
- <a href='https://pypi.org/project/torch-spatiotemporal/'>
8
- <img alt="PyPI" src="https://img.shields.io/pypi/v/torch-spatiotemporal">
9
- </a>
7
+ <a href='https://pypi.org/project/torch-spatiotemporal/'><img alt="PyPI" src="https://img.shields.io/pypi/v/torch-spatiotemporal"></a>
10
8
<img alt="PyPI - Python Version" src="https://img.shields.io/badge/python-%3E%3D3.8-blue">
11
9
<!-- img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/torch-spatiotemporal" -->
12
10
<img alt="Total downloads" src="https://static.pepy.tech/badge/torch-spatiotemporal">
13
- <a href='https://torch-spatiotemporal.readthedocs.io/en/latest/?badge=latest'>
14
- <img src='https://readthedocs.org/projects/torch-spatiotemporal/badge/?version=latest' alt='Documentation Status' />
15
- </a>
11
+ <a href='https://torch-spatiotemporal.readthedocs.io/en/latest/?badge=latest'><img src='https://readthedocs.org/projects/torch-spatiotemporal/badge/?version=latest' alt='Documentation Status' /></a>
16
12
</p>
17
13
<p>
18
14
🚀 <a href="https://torch-spatiotemporal.readthedocs.io/en/latest/usage/quickstart.html">Getting Started</a> - 📚 <a href="https://torch-spatiotemporal.readthedocs.io/en/latest/">Documentation</a> - 💻 <a href="https://torch-spatiotemporal.readthedocs.io/en/latest/notebooks/a_gentle_introduction_to_tsl.html">Introductory notebook</a>
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ def load_model(self, filename: str):
127
127
assert model_cls == self .model_cls
128
128
if model_kwargs is not None :
129
129
for k , v in model_kwargs .items ():
130
- assert v == self .model_kwargs [k ]
130
+ assert v == self .model_kwargs [k ], f' { v } '
131
131
else :
132
132
logger .warning ("Predictor with already instantiated model is "
133
133
f"loading a state_dict from { filename } . Cannot "
@@ -157,8 +157,8 @@ def _filter_forward_kwargs(self, kwargs: dict) -> dict:
157
157
model_args = self ._model_fwd_signature ['signature' ]
158
158
filtered = set (kwargs ).difference (model_args )
159
159
forwarded = set (kwargs ).intersection (model_args )
160
- msg = f"Only args { list (forwarded )} are forwarded to the model " \
161
- f"({ self .model .__class__ .__name__ } ). "
160
+ msg = ( f"Only args { list (forwarded )} are forwarded to the model "
161
+ f"({ self .model .__class__ .__name__ } )." )
162
162
if len (filtered ):
163
163
msg = f"Arguments { list (filtered )} are filtered out. " + msg
164
164
logger .warning (msg )
You can’t perform that action at this time.
0 commit comments