Skip to content

Commit

Permalink
auto-commit-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jul 1, 2024
1 parent bfb1033 commit 6f00c7f
Show file tree
Hide file tree
Showing 19 changed files with 115 additions and 295 deletions.
15 changes: 14 additions & 1 deletion docs/vame-docs-app/docs/reference/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"reference/vame/analysis/generative_functions",
"reference/vame/analysis/gif_creator",
"reference/vame/analysis/pose_segmentation",
"reference/vame/analysis/segment_behavior",
"reference/vame/analysis/tree_hierarchy",
"reference/vame/analysis/umap_visualization",
"reference/vame/analysis/videowriter"
Expand All @@ -21,6 +20,13 @@
"label": "vame.initialize_project",
"type": "category"
},
{
"items": [
"reference/vame/logging/logger"
],
"label": "vame.logging",
"type": "category"
},
{
"items": [
"reference/vame/model/create_training",
Expand All @@ -32,6 +38,13 @@
"label": "vame.model",
"type": "category"
},
{
"items": [
"reference/vame/schemas/states"
],
"label": "vame.schemas",
"type": "category"
},
{
"items": [
"reference/vame/util/align_egocentrical",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ Perform UMAP embedding for given file and parameters.

```python
def umap_vis(cfg: dict, file: str, embed: np.ndarray,
community_labels_all: np.ndarray) -> None
community_labels_all: np.ndarray, save_path: str | None) -> None
```

Create plotly visualizaton of UMAP embedding.
Expand All @@ -297,6 +297,7 @@ Create plotly visualizaton of UMAP embedding.
- `file` _str_ - File path.
- `embed` _np.ndarray_ - UMAP embedding.
- `community_labels_all` _np.ndarray_ - Community labels.
- `save_path` - Path to save the plot. If None it will not save the plot.


**Returns**:
Expand All @@ -306,10 +307,13 @@ Create plotly visualizaton of UMAP embedding.
#### community

```python
@save_state(model=CommunityFunctionSchema)
def community(config: str,
cohort: bool = True,
show_umap: bool = False,
cut_tree: int = None) -> None
cut_tree: int | None = None,
save_umap_figure: bool = True,
save_logs: bool = False) -> None
```

Perform community analysis.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ Load PyTorch model.
#### generative\_model

```python
def generative_model(config: str, mode: str = "sampling") -> None
@save_state(model=GenerativeModelFunctionSchema)
def generative_model(config: str,
mode: str = "sampling",
save_logs: bool = False) -> plt.Figure
```

Generative model.
Expand All @@ -128,5 +131,5 @@ Generative model.

**Returns**:

None
- `plt.Figure` - Plot of generated samples.

Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def gif(
config: str,
pose_ref_index: int,
subtract_background: bool = True,
start: int = None,
start: int | None = None,
length: int = 500,
max_lag: int = 30,
label: str = 'community',
Expand All @@ -62,7 +62,7 @@ Create a GIF from the given configuration.
- `start` _int, optional_ - Starting index. Defaults to None.
- `length` _int, optional_ - Length of the video. Defaults to 500.
- `max_lag` _int, optional_ - Maximum lag. Defaults to 30.
- `label` _str, optional_ - Label type. Defaults to 'community'.
- `label` _str, optional_ - Label type [None, community, motif]. Defaults to 'community'.
- `file_format` _str, optional_ - File format. Defaults to '.mp4'.
- `crop_size` _Tuple[int, int], optional_ - Crop size. Defaults to (300,300).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ Load the VAME model.
#### embedd\_latent\_vectors

```python
def embedd_latent_vectors(cfg: dict, files: List[str], model: RNN_VAE,
fixed: bool) -> List[np.ndarray]
def embedd_latent_vectors(
cfg: dict, files: List[str], model: RNN_VAE, fixed: bool,
tqdm_stream: TqdmToLogger | None) -> List[np.ndarray]
```

Embed latent vectors for the given files using the VAME model.
Expand All @@ -44,6 +45,7 @@ Embed latent vectors for the given files using the VAME model.
- `files` _List[str]_ - List of files names.
- `model` _RNN_VAE_ - VAME model.
- `fixed` _bool_ - Whether the model is fixed.
- `tqdm_stream` _TqdmToLogger_ - TQDM Stream to redirect the tqdm output to logger.


**Returns**:
Expand Down Expand Up @@ -134,7 +136,8 @@ Apply individual parametrization to each animal.
#### pose\_segmentation

```python
def pose_segmentation(config: str) -> None
@save_state(model=PoseSegmentationFunctionSchema)
def pose_segmentation(config: str, save_logs: bool = False) -> None
```

Perform pose segmentation using the VAME model.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Licensed under GNU General Public License v3.0

```python
def hierarchy_pos(G: nx.Graph,
root: str = None,
root: str | None = None,
width: float = 0.5,
vert_gap: float = 0.2,
vert_loc: float = 0,
Expand Down Expand Up @@ -112,7 +112,7 @@ Draw a tree.
#### traverse\_tree

```python
def traverse_tree(T: nx.Graph, root_node: str = None) -> str
def traverse_tree(T: nx.Graph, root_node: str | None = None) -> str
```

Traverse a tree and return the traversal sequence.
Expand All @@ -130,7 +130,7 @@ Traverse a tree and return the traversal sequence.
#### traverse\_tree

```python
def traverse_tree(T: nx.Graph, root_node: str = None) -> str
def traverse_tree(T: nx.Graph, root_node: str | None = None) -> str
```

Traverse a tree and return the traversal sequence.
Expand All @@ -149,7 +149,7 @@ Traverse a tree and return the traversal sequence.

```python
def traverse_tree_cutline(T: nx.Graph,
root_node: str = None,
root_node: str | None = None,
cutline: int = 2) -> List[List[str]]
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ Visualize UMAP embedding with community labels.
#### visualization

```python
@save_state(model=VisualizationFunctionSchema)
def visualization(config: Union[str, Path],
label: Optional[str] = None) -> None
label: Optional[str] = None,
save_logs: bool = False) -> None
```

Visualize UMAP embeddings based on configuration settings.
Expand Down
23 changes: 18 additions & 5 deletions docs/vame-docs-app/docs/reference/vame/analysis/videowriter.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,14 @@ Licensed under GNU General Public License v3.0
#### get\_cluster\_vid

```python
def get_cluster_vid(cfg: dict, path_to_file: str, file: str, n_cluster: int,
videoType: str, flag: str) -> None
def get_cluster_vid(cfg: dict,
path_to_file: str,
file: str,
n_cluster: int,
videoType: str,
flag: str,
output_video_type: str = ".mp4",
tqdm_logger_stream: TqdmToLogger | None = None) -> None
```

Generate cluster videos.
Expand All @@ -25,7 +31,7 @@ Generate cluster videos.
- `path_to_file` _str_ - Path to the file.
- `file` _str_ - Name of the file.
- `n_cluster` _int_ - Number of clusters.
- `videoType` _str_ - Type of video.
- `videoType` _str_ - Type of input video.
- `flag` _str_ - Flag indicating the type of video (motif or community).


Expand All @@ -36,7 +42,11 @@ Generate cluster videos.
#### motif\_videos

```python
def motif_videos(config: Union[str, Path], videoType: str = '.mp4') -> None
@save_state(model=MotifVideosFunctionSchema)
def motif_videos(config: Union[str, Path],
videoType: str = '.mp4',
output_video_type: str = '.mp4',
save_logs: bool = False) -> None
```

Generate motif videos.
Expand All @@ -45,6 +55,7 @@ Generate motif videos.

- `config` _Union[str, Path]_ - Path to the configuration file.
- `videoType` _str, optional_ - Type of video. Default is '.mp4'.
- `output_video_type` _str, optional_ - Type of output video. Default is '.mp4'.


**Returns**:
Expand All @@ -54,8 +65,10 @@ Generate motif videos.
#### community\_videos

```python
@save_state(model=CommunityVideosFunctionSchema)
def community_videos(config: Union[str, Path],
videoType: str = '.mp4') -> None
videoType: str = '.mp4',
save_logs: bool = False) -> None
```

Generate community videos.
Expand Down
14 changes: 14 additions & 0 deletions docs/vame-docs-app/docs/reference/vame/logging/logger.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
sidebar_label: logger
title: vame.logging.logger
---

## TqdmToLogger Objects

```python
class TqdmToLogger(io.StringIO)
```

Output stream for TQDM which will output to logger module instead of
the StdOut.

14 changes: 10 additions & 4 deletions docs/vame-docs-app/docs/reference/vame/model/create_training.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,13 @@ Interpolates all NaN values in the given array.
#### plot\_check\_parameter

```python
def plot_check_parameter(cfg: dict, iqr_val: float, num_frames: int,
X_true: List[np.ndarray], X_med: np.ndarray,
anchor_1: int, anchor_2: int) -> None
def plot_check_parameter(cfg: dict,
iqr_val: float,
num_frames: int,
X_true: List[np.ndarray],
X_med: np.ndarray,
anchor_1: int | None = None,
anchor_2: int | None = None) -> None
```

Plot the check parameter - z-scored data and the filtered data.
Expand Down Expand Up @@ -124,9 +128,11 @@ Create training dataset for fixed data.
#### create\_trainset

```python
@save_state(model=CreateTrainsetFunctionSchema)
def create_trainset(config: str,
pose_ref_index: Optional[List] = None,
check_parameter: bool = False) -> None
check_parameter: bool = False,
save_logs: bool = False) -> None
```

Creates a training dataset for the VAME model.
Expand Down
4 changes: 2 additions & 2 deletions docs/vame-docs-app/docs/reference/vame/model/dataloader.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class SEQUENCE_DATASET(Dataset)
#### \_\_init\_\_

```python
def __init__(path_to_file: str, data: str, train: bool,
temporal_window: int) -> None
def __init__(path_to_file: str, data: str, train: bool, temporal_window: int,
**kwargs) -> None
```

Initialize the Sequence Dataset.
Expand Down
5 changes: 4 additions & 1 deletion docs/vame-docs-app/docs/reference/vame/model/evaluate.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ Evaluate the temporal aspects of the trained model.
#### evaluate\_model

```python
def evaluate_model(config: str, use_snapshots: bool = False) -> None
@save_state(model=EvaluateModelFunctionSchema)
def evaluate_model(config: str,
use_snapshots: bool = False,
save_logs: bool = False) -> None
```

Evaluate the trained model.
Expand Down
Loading

0 comments on commit 6f00c7f

Please sign in to comment.