Skip to content

Commit

Permalink
fix small things, add docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
Kory Stiger committed Jul 29, 2021
1 parent ff9c6ba commit 0e6ffd9
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions zpy/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import sys
import time
from datetime import datetime, timedelta
from pathlib import Path
from typing import Dict, Union
from os import listdir
from os.path import join
from pathlib import Path
from typing import Dict
from typing import Union

import requests
from pydash import set_, unset, is_empty

Expand Down Expand Up @@ -195,24 +195,25 @@ def preview(dataset_config: DatasetConfig, num_samples=10):

@add_newline
def generate(
dataset_config: DatasetConfig,
num_datapoints: int = 10,
materialize: bool = False,
datapoint_callback=None,
dataset_config: DatasetConfig,
num_datapoints: int = 10,
materialize: bool = True,
datapoint_callback=None,
):
"""
Generate a dataset.
Args:
dataset_config: Specification for a Sim and its configurable parameters.
num_datapoints: Number of datapoints in the dataset. A datapoint is an instant in time composed of all
dataset_config (DatasetConfig): Specification for a Sim and its configurable parameters.
num_datapoints (int): Number of datapoints in the dataset. A datapoint is an instant in time composed of all
the output images (rgb, iseg, cseg, etc) along with the annotations.
materialize: Optionally download the dataset.
datapoint_callback (fn): Callback function to be called with every datapoint in the generated Dataset.
materialize (bool): Optionally download the dataset. Defaults to True.
Returns:
None
"""
hash = dataset_config.hash
sim_name = dataset_config._sim["name"]
internal_dataset_name = f"{sim_name}-{hash}-{num_datapoints}"
dataset_config_hash = dataset_config.hash
sim_name = dataset_config.sim["name"]
internal_dataset_name = f"{sim_name}-{dataset_config_hash}-{num_datapoints}"

filter_params = {"project": _project["id"], "name": internal_dataset_name}

Expand Down

0 comments on commit 0e6ffd9

Please sign in to comment.