tfds.core.Version
Stay organized with collections
Save and categorize content based on your preferences.
Dataset version MAJOR.MINOR.PATCH.
tfds.core.Version(
version: Union[Version, str],
experiments=None,
tfds_version_to_prepare=None
)
Args |
version
|
string. Eg: "1.2.3".
|
experiments
|
dict of experiments. See Experiment.
|
tfds_version_to_prepare
|
string, defaults to None. If set, indicates that
current version of TFDS cannot be used to download_and_prepare the
dataset, but that TFDS at version {tfds_version_to_prepare} should be
used instead.
|
Methods
implements
View source
implements(
experiment
)
Returns True if version implements given experiment.
is_valid
View source
@classmethod
is_valid(
version: str
) -> bool
Returns True if the version can be parsed.
match
View source
match(
other_version
) -> bool
Returns True if other_version matches.
Args |
other_version
|
string, of the form "x[.y[.x]]" where {x,y,z} can be a
number or a wildcard.
|
__eq__
View source
__eq__(
other
)
Return self==value.
__ge__
View source
__ge__(
other
)
Return self>=value.
__gt__
View source
__gt__(
other
)
Return self>value.
__le__
View source
__le__(
other
)
Return self<=value.
__lt__
View source
__lt__(
other
)
Return self<value.
__ne__
View source
__ne__(
other
)
Return self!=value.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-26 UTC.
[null,null,["Last updated 2024-04-26 UTC."],[],[],null,["# tfds.core.Version\n\n\u003cbr /\u003e\n\n|--------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/datasets/blob/v4.9.3/tensorflow_datasets/core/utils/version.py#L51-L163) |\n\nDataset version MAJOR.MINOR.PATCH. \n\n tfds.core.Version(\n version: Union[Version, str],\n experiments=None,\n tfds_version_to_prepare=None\n )\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|---------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `version` | string. Eg: \"1.2.3\". |\n| `experiments` | dict of experiments. See Experiment. |\n| `tfds_version_to_prepare` | string, defaults to None. If set, indicates that current version of TFDS cannot be used to `download_and_prepare` the dataset, but that TFDS at version {tfds_version_to_prepare} should be used instead. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ---------- ||\n|---------|---------------|\n| `tuple` | \u003cbr /\u003e \u003cbr /\u003e |\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `implements`\n\n[View source](https://github.com/tensorflow/datasets/blob/v4.9.3/tensorflow_datasets/core/utils/version.py#L93-L95) \n\n implements(\n experiment\n )\n\nReturns True if version implements given experiment.\n\n### `is_valid`\n\n[View source](https://github.com/tensorflow/datasets/blob/v4.9.3/tensorflow_datasets/core/utils/version.py#L157-L163) \n\n @classmethod\n is_valid(\n version: str\n ) -\u003e bool\n\nReturns True if the version can be parsed.\n\n### `match`\n\n[View source](https://github.com/tensorflow/datasets/blob/v4.9.3/tensorflow_datasets/core/utils/version.py#L143-L155) \n\n match(\n other_version\n ) -\u003e bool\n\nReturns True if other_version matches.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|-----------------|----------------------------------------------------------------------------------|\n| `other_version` | string, of the form \"x\\[.y\\[.x\\]\\]\" where {x,y,z} can be a number or a wildcard. |\n\n\u003cbr /\u003e\n\n### `__eq__`\n\n[View source](https://github.com/tensorflow/datasets/blob/v4.9.3/tensorflow_datasets/core/utils/version.py#L116-L118) \n\n __eq__(\n other\n )\n\nReturn self==value.\n\n### `__ge__`\n\n[View source](https://github.com/tensorflow/datasets/blob/v4.9.3/tensorflow_datasets/core/utils/version.py#L136-L138) \n\n __ge__(\n other\n )\n\nReturn self\\\u003e=value.\n\n### `__gt__`\n\n[View source](https://github.com/tensorflow/datasets/blob/v4.9.3/tensorflow_datasets/core/utils/version.py#L132-L134) \n\n __gt__(\n other\n )\n\nReturn self\\\u003evalue.\n\n### `__le__`\n\n[View source](https://github.com/tensorflow/datasets/blob/v4.9.3/tensorflow_datasets/core/utils/version.py#L128-L130) \n\n __le__(\n other\n )\n\nReturn self\\\u003c=value.\n\n### `__lt__`\n\n[View source](https://github.com/tensorflow/datasets/blob/v4.9.3/tensorflow_datasets/core/utils/version.py#L124-L126) \n\n __lt__(\n other\n )\n\nReturn self\\\u003cvalue.\n\n### `__ne__`\n\n[View source](https://github.com/tensorflow/datasets/blob/v4.9.3/tensorflow_datasets/core/utils/version.py#L120-L122) \n\n __ne__(\n other\n )\n\nReturn self!=value."]]