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

Fix the bug of tensors not on the same device when running on CUDA device #59

Merged
merged 10 commits into from
Apr 19, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Update documentation configurations and add readthedocs.yml for proce…
…ssing control (#60)

* doc: update the documentation configs and doc itself;

* fix: fix `ModuleNotFoundError: No module named 'pypots'` and avoid PEP 402 simultaneously;

* feat: add readthedocs config file;

* refactor: delete docs/requirements.txt;

* fix: disable fail_on_warning;
  • Loading branch information
WenjieDu committed Apr 19, 2023
commit 6e30021d41595869d7df2734a0f613f704e2f1da
1 change: 1 addition & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SPHINXPROJ = pypots
SOURCEDIR = .
BUILDDIR = _build

Expand Down
17 changes: 13 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,24 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.

from pypots.__version__ import version
import datetime
import os
import sys

try:
sys.path.insert(0, os.path.abspath(".."))
except IndexError:
pass

import pypots

# -- Project information -----------------------------------------------------
project = "PyPOTS"
copyright = "2023, Wenjie Du"
author = "Wenjie Du"
copyright = f"{datetime.datetime.now().year}, {author}"

# The full version, including alpha/beta/rc tags
release = version
release = pypots.__version__

# -- General configuration ---------------------------------------------------

Expand All @@ -32,7 +41,7 @@
"sphinx.ext.coverage",
"sphinx.ext.imgmath",
"sphinx.ext.viewcode",
'sphinx.ext.napoleon', # enables Sphinx to parse both NumPy and Google style docstrings, otherwise no Param/Returns
"sphinx.ext.napoleon", # enables Sphinx to parse both NumPy and Google style docstrings, otherwise no Param/Returns
"sphinxcontrib.bibtex",
]

Expand Down
5 changes: 5 additions & 0 deletions docs/pypots.classification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pypots.classification.base module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

pypots.classification.brits module
----------------------------------
Expand All @@ -19,6 +20,7 @@ pypots.classification.brits module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

pypots.classification.grud module
---------------------------------
Expand All @@ -27,6 +29,7 @@ pypots.classification.grud module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

pypots.classification.raindrop module
-------------------------------------
Expand All @@ -35,6 +38,7 @@ pypots.classification.raindrop module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

Module contents
---------------
Expand All @@ -43,3 +47,4 @@ Module contents
:members:
:undoc-members:
:show-inheritance:
:inherited-members:
4 changes: 4 additions & 0 deletions docs/pypots.clustering.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pypots.clustering.base module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

pypots.clustering.crli module
-----------------------------
Expand All @@ -19,6 +20,7 @@ pypots.clustering.crli module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

pypots.clustering.vader module
------------------------------
Expand All @@ -27,6 +29,7 @@ pypots.clustering.vader module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

Module contents
---------------
Expand All @@ -35,3 +38,4 @@ Module contents
:members:
:undoc-members:
:show-inheritance:
:inherited-members:
23 changes: 20 additions & 3 deletions docs/pypots.data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pypots.data.base module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

pypots.data.dataset\_for\_brits module
--------------------------------------
Expand All @@ -19,6 +20,7 @@ pypots.data.dataset\_for\_brits module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

pypots.data.dataset\_for\_grud module
-------------------------------------
Expand All @@ -27,6 +29,7 @@ pypots.data.dataset\_for\_grud module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

pypots.data.dataset\_for\_mit module
------------------------------------
Expand All @@ -35,6 +38,7 @@ pypots.data.dataset\_for\_mit module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

pypots.data.generating module
-----------------------------
Expand All @@ -43,14 +47,16 @@ pypots.data.generating module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

pypots.data.integration module
------------------------------
pypots.data.load\_preprocessing module
--------------------------------------

.. automodule:: pypots.data.integration
.. automodule:: pypots.data.load_preprocessing
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

pypots.data.load\_specific\_datasets module
-------------------------------------------
Expand All @@ -59,6 +65,16 @@ pypots.data.load\_specific\_datasets module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

pypots.data.utils module
------------------------

.. automodule:: pypots.data.utils
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

Module contents
---------------
Expand All @@ -67,3 +83,4 @@ Module contents
:members:
:undoc-members:
:show-inheritance:
:inherited-members:
3 changes: 3 additions & 0 deletions docs/pypots.forecasting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pypots.forecasting.base module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

pypots.forecasting.bttf module
------------------------------
Expand All @@ -19,6 +20,7 @@ pypots.forecasting.bttf module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

Module contents
---------------
Expand All @@ -27,3 +29,4 @@ Module contents
:members:
:undoc-members:
:show-inheritance:
:inherited-members:
6 changes: 6 additions & 0 deletions docs/pypots.imputation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pypots.imputation.base module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

pypots.imputation.brits module
------------------------------
Expand All @@ -19,6 +20,7 @@ pypots.imputation.brits module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

pypots.imputation.locf module
-----------------------------
Expand All @@ -27,6 +29,7 @@ pypots.imputation.locf module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

pypots.imputation.saits module
------------------------------
Expand All @@ -35,6 +38,7 @@ pypots.imputation.saits module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

pypots.imputation.transformer module
------------------------------------
Expand All @@ -43,6 +47,7 @@ pypots.imputation.transformer module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

Module contents
---------------
Expand All @@ -51,3 +56,4 @@ Module contents
:members:
:undoc-members:
:show-inheritance:
:inherited-members:
2 changes: 2 additions & 0 deletions docs/pypots.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pypots.base module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

Module contents
---------------
Expand All @@ -32,3 +33,4 @@ Module contents
:members:
:undoc-members:
:show-inheritance:
:inherited-members:
12 changes: 12 additions & 0 deletions docs/pypots.utils.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
pypots.utils package
====================

Subpackages
-----------

.. toctree::
:maxdepth: 4

pypots.utils.commands

Submodules
----------

Expand All @@ -11,6 +19,7 @@ pypots.utils.files module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

pypots.utils.logging module
---------------------------
Expand All @@ -19,6 +28,7 @@ pypots.utils.logging module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

pypots.utils.metrics module
---------------------------
Expand All @@ -27,6 +37,7 @@ pypots.utils.metrics module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

Module contents
---------------
Expand All @@ -35,3 +46,4 @@ Module contents
:members:
:undoc-members:
:show-inheritance:
:inherited-members:
11 changes: 0 additions & 11 deletions docs/requirements.txt

This file was deleted.

29 changes: 29 additions & 0 deletions readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This is file is used to help customize PyPOTS documentation building process on ReadTheDocs.

version: 2

formats:
- htmlzip
- pdf
- epub

sphinx:
configuration: docs/conf.py
fail_on_warning: false

build:
os: ubuntu-22.04

tools:
python: "3.10"

jobs:
pre_install:
- python -m pip install --upgrade pip
- pip install torch==1.13.1 -f https://download.pytorch.org/whl/cpu
- pip install -e ".[optional]" -f "https://data.pyg.org/whl/torch-1.13.1+cpu.html"
- pip install -e ".[basic,doc]"