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

sphinx sphinx release workflow issue #2165

Merged
merged 1 commit into from
Jan 14, 2024
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
19 changes: 11 additions & 8 deletions darts/tests/models/forecasting/test_torch_forecasting_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,17 +707,14 @@ def test_load_weights_params_check(self, tmpdir_fn):
ckpt_path = os.path.join(tmpdir_fn, f"{model_name}.pt")
# barebone model
model = DLinearModel(
input_chunk_length=4,
output_chunk_length=1,
n_epochs=1,
input_chunk_length=4, output_chunk_length=1, n_epochs=1, **tfm_kwargs
)
model.fit(self.series[:10])
model.save(ckpt_path)

# identical model
loading_model = DLinearModel(
input_chunk_length=4,
output_chunk_length=1,
input_chunk_length=4, output_chunk_length=1, **tfm_kwargs
)
loading_model.load_weights(ckpt_path)

Expand All @@ -726,21 +723,26 @@ def test_load_weights_params_check(self, tmpdir_fn):
input_chunk_length=4,
output_chunk_length=1,
optimizer_cls=torch.optim.AdamW,
**tfm_kwargs,
)
loading_model.load_weights(ckpt_path)

model_summary_kwargs = {
"pl_trainer_kwargs": dict(
{"enable_model_sumamry": False}, **tfm_kwargs["pl_trainer_kwargs"]
)
}
# different pl_trainer_kwargs
loading_model = DLinearModel(
input_chunk_length=4,
output_chunk_length=1,
pl_trainer_kwargs={"enable_model_summary": False},
**model_summary_kwargs,
)
loading_model.load_weights(ckpt_path)

# different input_chunk_length (tfm parameter)
loading_model = DLinearModel(
input_chunk_length=4 + 1,
output_chunk_length=1,
input_chunk_length=4 + 1, output_chunk_length=1, **tfm_kwargs
)
with pytest.raises(ValueError) as error_msg:
loading_model.load_weights(ckpt_path)
Expand All @@ -754,6 +756,7 @@ def test_load_weights_params_check(self, tmpdir_fn):
input_chunk_length=4,
output_chunk_length=1,
kernel_size=10,
**tfm_kwargs,
)
with pytest.raises(ValueError) as error_msg:
loading_model.load_weights(ckpt_path)
Expand Down
2 changes: 1 addition & 1 deletion requirements/release.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ numpydoc==1.1.0
papermill==2.2.2
pydata-sphinx-theme==0.7.2
recommonmark==0.7.1
sphinx==4.3.2
sphinx==5.0.0
sphinx-automodapi==0.14.0
sphinx_autodoc_typehints==1.12.0
twine==3.3.0