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

Persistence diagrams workflow #93

Merged
merged 68 commits into from
Jun 16, 2022
Merged

Conversation

raphaelreinauer
Copy link
Collaborator

@raphaelreinauer raphaelreinauer commented Jun 15, 2022

New features:

  • Automatic generation of PD dataset from standard graph datasets
  • Persistence Diagram class with a lot of functionality like plotting
  • Preprocessing for Persistence Diagrams
  • New modular implementation of the Persformer

The whole pipeline as a tutorial is in examples/mutag_pipeline.ipynb

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@matteocao
Copy link
Contributor

There are only very few small fixes to make mypy happy : would you mind please fixing them as well?
Screen Shot 2022-06-15 at 23 08 06

Copy link
Contributor

@matteocao matteocao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

almost there : once the CI passes, please have a look at my comments and also make sure that mypy has no issues (there are still a couple of minor things

Run mypy --ignore-missing-imports . || {
[9](https://github.com/giotto-ai/giotto-deep/runs/6919970264?check_suite_focus=true#step:6:10)
gdeep/data/preprocessors/min_max_scalar.py:54: error: "Dataset[Tuple[Tensor, Any]]" has no attribute "__iter__" (not iterable)
[10](https://github.com/giotto-ai/giotto-deep/runs/6919970264?check_suite_focus=true#step:6:11)
gdeep/data/datasets/persistence_diagrams_from_graphs_builder.py:8: error: Library stubs not installed for "requests" (or incompatible with Python 3.8)
[11](https://github.com/giotto-ai/giotto-deep/runs/6919970264?check_suite_focus=true#step:6:12)
gdeep/data/datasets/persistence_diagrams_from_graphs_builder.py:8: note: Hint: "python3 -m pip install types-requests"
[12](https://github.com/giotto-ai/giotto-deep/runs/6919970264?check_suite_focus=true#step:6:13)
gdeep/data/datasets/persistence_diagrams_from_graphs_builder.py:8: note: (or run "mypy --install-types" to install all missing stub packages)
[13](https://github.com/giotto-ai/giotto-deep/runs/6919970264?check_suite_focus=true#step:6:14)
gdeep/data/datasets/persistence_diagrams_from_graphs_builder.py:8: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
[14](https://github.com/giotto-ai/giotto-deep/runs/6919970264?check_suite_focus=true#step:6:15)
gdeep/data/datasets/base_dataloaders.py:209: error: Name "out" already defined on line 196
[15](https://github.com/giotto-ai/giotto-deep/runs/6919970264?check_suite_focus=true#step:6:16)
examples/mutag_pipeline.py:58: error: Name "pd" already defined on line 45
[16](https://github.com/giotto-ai/giotto-deep/runs/6919970264?check_suite_focus=true#step:6:17)
examples/mutag_pipeline.py:96: error: Incompatible types in assignment (expression has type "TransformingDataset[Tuple[OneHotEncodedPersistenceDiagram, int], Any]", variable has type "Subset[Tuple[OneHotEncodedPersistenceDiagram, int]]")
[17](https://github.com/giotto-ai/giotto-deep/runs/6919970264?check_suite_focus=true#step:6:18)
examples/mutag_pipeline.py:97: error: Incompatible types in assignment (expression has type "TransformingDataset[Tuple[OneHotEncodedPersistenceDiagram, int], Any]", variable has type "Subset[Tuple[OneHotEncodedPersistenceDiagram, int]]")
[18](https://github.com/giotto-ai/giotto-deep/runs/6919970264?check_suite_focus=true#step:6:19)
examples/mutag_pipeline.py:98: error: Incompatible types in assignment (expression has type "TransformingDataset[Tuple[OneHotEncodedPersistenceDiagram, int], Any]", variable has type "Subset[Tuple[OneHotEncodedPersistenceDiagram, int]]")
[19](https://github.com/giotto-ai/giotto-deep/runs/6919970264?check_suite_focus=true#step:6:20)
examples/mutag_pipeline.py:140: error: Incompatible types in assignment (expression has type "PersformerWrapper", variable has type "Persformer")
[20](https://github.com/giotto-ai/giotto-deep/runs/6919970264?check_suite_focus=true#step:6:21)
Found 8 errors in 4 files (checked 126 source files)
[21](https://github.com/giotto-ai/giotto-deep/runs/6919970264?check_suite_focus=true#step:6:22)
Type checking errors!

@raphaelreinauer
Copy link
Collaborator Author

There are only very few small fixes to make mypy happy : would you mind please fixing them as well? Screen Shot 2022-06-15 at 23 08 06

Okay I fixed that!

Copy link
Contributor

@matteocao matteocao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work!

@matteocao matteocao merged commit 7ffe3fd into master Jun 16, 2022
@matteocao matteocao deleted the persistence_diagrams_workflow branch June 16, 2022 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants