Skip to content

Commit

Permalink
Merge pull request #3952 from voxel51/docs-bugfixes
Browse files Browse the repository at this point in the history
Docs bugfixes
  • Loading branch information
findtopher authored Dec 21, 2023
2 parents 6b67c2b + c8a1f67 commit aa1e5d6
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 36 deletions.
2 changes: 1 addition & 1 deletion docs/source/teams/dataset_versioning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ method in the Management SDK:
.. _dataset-versioning-unarchive-snapshot:

Unarchive snapshot
----------------
------------------

To make an archived snapshot browseable again, users with Can Manage
permissions to the dataset can unarchive it via the UI or Management SDK.
Expand Down
1 change: 1 addition & 0 deletions docs/theme/pytorch_sphinx_theme/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
{% block footer %}
<script type="text/javascript" src="{{ pathto('_static/searchtools.js', 1) }}" defer></script>
<script type="text/javascript" src="{{ pathto('searchindex.js', 1) }}" defer></script>
<script type="text/javascript" src="{{ pathto('_static/language_data.js', 1) }}"></script>
{{ super() }}
{% endblock %}
{% block body %}
Expand Down
83 changes: 48 additions & 35 deletions fiftyone/core/odm/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class ColorScheme(EmbeddedDocument):
import fiftyone as fo
import fiftyone.zoo as foz
dataset=foz.load_zoo_dataset("quickstart")
dataset = foz.load_zoo_dataset("quickstart")
# Store a custom color scheme for a dataset
dataset.app_config.color_scheme = fo.ColorScheme(
Expand Down Expand Up @@ -222,54 +222,67 @@ class ColorScheme(EmbeddedDocument):
],
default_colorscale={"name": "sunset", "list": None},
)
session = fo.launch_app(dataset)
Args:
color_by (None): an option that annotations can be colored by "field",
"value" or "instance"
color_by (None): whether annotations should be colored by ``"field"``,
``"value"``, or ``"instance"``
color_pool (None): an optional list of colors to use as a color pool
for this dataset
multicolor_keypoints (None): whether to use multiple colors for
keypoints
opacity (None): transparency of the annotation, between 0 and 1
show_skeletons (None): whether to show skeletons of keypoints
fields (None): an optional list of per-field custom colors.
- `path` (required): the fully-qualified path to the field you're
customizing
- `fieldColor` (optional): a color to assign to the field in the
App sidebar
- `colorByAttribute` (optional): the attribute to use to assign
fields (None): an optional list of dicts of per-field custom colors
with the following keys:
- ``path`` (required): the fully-qualified path to the field
you're customizing
- ``fieldColor`` (optional): a color to assign to the field in
the App sidebar
- ``colorByAttribute`` (optional): the attribute to use to assign
per-value colors. Only applicable when the field is an embedded
document
- `valueColors` (optional): a list of dicts specifying colors to
use for individual values of this field
- `maskTargetsColors` (optional): a list of dicts specifying
- ``valueColors`` (optional): a list of dicts specifying colors
to use for individual values of this field
- ``maskTargetsColors`` (optional): a list of dicts specifying
index and color for 2D masks
default_mask_targets_colors (None): a list of dicts specifying index
and color for 2D masks of the dataset. If a field does not have
field specific mask targets colors, this list will be used.
- `intTarget`: integer target value
- `color`: a color string
default_colorscale (None): dataset default colorscale
- `name` (optional): a named plotly colorscale, e.g. "hsv".
See https://plotly.com/python/builtin-colorscales/
- `list` (optional): a list of dicts of colorscale values
- `value`: a float number between 0 and 1. A valid list must
have have colors defined for 0 and 1.
- `color`: a rgb color string.
colorscales (None): an optional list of per-field custom colorscale
- `path` (required): the fully-qualified path to the field you're
customizing. use "dataset" if you are setting the default
colorscale for dataset
- `name` (optional): a named colorscale plotly recognizes
- `list` (optional): a list of dicts of colorscale values
- `value`: a float number between 0 and 1. A valid list must
have have colors defined for 0 and 1.
- `color`: a rgb color string.
default_mask_targets_colors (None): a list of dicts with the following
keys specifying index and color for 2D masks of the dataset. If a
field does not have field specific mask targets colors, this list
will be used:
- ``intTarget``: integer target value
- ``color``: a color string
default_colorscale (None): dataset default colorscale dict with the
following keys:
- ``name`` (optional): a named plotly colorscale, e.g. ``"hsv"``.
See https://plotly.com/python/builtin-colorscales
- ``list`` (optional): a list of dicts of colorscale values
- ``value``: a float number between 0 and 1. A valid list
must have have colors defined for 0 and 1
- ``color``: an rgb color string
colorscales (None): an optional list of dicts of per-field custom
colorscales with the following keys:
- ``path`` (required): the fully-qualified path to the field
you're customizing. use "dataset" if you are setting the
default colorscale for dataset
- ``name`` (optional): a named colorscale plotly recognizes
- ``list`` (optional): a list of dicts of colorscale values with
the following keys:
- ``value``: a float number between 0 and 1. A valid list
must have have colors defined for 0 and 1
- ``color``: an rgb color string
label_tags (None): an optional dict specifying custom colors for label
tags with the following keys:
- `fieldColor` (optional): a color to assign to all label tags
- `valueColors` (optional): a list of dicts
- ``fieldColor`` (optional): a color to assign to all label tags
- ``valueColors`` (optional): a list of dicts
"""

# strict=False lets this class ignore unknown fields from other versions
Expand Down

0 comments on commit aa1e5d6

Please sign in to comment.