-
-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #188 from WenjieDu/dev
Merge dev into main
- Loading branch information
Showing
16 changed files
with
221 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# ignore special files or folds | ||
*~ | ||
.idea | ||
.DS_Store | ||
|
||
# ignore all building results | ||
dist | ||
build | ||
docs/_build | ||
*.egg-info | ||
|
||
# ignore all testing/running results | ||
.run | ||
.coverage | ||
.pytest_cache | ||
*__pycache__* | ||
*testing_results* | ||
|
||
# ignore specific kinds of files like all PDFs | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
prune tests | ||
prune pypots/*/template | ||
prune pypots/*/README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ and | |
|
||
**NOTE**: The maintainer role is not permanent. The role is called "maintainer" because it actively maintains the project. | ||
You can take a leave of absence from the role with notice at any time. | ||
But if you're inactive for a long time (more than three months. With reasons, a longer period is allowed for sure), your role will be deactivated. | ||
But if you're inactive for a long time (more than three months. With reasons, a longer period is allowed for sure), your role may be deactivated. | ||
|
||
Becoming a Lead | ||
""""""""""""""" | ||
|
@@ -52,7 +52,8 @@ The lead is a permanent role unless your research is no longer related to the fi | |
you no longer want to get involved with affairs at PyPOTS. | ||
|
||
If you believe you want to do this, you can drop an email with anything you want to tell and your CV attachment to | ||
`[email protected] <mailto:[email protected]>`_. We will schedule a meeting for you and all other leads at PyPOTS for further discussion. | ||
`[email protected] <mailto:[email protected]>`_. We will schedule a meeting for you and all other members at PyPOTS for further discussion. | ||
This is absolutely not a so-called interview, please don't take it formal and we just would like to listen to your thoughts about the field of POTS ;-) | ||
|
||
|
||
Our Development Principles | ||
|
@@ -64,7 +65,7 @@ Our Development Principles | |
We develop PyPOTS and we should try the best to use it in any scenarios related to POTS data. | ||
Only in this way, we can figure out how it tastes like, if it is a good toolset for users, and what other features and models should be included into PyPOTS; | ||
3. `No silver bullet <https://en.wikipedia.org/wiki/No_Silver_Bullet>`_ and `No free launch <https://en.wikipedia.org/wiki/No_free_lunch_theorem>`_. | ||
There is no one solution to all problems in the Universe. In PyPOTS, we keep things modular, so one can easily try and replace parts of the pipeline | ||
There is no one solution to all problems in the universe. In PyPOTS, we keep things modular, so one can easily try and replace parts of the pipeline | ||
in search for the optimal combination for the particular task; | ||
4. Keep things easy to use and familiar. We try to keep PyPOTS intuitive without compromising flexibility and without forcing users to learn a completely new technology. | ||
We do this by keeping the toolkit close to APIs in scikit-learn and pytorch that people know and love; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
""" | ||
Data saving utilities. | ||
""" | ||
|
||
# Created by Wenjie Du <[email protected]> | ||
# License: GLP-v3 | ||
|
||
|
||
import os | ||
|
||
import h5py | ||
|
||
from pypots.utils.file import create_dir_if_not_exist | ||
from pypots.utils.logging import logger | ||
|
||
|
||
def save_dict_into_h5(data_dict: dict, saving_dir: str) -> None: | ||
"""Save the given data (in a dictionary) into the given h5 file. | ||
Parameters | ||
---------- | ||
data_dict : dict, | ||
The data to be saved, should be a Python dictionary. | ||
saving_dir : str, | ||
The h5 file to save the data. | ||
""" | ||
|
||
def save_set(handle, name, data): | ||
if isinstance(data, dict): | ||
single_set_handle = handle.create_group(name) | ||
for key, value in data.items(): | ||
save_set(single_set_handle, key, value) | ||
else: | ||
handle.create_dataset(name, data=data) | ||
|
||
create_dir_if_not_exist(saving_dir) | ||
saving_path = os.path.join(saving_dir, "datasets.h5") | ||
with h5py.File(saving_path, "w") as hf: | ||
for k, v in data_dict.items(): | ||
save_set(hf, k, v) | ||
logger.info(f"Successfully saved the given data into {saving_path}.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.