Skip to content

Commit

Permalink
[DOCS-74] Fixes shortdocs (wandb#2094)
Browse files Browse the repository at this point in the history
Co-authored-by: ariG23498 <[email protected]>
  • Loading branch information
charlesfrye and ariG23498 authored Apr 22, 2021
1 parent def5409 commit e93ba2c
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 23 deletions.
25 changes: 16 additions & 9 deletions wandb/apis/public.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ def __repr__(self):


class Project(Attrs):
"""A project is a namespace for runs"""
"""A project is a namespace for runs."""

def __init__(self, client, entity, project, attrs):
super(Project, self).__init__(dict(attrs))
Expand Down Expand Up @@ -1401,15 +1401,20 @@ def __repr__(self):


class Sweep(Attrs):
"""A set of runs associated with a sweep
Instantiate with:
api.sweep(sweep_path)
"""A set of runs associated with a sweep.
Examples:
Instantiate with:
```
api = wandb.Api()
sweep = api.sweep(path/to/sweep)
```
Attributes:
runs (`Runs`): list of runs
id (str): sweep id
project (str): name of project
config (str): dictionary of sweep configuration
runs: (`Runs`) list of runs
id: (str) sweep id
project: (str) name of project
config: (str) dictionary of sweep configuration
"""

QUERY = gql(
Expand Down Expand Up @@ -1582,7 +1587,7 @@ def __repr__(self):


class Files(Paginator):
"""Files is an iterable collection of `File` objects."""
"""An iterable collection of `File` objects."""

QUERY = gql(
"""
Expand Down Expand Up @@ -2569,6 +2574,8 @@ def ref_url(self):

class Artifact(artifacts.Artifact):
"""
A wandb Artifact.
An artifact that has been logged, including all its attributes, links to the runs
that use it, and a link to the run that logged it.
Expand Down
3 changes: 2 additions & 1 deletion wandb/sdk/wandb_artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,12 @@ def __init__(self, entry: ArtifactEntry, obj: data_types.WBValue):

class Artifact(ArtifactInterface):
"""
Flexible and lightweight building block for dataset and model versioning.
Constructs an empty artifact whose contents can be populated using its
`add` family of functions. Once the artifact has all the desired files,
you can call `wandb.log_artifact()` to log it.
Arguments:
name: (str) A human-readable name for this artifact, which is how you
can identify this artifact in the UI or reference it in `use_artifact`
Expand Down
9 changes: 5 additions & 4 deletions wandb/sdk/wandb_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,12 @@ def join(self) -> None:

class Run(object):
"""
The run object corresponds to a single execution of your script,
typically this is an ML experiment. Create a run with `wandb.init()`.
A unit of computation logged by wandb. Typically this is an ML experiment.
In distributed training, use `wandb.init()` to create a run for each process,
and set the group argument to organize runs into a larger experiment.
Create a run with `wandb.init()`.
In distributed training, use `wandb.init()` to create a run for
each process, and set the group argument to organize runs into a larger experiment.
Currently there is a parallel Run object in the wandb.Api. Eventually these
two objects will be merged.
Expand Down
5 changes: 3 additions & 2 deletions wandb/sdk/wandb_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ def update(self, d: t.Dict):

class Summary(SummaryDict):
"""
Summary tracks single values for each run. By default, summary is set to the
last value of History.
Tracks single values for each metric for each run.
By default, a metric's summary is the last value of its History.
For example, `wandb.log({'accuracy': 0.9})` will add a new step to History and
update Summary to the latest value. In some cases, it's more useful to have
Expand Down
3 changes: 2 additions & 1 deletion wandb/sdk_py27/wandb_artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,12 @@ def __init__(self, entry, obj):

class Artifact(ArtifactInterface):
"""
Flexible and lightweight building block for dataset and model versioning.
Constructs an empty artifact whose contents can be populated using its
`add` family of functions. Once the artifact has all the desired files,
you can call `wandb.log_artifact()` to log it.
Arguments:
name: (str) A human-readable name for this artifact, which is how you
can identify this artifact in the UI or reference it in `use_artifact`
Expand Down
9 changes: 5 additions & 4 deletions wandb/sdk_py27/wandb_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,12 @@ def join(self):

class Run(object):
"""
The run object corresponds to a single execution of your script,
typically this is an ML experiment. Create a run with `wandb.init()`.
A unit of computation logged by wandb. Typically this is an ML experiment.
In distributed training, use `wandb.init()` to create a run for each process,
and set the group argument to organize runs into a larger experiment.
Create a run with `wandb.init()`.
In distributed training, use `wandb.init()` to create a run for
each process, and set the group argument to organize runs into a larger experiment.
Currently there is a parallel Run object in the wandb.Api. Eventually these
two objects will be merged.
Expand Down
5 changes: 3 additions & 2 deletions wandb/sdk_py27/wandb_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ def update(self, d):

class Summary(SummaryDict):
"""
Summary tracks single values for each run. By default, summary is set to the
last value of History.
Tracks single values for each metric for each run.
By default, a metric's summary is the last value of its History.
For example, `wandb.log({'accuracy': 0.9})` will add a new step to History and
update Summary to the latest value. In some cases, it's more useful to have
Expand Down

0 comments on commit e93ba2c

Please sign in to comment.