-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add data inspection utilities and tests
1. Add data inspection utilities in data loader. 2. Use omegaconf to load and save yaml config. 3. Add tests to run NHP.
- Loading branch information
Showing
7 changed files
with
195 additions
and
43 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
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,10 @@ | ||
pipeline_config_id: data_config | ||
|
||
data_format: json | ||
train_dir: easytpp/taxi # ./data/taxi/train.json | ||
valid_dir: easytpp/taxi # ./data/taxi/dev.json | ||
test_dir: easytpp/taxi # ./data/taxi/test.json | ||
data_specs: | ||
num_event_types: 10 | ||
pad_token_id: 10 | ||
padding_side: right |
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 @@ | ||
import os | ||
import sys | ||
# Get the directory of the current file | ||
current_file_path = os.path.abspath(__file__) | ||
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(current_file_path)))) | ||
|
||
from easy_tpp.config_factory import Config | ||
from easy_tpp.preprocess.data_loader import TPPDataLoader | ||
|
||
|
||
def main(): | ||
config = Config.build_from_yaml_file('./config.yaml') | ||
tpp_loader = TPPDataLoader(config) | ||
stats = tpp_loader.get_statistics(split='train') | ||
print(stats) | ||
tpp_loader.plot_event_type_distribution() | ||
tpp_loader.plot_event_delta_times_distribution() | ||
|
||
if __name__ == '__main__': | ||
main() |
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 |
---|---|---|
|
@@ -5,3 +5,4 @@ torch | |
tensorboard | ||
packaging | ||
datasets | ||
omegaconf |
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 +1 @@ | ||
__version__ = '0.0.7.1' | ||
__version__ = '0.0.8' |