Skip to content

Commit

Permalink
Run pdoc on all shimmer modules
Browse files Browse the repository at this point in the history
  • Loading branch information
bdvllrs committed Mar 6, 2024
1 parent 8178275 commit 210f9af
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
poetry run python -m pip install --upgrade pip
poetry run pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
poetry run pip install lightning
- run: poetry run pdoc ./shimmer -o docs/api/ --docformat=google
- run: poetry run pdoc ./shimmer/* -o docs/api/ --docformat=google
- uses: actions/upload-pages-artifact@v3
with:
path: docs/api/
Expand Down
21 changes: 9 additions & 12 deletions shimmer/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,41 @@

import torch

module_var = ""
"""some doc"""

RawDomainGroupT: TypeAlias = Mapping[str, Any]
RawDomainGroupT = Mapping[str, Any]
"""
Matched raw unimodal data from multiple domains.
Keys of the mapping are domains names.
"""

RawDomainGroupDT: TypeAlias = dict[str, Any]
RawDomainGroupDT = dict[str, Any]
"""
Matched raw unimodal data from multiple domains.
Keys of the dict are domains names.
This is a more specific version of `RawDomainGroupT` used in method's outputs.
"""

LatentsDomainGroupT: TypeAlias = Mapping[str, torch.Tensor]
LatentsDomainGroupT = Mapping[str, torch.Tensor]
"""
Matched unimodal latent representations from multiple domains.
Keys of the mapping are domains names.
"""

LatentsDomainGroupDT: TypeAlias = dict[str, torch.Tensor]
LatentsDomainGroupDT = dict[str, torch.Tensor]
"""
Matched unimodal latent representations from multiple domains.
Keys of the dict are domains names.
This is a more specific version of `LatentsDomainGroupT` used in method's outputs.
"""

LatentsDomainGroupsT: TypeAlias = Mapping[frozenset[str], LatentsDomainGroupT]
LatentsDomainGroupsT = Mapping[frozenset[str], LatentsDomainGroupT]
"""
Mapping of `LatentsDomainGroupT`. Keys are frozenset of domains matched in the group.
Each group is independent and contains different data (unpaired).
"""

LatentsDomainGroupsDT: TypeAlias = dict[frozenset[str], LatentsDomainGroupDT]
LatentsDomainGroupsDT = dict[frozenset[str], LatentsDomainGroupDT]
"""
Mapping of `LatentsDomainGroupDT`.
Keys are frozenset of domains matched in the group.
Expand All @@ -49,20 +46,20 @@
This is a more specific version of `LatentsDomainGroupsT` used in method's outputs.
"""

RawDomainGroupsT: TypeAlias = Mapping[frozenset[str], RawDomainGroupT]
RawDomainGroupsT = Mapping[frozenset[str], RawDomainGroupT]
"""
Mapping of `RawDomainGroupT`. Keys are frozenset of domains matched in the group.
Each group is independent and contains different data (unpaired).
"""

RawDomainGroupsDT: TypeAlias = dict[frozenset[str], RawDomainGroupDT]
RawDomainGroupsDT = dict[frozenset[str], RawDomainGroupDT]
"""
Mapping of `RawDomainGroupT`. Keys are frozenset of domains matched in the group.
Each group is independent and contains different data (unpaired).
This is a more specific version of `RawDomainGroupsT` used in method's outputs.
"""

ModelModeT: TypeAlias = Literal["train", "val", "test", "val/ood", "test/ood"]
ModelModeT = Literal["train", "val", "test", "val/ood", "test/ood"]
"""Mode used by pytorch lightning.
"""

0 comments on commit 210f9af

Please sign in to comment.