repo stringlengths 7 54 | path stringlengths 4 223 | func_name stringlengths 1 134 | original_string stringlengths 75 104k | language stringclasses 1
value | code stringlengths 75 104k | code_tokens listlengths 20 28.4k | docstring stringlengths 1 46.3k | docstring_tokens listlengths 1 1.66k | sha stringlengths 40 40 | url stringlengths 87 315 | partition stringclasses 1
value | summary stringlengths 4 350 | obf_code stringlengths 7.85k 764k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tensorflow/tensorboard | tensorboard/plugins/graph/graphs_plugin.py | GraphsPlugin.graph_route | def graph_route(self, request):
"""Given a single run, return the graph definition in protobuf format."""
run = request.args.get('run')
tag = request.args.get('tag', '')
conceptual_arg = request.args.get('conceptual', False)
is_conceptual = True if conceptual_arg == 'true' else False
if run is ... | python | def graph_route(self, request):
"""Given a single run, return the graph definition in protobuf format."""
run = request.args.get('run')
tag = request.args.get('tag', '')
conceptual_arg = request.args.get('conceptual', False)
is_conceptual = True if conceptual_arg == 'true' else False
if run is ... | [
"def",
"graph_route",
"(",
"self",
",",
"request",
")",
":",
"run",
"=",
"request",
".",
"args",
".",
"get",
"(",
"'run'",
")",
"tag",
"=",
"request",
".",
"args",
".",
"get",
"(",
"'tag'",
",",
"''",
")",
"conceptual_arg",
"=",
"request",
".",
"ar... | Given a single run, return the graph definition in protobuf format. | [
"Given",
"a",
"single",
"run",
"return",
"the",
"graph",
"definition",
"in",
"protobuf",
"format",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/graph/graphs_plugin.py#L195-L227 | train | Given a single run return the graph definition in protobuf format. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/graph/graphs_plugin.py | GraphsPlugin.run_metadata_route | def run_metadata_route(self, request):
"""Given a tag and a run, return the session.run() metadata."""
tag = request.args.get('tag')
run = request.args.get('run')
if tag is None:
return http_util.Respond(
request, 'query parameter "tag" is required', 'text/plain', 400)
if run is None... | python | def run_metadata_route(self, request):
"""Given a tag and a run, return the session.run() metadata."""
tag = request.args.get('tag')
run = request.args.get('run')
if tag is None:
return http_util.Respond(
request, 'query parameter "tag" is required', 'text/plain', 400)
if run is None... | [
"def",
"run_metadata_route",
"(",
"self",
",",
"request",
")",
":",
"tag",
"=",
"request",
".",
"args",
".",
"get",
"(",
"'tag'",
")",
"run",
"=",
"request",
".",
"args",
".",
"get",
"(",
"'run'",
")",
"if",
"tag",
"is",
"None",
":",
"return",
"htt... | Given a tag and a run, return the session.run() metadata. | [
"Given",
"a",
"tag",
"and",
"a",
"run",
"return",
"the",
"session",
".",
"run",
"()",
"metadata",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/graph/graphs_plugin.py#L230-L246 | train | Given a tag and a run return the session. run() metadata. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/profile/profile_plugin_loader.py | ProfilePluginLoader.load | def load(self, context):
"""Returns the plugin, if possible.
Args:
context: The TBContext flags.
Returns:
A ProfilePlugin instance or None if it couldn't be loaded.
"""
try:
# pylint: disable=g-import-not-at-top,unused-import
import tensorflow
# Available in TensorFlo... | python | def load(self, context):
"""Returns the plugin, if possible.
Args:
context: The TBContext flags.
Returns:
A ProfilePlugin instance or None if it couldn't be loaded.
"""
try:
# pylint: disable=g-import-not-at-top,unused-import
import tensorflow
# Available in TensorFlo... | [
"def",
"load",
"(",
"self",
",",
"context",
")",
":",
"try",
":",
"# pylint: disable=g-import-not-at-top,unused-import",
"import",
"tensorflow",
"# Available in TensorFlow 1.14 or later, so do import check",
"# pylint: disable=g-import-not-at-top,unused-import",
"from",
"tensorflow",... | Returns the plugin, if possible.
Args:
context: The TBContext flags.
Returns:
A ProfilePlugin instance or None if it couldn't be loaded. | [
"Returns",
"the",
"plugin",
"if",
"possible",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/profile/profile_plugin_loader.py#L42-L61 | train | Returns the plugin if possible. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/hparams/hparams_demo.py | model_fn | def model_fn(hparams, seed):
"""Create a Keras model with the given hyperparameters.
Args:
hparams: A dict mapping hyperparameters in `HPARAMS` to values.
seed: A hashable object to be used as a random seed (e.g., to
construct dropout layers in the model).
Returns:
A compiled Keras model.
""... | python | def model_fn(hparams, seed):
"""Create a Keras model with the given hyperparameters.
Args:
hparams: A dict mapping hyperparameters in `HPARAMS` to values.
seed: A hashable object to be used as a random seed (e.g., to
construct dropout layers in the model).
Returns:
A compiled Keras model.
""... | [
"def",
"model_fn",
"(",
"hparams",
",",
"seed",
")",
":",
"rng",
"=",
"random",
".",
"Random",
"(",
"seed",
")",
"model",
"=",
"tf",
".",
"keras",
".",
"models",
".",
"Sequential",
"(",
")",
"model",
".",
"add",
"(",
"tf",
".",
"keras",
".",
"lay... | Create a Keras model with the given hyperparameters.
Args:
hparams: A dict mapping hyperparameters in `HPARAMS` to values.
seed: A hashable object to be used as a random seed (e.g., to
construct dropout layers in the model).
Returns:
A compiled Keras model. | [
"Create",
"a",
"Keras",
"model",
"with",
"the",
"given",
"hyperparameters",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/hparams/hparams_demo.py#L115-L161 | train | Create a Keras model with the given hyperparameters. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/hparams/hparams_demo.py | run | def run(data, base_logdir, session_id, group_id, hparams):
"""Run a training/validation session.
Flags must have been parsed for this function to behave.
Args:
data: The data as loaded by `prepare_data()`.
base_logdir: The top-level logdir to which to write summary data.
session_id: A unique string ... | python | def run(data, base_logdir, session_id, group_id, hparams):
"""Run a training/validation session.
Flags must have been parsed for this function to behave.
Args:
data: The data as loaded by `prepare_data()`.
base_logdir: The top-level logdir to which to write summary data.
session_id: A unique string ... | [
"def",
"run",
"(",
"data",
",",
"base_logdir",
",",
"session_id",
",",
"group_id",
",",
"hparams",
")",
":",
"model",
"=",
"model_fn",
"(",
"hparams",
"=",
"hparams",
",",
"seed",
"=",
"session_id",
")",
"logdir",
"=",
"os",
".",
"path",
".",
"join",
... | Run a training/validation session.
Flags must have been parsed for this function to behave.
Args:
data: The data as loaded by `prepare_data()`.
base_logdir: The top-level logdir to which to write summary data.
session_id: A unique string ID for this session.
group_id: The string ID of the session ... | [
"Run",
"a",
"training",
"/",
"validation",
"session",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/hparams/hparams_demo.py#L164-L194 | train | Run a training or validation session. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/hparams/hparams_demo.py | prepare_data | def prepare_data():
"""Load and normalize data."""
((x_train, y_train), (x_test, y_test)) = DATASET.load_data()
x_train = x_train.astype("float32")
x_test = x_test.astype("float32")
x_train /= 255.0
x_test /= 255.0
return ((x_train, y_train), (x_test, y_test)) | python | def prepare_data():
"""Load and normalize data."""
((x_train, y_train), (x_test, y_test)) = DATASET.load_data()
x_train = x_train.astype("float32")
x_test = x_test.astype("float32")
x_train /= 255.0
x_test /= 255.0
return ((x_train, y_train), (x_test, y_test)) | [
"def",
"prepare_data",
"(",
")",
":",
"(",
"(",
"x_train",
",",
"y_train",
")",
",",
"(",
"x_test",
",",
"y_test",
")",
")",
"=",
"DATASET",
".",
"load_data",
"(",
")",
"x_train",
"=",
"x_train",
".",
"astype",
"(",
"\"float32\"",
")",
"x_test",
"=",... | Load and normalize data. | [
"Load",
"and",
"normalize",
"data",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/hparams/hparams_demo.py#L197-L204 | train | Load and normalize data. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/hparams/hparams_demo.py | run_all | def run_all(logdir, verbose=False):
"""Perform random search over the hyperparameter space.
Arguments:
logdir: The top-level directory into which to write data. This
directory should be empty or nonexistent.
verbose: If true, print out each run's name as it begins.
"""
data = prepare_data()
rng... | python | def run_all(logdir, verbose=False):
"""Perform random search over the hyperparameter space.
Arguments:
logdir: The top-level directory into which to write data. This
directory should be empty or nonexistent.
verbose: If true, print out each run's name as it begins.
"""
data = prepare_data()
rng... | [
"def",
"run_all",
"(",
"logdir",
",",
"verbose",
"=",
"False",
")",
":",
"data",
"=",
"prepare_data",
"(",
")",
"rng",
"=",
"random",
".",
"Random",
"(",
"0",
")",
"base_writer",
"=",
"tf",
".",
"summary",
".",
"create_file_writer",
"(",
"logdir",
")",... | Perform random search over the hyperparameter space.
Arguments:
logdir: The top-level directory into which to write data. This
directory should be empty or nonexistent.
verbose: If true, print out each run's name as it begins. | [
"Perform",
"random",
"search",
"over",
"the",
"hyperparameter",
"space",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/hparams/hparams_demo.py#L207-L249 | train | Perform random search over the hyperparameter space. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/hparams/hparams_demo.py | sample_uniform | def sample_uniform(domain, rng):
"""Sample a value uniformly from a domain.
Args:
domain: An `IntInterval`, `RealInterval`, or `Discrete` domain.
rng: A `random.Random` object; defaults to the `random` module.
Raises:
TypeError: If `domain` is not a known kind of domain.
IndexError: If the domai... | python | def sample_uniform(domain, rng):
"""Sample a value uniformly from a domain.
Args:
domain: An `IntInterval`, `RealInterval`, or `Discrete` domain.
rng: A `random.Random` object; defaults to the `random` module.
Raises:
TypeError: If `domain` is not a known kind of domain.
IndexError: If the domai... | [
"def",
"sample_uniform",
"(",
"domain",
",",
"rng",
")",
":",
"if",
"isinstance",
"(",
"domain",
",",
"hp",
".",
"IntInterval",
")",
":",
"return",
"rng",
".",
"randint",
"(",
"domain",
".",
"min_value",
",",
"domain",
".",
"max_value",
")",
"elif",
"i... | Sample a value uniformly from a domain.
Args:
domain: An `IntInterval`, `RealInterval`, or `Discrete` domain.
rng: A `random.Random` object; defaults to the `random` module.
Raises:
TypeError: If `domain` is not a known kind of domain.
IndexError: If the domain is empty. | [
"Sample",
"a",
"value",
"uniformly",
"from",
"a",
"domain",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/hparams/hparams_demo.py#L252-L270 | train | Sample a value uniformly from a domain. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/pr_curve/pr_curves_plugin.py | PrCurvesPlugin.pr_curves_route | def pr_curves_route(self, request):
"""A route that returns a JSON mapping between runs and PR curve data.
Returns:
Given a tag and a comma-separated list of runs (both stored within GET
parameters), fetches a JSON object that maps between run name and objects
containing data required for PR ... | python | def pr_curves_route(self, request):
"""A route that returns a JSON mapping between runs and PR curve data.
Returns:
Given a tag and a comma-separated list of runs (both stored within GET
parameters), fetches a JSON object that maps between run name and objects
containing data required for PR ... | [
"def",
"pr_curves_route",
"(",
"self",
",",
"request",
")",
":",
"runs",
"=",
"request",
".",
"args",
".",
"getlist",
"(",
"'run'",
")",
"if",
"not",
"runs",
":",
"return",
"http_util",
".",
"Respond",
"(",
"request",
",",
"'No runs provided when fetching PR... | A route that returns a JSON mapping between runs and PR curve data.
Returns:
Given a tag and a comma-separated list of runs (both stored within GET
parameters), fetches a JSON object that maps between run name and objects
containing data required for PR curves for that run. Runs that either
... | [
"A",
"route",
"that",
"returns",
"a",
"JSON",
"mapping",
"between",
"runs",
"and",
"PR",
"curve",
"data",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/pr_curve/pr_curves_plugin.py#L47-L72 | train | A route that returns a JSON mapping between runs and PR curves data. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/pr_curve/pr_curves_plugin.py | PrCurvesPlugin.pr_curves_impl | def pr_curves_impl(self, runs, tag):
"""Creates the JSON object for the PR curves response for a run-tag combo.
Arguments:
runs: A list of runs to fetch the curves for.
tag: The tag to fetch the curves for.
Raises:
ValueError: If no PR curves could be fetched for a run and tag.
Retu... | python | def pr_curves_impl(self, runs, tag):
"""Creates the JSON object for the PR curves response for a run-tag combo.
Arguments:
runs: A list of runs to fetch the curves for.
tag: The tag to fetch the curves for.
Raises:
ValueError: If no PR curves could be fetched for a run and tag.
Retu... | [
"def",
"pr_curves_impl",
"(",
"self",
",",
"runs",
",",
"tag",
")",
":",
"if",
"self",
".",
"_db_connection_provider",
":",
"# Serve data from the database.",
"db",
"=",
"self",
".",
"_db_connection_provider",
"(",
")",
"# We select for steps greater than -1 because the... | Creates the JSON object for the PR curves response for a run-tag combo.
Arguments:
runs: A list of runs to fetch the curves for.
tag: The tag to fetch the curves for.
Raises:
ValueError: If no PR curves could be fetched for a run and tag.
Returns:
The JSON object for the PR curves... | [
"Creates",
"the",
"JSON",
"object",
"for",
"the",
"PR",
"curves",
"response",
"for",
"a",
"run",
"-",
"tag",
"combo",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/pr_curve/pr_curves_plugin.py#L74-L143 | train | Creates the JSON object for the PR curves route response for a given run and tag. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/pr_curve/pr_curves_plugin.py | PrCurvesPlugin.tags_impl | def tags_impl(self):
"""Creates the JSON object for the tags route response.
Returns:
The JSON object for the tags route response.
"""
if self._db_connection_provider:
# Read tags from the database.
db = self._db_connection_provider()
cursor = db.execute('''
SELECT
... | python | def tags_impl(self):
"""Creates the JSON object for the tags route response.
Returns:
The JSON object for the tags route response.
"""
if self._db_connection_provider:
# Read tags from the database.
db = self._db_connection_provider()
cursor = db.execute('''
SELECT
... | [
"def",
"tags_impl",
"(",
"self",
")",
":",
"if",
"self",
".",
"_db_connection_provider",
":",
"# Read tags from the database.",
"db",
"=",
"self",
".",
"_db_connection_provider",
"(",
")",
"cursor",
"=",
"db",
".",
"execute",
"(",
"'''\n SELECT\n Tag... | Creates the JSON object for the tags route response.
Returns:
The JSON object for the tags route response. | [
"Creates",
"the",
"JSON",
"object",
"for",
"the",
"tags",
"route",
"response",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/pr_curve/pr_curves_plugin.py#L175-L218 | train | Creates the JSON object for the tags route response. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/pr_curve/pr_curves_plugin.py | PrCurvesPlugin.available_time_entries_impl | def available_time_entries_impl(self):
"""Creates the JSON object for the available time entries route response.
Returns:
The JSON object for the available time entries route response.
"""
result = {}
if self._db_connection_provider:
db = self._db_connection_provider()
# For each ... | python | def available_time_entries_impl(self):
"""Creates the JSON object for the available time entries route response.
Returns:
The JSON object for the available time entries route response.
"""
result = {}
if self._db_connection_provider:
db = self._db_connection_provider()
# For each ... | [
"def",
"available_time_entries_impl",
"(",
"self",
")",
":",
"result",
"=",
"{",
"}",
"if",
"self",
".",
"_db_connection_provider",
":",
"db",
"=",
"self",
".",
"_db_connection_provider",
"(",
")",
"# For each run, pick a tag.",
"cursor",
"=",
"db",
".",
"execut... | Creates the JSON object for the available time entries route response.
Returns:
The JSON object for the available time entries route response. | [
"Creates",
"the",
"JSON",
"object",
"for",
"the",
"available",
"time",
"entries",
"route",
"response",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/pr_curve/pr_curves_plugin.py#L231-L284 | train | Creates the JSON object for the available time entries route response. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/pr_curve/pr_curves_plugin.py | PrCurvesPlugin.is_active | def is_active(self):
"""Determines whether this plugin is active.
This plugin is active only if PR curve summary data is read by TensorBoard.
Returns:
Whether this plugin is active.
"""
if self._db_connection_provider:
# The plugin is active if one relevant tag can be found in the data... | python | def is_active(self):
"""Determines whether this plugin is active.
This plugin is active only if PR curve summary data is read by TensorBoard.
Returns:
Whether this plugin is active.
"""
if self._db_connection_provider:
# The plugin is active if one relevant tag can be found in the data... | [
"def",
"is_active",
"(",
"self",
")",
":",
"if",
"self",
".",
"_db_connection_provider",
":",
"# The plugin is active if one relevant tag can be found in the database.",
"db",
"=",
"self",
".",
"_db_connection_provider",
"(",
")",
"cursor",
"=",
"db",
".",
"execute",
... | Determines whether this plugin is active.
This plugin is active only if PR curve summary data is read by TensorBoard.
Returns:
Whether this plugin is active. | [
"Determines",
"whether",
"this",
"plugin",
"is",
"active",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/pr_curve/pr_curves_plugin.py#L314-L341 | train | Determines whether this plugin is active. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/pr_curve/pr_curves_plugin.py | PrCurvesPlugin._process_tensor_event | def _process_tensor_event(self, event, thresholds):
"""Converts a TensorEvent into a dict that encapsulates information on it.
Args:
event: The TensorEvent to convert.
thresholds: An array of floats that ranges from 0 to 1 (in that
direction and inclusive of 0 and 1).
Returns:
A ... | python | def _process_tensor_event(self, event, thresholds):
"""Converts a TensorEvent into a dict that encapsulates information on it.
Args:
event: The TensorEvent to convert.
thresholds: An array of floats that ranges from 0 to 1 (in that
direction and inclusive of 0 and 1).
Returns:
A ... | [
"def",
"_process_tensor_event",
"(",
"self",
",",
"event",
",",
"thresholds",
")",
":",
"return",
"self",
".",
"_make_pr_entry",
"(",
"event",
".",
"step",
",",
"event",
".",
"wall_time",
",",
"tensor_util",
".",
"make_ndarray",
"(",
"event",
".",
"tensor_pr... | Converts a TensorEvent into a dict that encapsulates information on it.
Args:
event: The TensorEvent to convert.
thresholds: An array of floats that ranges from 0 to 1 (in that
direction and inclusive of 0 and 1).
Returns:
A JSON-able dictionary of PR curve data for 1 step. | [
"Converts",
"a",
"TensorEvent",
"into",
"a",
"dict",
"that",
"encapsulates",
"information",
"on",
"it",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/pr_curve/pr_curves_plugin.py#L343-L358 | train | Converts a TensorEvent into a dictionary that encapsulates information on it. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/pr_curve/pr_curves_plugin.py | PrCurvesPlugin._make_pr_entry | def _make_pr_entry(self, step, wall_time, data_array, thresholds):
"""Creates an entry for PR curve data. Each entry corresponds to 1 step.
Args:
step: The step.
wall_time: The wall time.
data_array: A numpy array of PR curve data stored in the summary format.
thresholds: An array of fl... | python | def _make_pr_entry(self, step, wall_time, data_array, thresholds):
"""Creates an entry for PR curve data. Each entry corresponds to 1 step.
Args:
step: The step.
wall_time: The wall time.
data_array: A numpy array of PR curve data stored in the summary format.
thresholds: An array of fl... | [
"def",
"_make_pr_entry",
"(",
"self",
",",
"step",
",",
"wall_time",
",",
"data_array",
",",
"thresholds",
")",
":",
"# Trim entries for which TP + FP = 0 (precision is undefined) at the tail of",
"# the data.",
"true_positives",
"=",
"[",
"int",
"(",
"v",
")",
"for",
... | Creates an entry for PR curve data. Each entry corresponds to 1 step.
Args:
step: The step.
wall_time: The wall time.
data_array: A numpy array of PR curve data stored in the summary format.
thresholds: An array of floating point thresholds.
Returns:
A PR curve entry. | [
"Creates",
"an",
"entry",
"for",
"PR",
"curve",
"data",
".",
"Each",
"entry",
"corresponds",
"to",
"1",
"step",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/pr_curve/pr_curves_plugin.py#L360-L399 | train | Creates an entry for PR curve data. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/hparams/api.py | _normalize_hparams | def _normalize_hparams(hparams):
"""Normalize a dict keyed by `HParam`s and/or raw strings.
Args:
hparams: A `dict` whose keys are `HParam` objects and/or strings
representing hyperparameter names, and whose values are
hyperparameter values. No two keys may have the same name.
Returns:
A `di... | python | def _normalize_hparams(hparams):
"""Normalize a dict keyed by `HParam`s and/or raw strings.
Args:
hparams: A `dict` whose keys are `HParam` objects and/or strings
representing hyperparameter names, and whose values are
hyperparameter values. No two keys may have the same name.
Returns:
A `di... | [
"def",
"_normalize_hparams",
"(",
"hparams",
")",
":",
"result",
"=",
"{",
"}",
"for",
"(",
"k",
",",
"v",
")",
"in",
"six",
".",
"iteritems",
"(",
"hparams",
")",
":",
"if",
"isinstance",
"(",
"k",
",",
"HParam",
")",
":",
"k",
"=",
"k",
".",
... | Normalize a dict keyed by `HParam`s and/or raw strings.
Args:
hparams: A `dict` whose keys are `HParam` objects and/or strings
representing hyperparameter names, and whose values are
hyperparameter values. No two keys may have the same name.
Returns:
A `dict` whose keys are hyperparameter name... | [
"Normalize",
"a",
"dict",
"keyed",
"by",
"HParam",
"s",
"and",
"/",
"or",
"raw",
"strings",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/hparams/api.py#L491-L514 | train | Normalizes a dict keyed by HParam s and raw strings. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/hparams/api.py | Experiment.summary_pb | def summary_pb(self):
"""Create a top-level experiment summary describing this experiment.
The resulting summary should be written to a log directory that
encloses all the individual sessions' log directories.
Analogous to the low-level `experiment_pb` function in the
`hparams.summary` module.
... | python | def summary_pb(self):
"""Create a top-level experiment summary describing this experiment.
The resulting summary should be written to a log directory that
encloses all the individual sessions' log directories.
Analogous to the low-level `experiment_pb` function in the
`hparams.summary` module.
... | [
"def",
"summary_pb",
"(",
"self",
")",
":",
"hparam_infos",
"=",
"[",
"]",
"for",
"hparam",
"in",
"self",
".",
"_hparams",
":",
"info",
"=",
"api_pb2",
".",
"HParamInfo",
"(",
"name",
"=",
"hparam",
".",
"name",
",",
"description",
"=",
"hparam",
".",
... | Create a top-level experiment summary describing this experiment.
The resulting summary should be written to a log directory that
encloses all the individual sessions' log directories.
Analogous to the low-level `experiment_pb` function in the
`hparams.summary` module. | [
"Create",
"a",
"top",
"-",
"level",
"experiment",
"summary",
"describing",
"this",
"experiment",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/hparams/api.py#L90-L117 | train | Create a top - level experiment summary describing this experiment. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/histogram/histograms_demo.py | run_all | def run_all(logdir, verbose=False, num_summaries=400):
"""Generate a bunch of histogram data, and write it to logdir."""
del verbose
tf.compat.v1.set_random_seed(0)
k = tf.compat.v1.placeholder(tf.float32)
# Make a normal distribution, with a shifting mean
mean_moving_normal = tf.random.normal(shape=[100... | python | def run_all(logdir, verbose=False, num_summaries=400):
"""Generate a bunch of histogram data, and write it to logdir."""
del verbose
tf.compat.v1.set_random_seed(0)
k = tf.compat.v1.placeholder(tf.float32)
# Make a normal distribution, with a shifting mean
mean_moving_normal = tf.random.normal(shape=[100... | [
"def",
"run_all",
"(",
"logdir",
",",
"verbose",
"=",
"False",
",",
"num_summaries",
"=",
"400",
")",
":",
"del",
"verbose",
"tf",
".",
"compat",
".",
"v1",
".",
"set_random_seed",
"(",
"0",
")",
"k",
"=",
"tf",
".",
"compat",
".",
"v1",
".",
"plac... | Generate a bunch of histogram data, and write it to logdir. | [
"Generate",
"a",
"bunch",
"of",
"histogram",
"data",
"and",
"write",
"it",
"to",
"logdir",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/histogram/histograms_demo.py#L32-L103 | train | Generate a bunch of histogram data and write it to logdir. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/projector/projector_plugin.py | _parse_positive_int_param | def _parse_positive_int_param(request, param_name):
"""Parses and asserts a positive (>0) integer query parameter.
Args:
request: The Werkzeug Request object
param_name: Name of the parameter.
Returns:
Param, or None, or -1 if parameter is not a positive integer.
"""
param = request.args.get(par... | python | def _parse_positive_int_param(request, param_name):
"""Parses and asserts a positive (>0) integer query parameter.
Args:
request: The Werkzeug Request object
param_name: Name of the parameter.
Returns:
Param, or None, or -1 if parameter is not a positive integer.
"""
param = request.args.get(par... | [
"def",
"_parse_positive_int_param",
"(",
"request",
",",
"param_name",
")",
":",
"param",
"=",
"request",
".",
"args",
".",
"get",
"(",
"param_name",
")",
"if",
"not",
"param",
":",
"return",
"None",
"try",
":",
"param",
"=",
"int",
"(",
"param",
")",
... | Parses and asserts a positive (>0) integer query parameter.
Args:
request: The Werkzeug Request object
param_name: Name of the parameter.
Returns:
Param, or None, or -1 if parameter is not a positive integer. | [
"Parses",
"and",
"asserts",
"a",
"positive",
"(",
">",
"0",
")",
"integer",
"query",
"parameter",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/projector/projector_plugin.py#L189-L208 | train | Parses and asserts a positive integer query parameter. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/projector/projector_plugin.py | ProjectorPlugin.is_active | def is_active(self):
"""Determines whether this plugin is active.
This plugin is only active if any run has an embedding.
Returns:
Whether any run has embedding data to show in the projector.
"""
if not self.multiplexer:
return False
if self._is_active:
# We have already det... | python | def is_active(self):
"""Determines whether this plugin is active.
This plugin is only active if any run has an embedding.
Returns:
Whether any run has embedding data to show in the projector.
"""
if not self.multiplexer:
return False
if self._is_active:
# We have already det... | [
"def",
"is_active",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"multiplexer",
":",
"return",
"False",
"if",
"self",
".",
"_is_active",
":",
"# We have already determined that the projector plugin should be active.",
"# Do not re-compute that. We have no reason to later ... | Determines whether this plugin is active.
This plugin is only active if any run has an embedding.
Returns:
Whether any run has embedding data to show in the projector. | [
"Determines",
"whether",
"this",
"plugin",
"is",
"active",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/projector/projector_plugin.py#L267-L297 | train | Determines whether this projector plugin is active. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/projector/projector_plugin.py | ProjectorPlugin.configs | def configs(self):
"""Returns a map of run paths to `ProjectorConfig` protos."""
run_path_pairs = list(self.run_paths.items())
self._append_plugin_asset_directories(run_path_pairs)
# If there are no summary event files, the projector should still work,
# treating the `logdir` as the model checkpoint... | python | def configs(self):
"""Returns a map of run paths to `ProjectorConfig` protos."""
run_path_pairs = list(self.run_paths.items())
self._append_plugin_asset_directories(run_path_pairs)
# If there are no summary event files, the projector should still work,
# treating the `logdir` as the model checkpoint... | [
"def",
"configs",
"(",
"self",
")",
":",
"run_path_pairs",
"=",
"list",
"(",
"self",
".",
"run_paths",
".",
"items",
"(",
")",
")",
"self",
".",
"_append_plugin_asset_directories",
"(",
"run_path_pairs",
")",
"# If there are no summary event files, the projector shoul... | Returns a map of run paths to `ProjectorConfig` protos. | [
"Returns",
"a",
"map",
"of",
"run",
"paths",
"to",
"ProjectorConfig",
"protos",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/projector/projector_plugin.py#L311-L325 | train | Returns a map of run paths to ProjectorConfig protos. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/backend/event_processing/event_multiplexer.py | EventMultiplexer.Reload | def Reload(self):
"""Call `Reload` on every `EventAccumulator`."""
logger.info('Beginning EventMultiplexer.Reload()')
self._reload_called = True
# Build a list so we're safe even if the list of accumulators is modified
# even while we're reloading.
with self._accumulators_mutex:
items = li... | python | def Reload(self):
"""Call `Reload` on every `EventAccumulator`."""
logger.info('Beginning EventMultiplexer.Reload()')
self._reload_called = True
# Build a list so we're safe even if the list of accumulators is modified
# even while we're reloading.
with self._accumulators_mutex:
items = li... | [
"def",
"Reload",
"(",
"self",
")",
":",
"logger",
".",
"info",
"(",
"'Beginning EventMultiplexer.Reload()'",
")",
"self",
".",
"_reload_called",
"=",
"True",
"# Build a list so we're safe even if the list of accumulators is modified",
"# even while we're reloading.",
"with",
... | Call `Reload` on every `EventAccumulator`. | [
"Call",
"Reload",
"on",
"every",
"EventAccumulator",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/backend/event_processing/event_multiplexer.py#L179-L202 | train | Call Reload on every EventAccumulator. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/backend/event_processing/event_multiplexer.py | EventMultiplexer.Histograms | def Histograms(self, run, tag):
"""Retrieve the histogram events associated with a run and tag.
Args:
run: A string name of the run for which values are retrieved.
tag: A string name of the tag for which values are retrieved.
Raises:
KeyError: If the run is not found, or the tag is not a... | python | def Histograms(self, run, tag):
"""Retrieve the histogram events associated with a run and tag.
Args:
run: A string name of the run for which values are retrieved.
tag: A string name of the tag for which values are retrieved.
Raises:
KeyError: If the run is not found, or the tag is not a... | [
"def",
"Histograms",
"(",
"self",
",",
"run",
",",
"tag",
")",
":",
"accumulator",
"=",
"self",
".",
"GetAccumulator",
"(",
"run",
")",
"return",
"accumulator",
".",
"Histograms",
"(",
"tag",
")"
] | Retrieve the histogram events associated with a run and tag.
Args:
run: A string name of the run for which values are retrieved.
tag: A string name of the tag for which values are retrieved.
Raises:
KeyError: If the run is not found, or the tag is not available for
the given run.
... | [
"Retrieve",
"the",
"histogram",
"events",
"associated",
"with",
"a",
"run",
"and",
"tag",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/backend/event_processing/event_multiplexer.py#L323-L338 | train | Retrieves the histogram events associated with a run and tag. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/backend/event_processing/event_multiplexer.py | EventMultiplexer.CompressedHistograms | def CompressedHistograms(self, run, tag):
"""Retrieve the compressed histogram events associated with a run and tag.
Args:
run: A string name of the run for which values are retrieved.
tag: A string name of the tag for which values are retrieved.
Raises:
KeyError: If the run is not found... | python | def CompressedHistograms(self, run, tag):
"""Retrieve the compressed histogram events associated with a run and tag.
Args:
run: A string name of the run for which values are retrieved.
tag: A string name of the tag for which values are retrieved.
Raises:
KeyError: If the run is not found... | [
"def",
"CompressedHistograms",
"(",
"self",
",",
"run",
",",
"tag",
")",
":",
"accumulator",
"=",
"self",
".",
"GetAccumulator",
"(",
"run",
")",
"return",
"accumulator",
".",
"CompressedHistograms",
"(",
"tag",
")"
] | Retrieve the compressed histogram events associated with a run and tag.
Args:
run: A string name of the run for which values are retrieved.
tag: A string name of the tag for which values are retrieved.
Raises:
KeyError: If the run is not found, or the tag is not available for
the giv... | [
"Retrieve",
"the",
"compressed",
"histogram",
"events",
"associated",
"with",
"a",
"run",
"and",
"tag",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/backend/event_processing/event_multiplexer.py#L340-L355 | train | Retrieves the compressed histogram events associated with a run and tag. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/backend/event_processing/event_multiplexer.py | EventMultiplexer.Images | def Images(self, run, tag):
"""Retrieve the image events associated with a run and tag.
Args:
run: A string name of the run for which values are retrieved.
tag: A string name of the tag for which values are retrieved.
Raises:
KeyError: If the run is not found, or the tag is not available... | python | def Images(self, run, tag):
"""Retrieve the image events associated with a run and tag.
Args:
run: A string name of the run for which values are retrieved.
tag: A string name of the tag for which values are retrieved.
Raises:
KeyError: If the run is not found, or the tag is not available... | [
"def",
"Images",
"(",
"self",
",",
"run",
",",
"tag",
")",
":",
"accumulator",
"=",
"self",
".",
"GetAccumulator",
"(",
"run",
")",
"return",
"accumulator",
".",
"Images",
"(",
"tag",
")"
] | Retrieve the image events associated with a run and tag.
Args:
run: A string name of the run for which values are retrieved.
tag: A string name of the tag for which values are retrieved.
Raises:
KeyError: If the run is not found, or the tag is not available for
the given run.
Re... | [
"Retrieve",
"the",
"image",
"events",
"associated",
"with",
"a",
"run",
"and",
"tag",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/backend/event_processing/event_multiplexer.py#L357-L372 | train | Retrieves the image events associated with a run and tag. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/histogram/summary_v2.py | histogram | def histogram(name, data, step=None, buckets=None, description=None):
"""Write a histogram summary.
Arguments:
name: A name for this summary. The summary tag used for TensorBoard will
be this name prefixed by any active name scopes.
data: A `Tensor` of any shape. Must be castable to `float64`.
st... | python | def histogram(name, data, step=None, buckets=None, description=None):
"""Write a histogram summary.
Arguments:
name: A name for this summary. The summary tag used for TensorBoard will
be this name prefixed by any active name scopes.
data: A `Tensor` of any shape. Must be castable to `float64`.
st... | [
"def",
"histogram",
"(",
"name",
",",
"data",
",",
"step",
"=",
"None",
",",
"buckets",
"=",
"None",
",",
"description",
"=",
"None",
")",
":",
"summary_metadata",
"=",
"metadata",
".",
"create_summary_metadata",
"(",
"display_name",
"=",
"None",
",",
"des... | Write a histogram summary.
Arguments:
name: A name for this summary. The summary tag used for TensorBoard will
be this name prefixed by any active name scopes.
data: A `Tensor` of any shape. Must be castable to `float64`.
step: Explicit `int64`-castable monotonic step value for this summary. If
... | [
"Write",
"a",
"histogram",
"summary",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/histogram/summary_v2.py#L43-L79 | train | Writes a histogram summary. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/histogram/summary_v2.py | histogram_pb | def histogram_pb(tag, data, buckets=None, description=None):
"""Create a histogram summary protobuf.
Arguments:
tag: String tag for the summary.
data: A `np.array` or array-like form of any shape. Must have type
castable to `float`.
buckets: Optional positive `int`. The output will have this
... | python | def histogram_pb(tag, data, buckets=None, description=None):
"""Create a histogram summary protobuf.
Arguments:
tag: String tag for the summary.
data: A `np.array` or array-like form of any shape. Must have type
castable to `float`.
buckets: Optional positive `int`. The output will have this
... | [
"def",
"histogram_pb",
"(",
"tag",
",",
"data",
",",
"buckets",
"=",
"None",
",",
"description",
"=",
"None",
")",
":",
"bucket_count",
"=",
"DEFAULT_BUCKET_COUNT",
"if",
"buckets",
"is",
"None",
"else",
"buckets",
"data",
"=",
"np",
".",
"array",
"(",
"... | Create a histogram summary protobuf.
Arguments:
tag: String tag for the summary.
data: A `np.array` or array-like form of any shape. Must have type
castable to `float`.
buckets: Optional positive `int`. The output will have this
many buckets, except in two edge cases. If there is no data, the... | [
"Create",
"a",
"histogram",
"summary",
"protobuf",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/histogram/summary_v2.py#L142-L193 | train | Create a histogram summary protobuf. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/program.py | setup_environment | def setup_environment():
"""Makes recommended modifications to the environment.
This functions changes global state in the Python process. Calling
this function is a good idea, but it can't appropriately be called
from library routines.
"""
absl.logging.set_verbosity(absl.logging.WARNING)
# The default ... | python | def setup_environment():
"""Makes recommended modifications to the environment.
This functions changes global state in the Python process. Calling
this function is a good idea, but it can't appropriately be called
from library routines.
"""
absl.logging.set_verbosity(absl.logging.WARNING)
# The default ... | [
"def",
"setup_environment",
"(",
")",
":",
"absl",
".",
"logging",
".",
"set_verbosity",
"(",
"absl",
".",
"logging",
".",
"WARNING",
")",
"# The default is HTTP/1.0 for some strange reason. If we don't use",
"# HTTP/1.1 then a new TCP socket and Python thread is created for",
... | Makes recommended modifications to the environment.
This functions changes global state in the Python process. Calling
this function is a good idea, but it can't appropriately be called
from library routines. | [
"Makes",
"recommended",
"modifications",
"to",
"the",
"environment",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/program.py#L71-L84 | train | Makes recommended modifications to the environment. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/program.py | get_default_assets_zip_provider | def get_default_assets_zip_provider():
"""Opens stock TensorBoard web assets collection.
Returns:
Returns function that returns a newly opened file handle to zip file
containing static assets for stock TensorBoard, or None if webfiles.zip
could not be found. The value the callback returns must be close... | python | def get_default_assets_zip_provider():
"""Opens stock TensorBoard web assets collection.
Returns:
Returns function that returns a newly opened file handle to zip file
containing static assets for stock TensorBoard, or None if webfiles.zip
could not be found. The value the callback returns must be close... | [
"def",
"get_default_assets_zip_provider",
"(",
")",
":",
"path",
"=",
"os",
".",
"path",
".",
"join",
"(",
"os",
".",
"path",
".",
"dirname",
"(",
"inspect",
".",
"getfile",
"(",
"sys",
".",
"_getframe",
"(",
"1",
")",
")",
")",
",",
"'webfiles.zip'",
... | Opens stock TensorBoard web assets collection.
Returns:
Returns function that returns a newly opened file handle to zip file
containing static assets for stock TensorBoard, or None if webfiles.zip
could not be found. The value the callback returns must be closed. The
paths inside the zip file are con... | [
"Opens",
"stock",
"TensorBoard",
"web",
"assets",
"collection",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/program.py#L86-L100 | train | Returns a function that returns a newly opened file handle to zip file
containing static assets for stock TensorBoard. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/program.py | with_port_scanning | def with_port_scanning(cls):
"""Create a server factory that performs port scanning.
This function returns a callable whose signature matches the
specification of `TensorBoardServer.__init__`, using `cls` as an
underlying implementation. It passes through `flags` unchanged except
in the case that `flags.port... | python | def with_port_scanning(cls):
"""Create a server factory that performs port scanning.
This function returns a callable whose signature matches the
specification of `TensorBoardServer.__init__`, using `cls` as an
underlying implementation. It passes through `flags` unchanged except
in the case that `flags.port... | [
"def",
"with_port_scanning",
"(",
"cls",
")",
":",
"def",
"init",
"(",
"wsgi_app",
",",
"flags",
")",
":",
"# base_port: what's the first port to which we should try to bind?",
"# should_scan: if that fails, shall we try additional ports?",
"# max_attempts: how many ports shall we tr... | Create a server factory that performs port scanning.
This function returns a callable whose signature matches the
specification of `TensorBoardServer.__init__`, using `cls` as an
underlying implementation. It passes through `flags` unchanged except
in the case that `flags.port is None`, in which case it repeat... | [
"Create",
"a",
"server",
"factory",
"that",
"performs",
"port",
"scanning",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/program.py#L358-L410 | train | Create a server factory that performs port scanning. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/program.py | TensorBoard.configure | def configure(self, argv=('',), **kwargs):
"""Configures TensorBoard behavior via flags.
This method will populate the "flags" property with an argparse.Namespace
representing flag values parsed from the provided argv list, overridden by
explicit flags from remaining keyword arguments.
Args:
... | python | def configure(self, argv=('',), **kwargs):
"""Configures TensorBoard behavior via flags.
This method will populate the "flags" property with an argparse.Namespace
representing flag values parsed from the provided argv list, overridden by
explicit flags from remaining keyword arguments.
Args:
... | [
"def",
"configure",
"(",
"self",
",",
"argv",
"=",
"(",
"''",
",",
")",
",",
"*",
"*",
"kwargs",
")",
":",
"parser",
"=",
"argparse_flags",
".",
"ArgumentParser",
"(",
"prog",
"=",
"'tensorboard'",
",",
"description",
"=",
"(",
"'TensorBoard is a suite of ... | Configures TensorBoard behavior via flags.
This method will populate the "flags" property with an argparse.Namespace
representing flag values parsed from the provided argv list, overridden by
explicit flags from remaining keyword arguments.
Args:
argv: Can be set to CLI args equivalent to sys.ar... | [
"Configures",
"TensorBoard",
"behavior",
"via",
"flags",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/program.py#L149-L199 | train | Configures TensorBoard behavior via flags. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/program.py | TensorBoard.main | def main(self, ignored_argv=('',)):
"""Blocking main function for TensorBoard.
This method is called by `tensorboard.main.run_main`, which is the
standard entrypoint for the tensorboard command line program. The
configure() method must be called first.
Args:
ignored_argv: Do not pass. Requir... | python | def main(self, ignored_argv=('',)):
"""Blocking main function for TensorBoard.
This method is called by `tensorboard.main.run_main`, which is the
standard entrypoint for the tensorboard command line program. The
configure() method must be called first.
Args:
ignored_argv: Do not pass. Requir... | [
"def",
"main",
"(",
"self",
",",
"ignored_argv",
"=",
"(",
"''",
",",
")",
")",
":",
"self",
".",
"_install_signal_handler",
"(",
"signal",
".",
"SIGTERM",
",",
"\"SIGTERM\"",
")",
"if",
"self",
".",
"flags",
".",
"inspect",
":",
"logger",
".",
"info",... | Blocking main function for TensorBoard.
This method is called by `tensorboard.main.run_main`, which is the
standard entrypoint for the tensorboard command line program. The
configure() method must be called first.
Args:
ignored_argv: Do not pass. Required for Abseil compatibility.
Returns:
... | [
"Blocking",
"main",
"function",
"for",
"TensorBoard",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/program.py#L201-L239 | train | Blocking main function for TensorBoard. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/program.py | TensorBoard.launch | def launch(self):
"""Python API for launching TensorBoard.
This method is the same as main() except it launches TensorBoard in
a separate permanent thread. The configure() method must be called
first.
Returns:
The URL of the TensorBoard web server.
:rtype: str
"""
# Make it easy... | python | def launch(self):
"""Python API for launching TensorBoard.
This method is the same as main() except it launches TensorBoard in
a separate permanent thread. The configure() method must be called
first.
Returns:
The URL of the TensorBoard web server.
:rtype: str
"""
# Make it easy... | [
"def",
"launch",
"(",
"self",
")",
":",
"# Make it easy to run TensorBoard inside other programs, e.g. Colab.",
"server",
"=",
"self",
".",
"_make_server",
"(",
")",
"thread",
"=",
"threading",
".",
"Thread",
"(",
"target",
"=",
"server",
".",
"serve_forever",
",",
... | Python API for launching TensorBoard.
This method is the same as main() except it launches TensorBoard in
a separate permanent thread. The configure() method must be called
first.
Returns:
The URL of the TensorBoard web server.
:rtype: str | [
"Python",
"API",
"for",
"launching",
"TensorBoard",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/program.py#L241-L258 | train | This method is used to launch a TensorBoard web server. It is intended to be used by other programs to run TensorBoard inside other programs. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/program.py | TensorBoard._register_info | def _register_info(self, server):
"""Write a TensorBoardInfo file and arrange for its cleanup.
Args:
server: The result of `self._make_server()`.
"""
server_url = urllib.parse.urlparse(server.get_url())
info = manager.TensorBoardInfo(
version=version.VERSION,
start_time=int(ti... | python | def _register_info(self, server):
"""Write a TensorBoardInfo file and arrange for its cleanup.
Args:
server: The result of `self._make_server()`.
"""
server_url = urllib.parse.urlparse(server.get_url())
info = manager.TensorBoardInfo(
version=version.VERSION,
start_time=int(ti... | [
"def",
"_register_info",
"(",
"self",
",",
"server",
")",
":",
"server_url",
"=",
"urllib",
".",
"parse",
".",
"urlparse",
"(",
"server",
".",
"get_url",
"(",
")",
")",
"info",
"=",
"manager",
".",
"TensorBoardInfo",
"(",
"version",
"=",
"version",
".",
... | Write a TensorBoardInfo file and arrange for its cleanup.
Args:
server: The result of `self._make_server()`. | [
"Write",
"a",
"TensorBoardInfo",
"file",
"and",
"arrange",
"for",
"its",
"cleanup",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/program.py#L260-L278 | train | Write a TensorBoardInfo file and arrange for its cleanup. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/program.py | TensorBoard._install_signal_handler | def _install_signal_handler(self, signal_number, signal_name):
"""Set a signal handler to gracefully exit on the given signal.
When this process receives the given signal, it will run `atexit`
handlers and then exit with `0`.
Args:
signal_number: The numeric code for the signal to handle, like
... | python | def _install_signal_handler(self, signal_number, signal_name):
"""Set a signal handler to gracefully exit on the given signal.
When this process receives the given signal, it will run `atexit`
handlers and then exit with `0`.
Args:
signal_number: The numeric code for the signal to handle, like
... | [
"def",
"_install_signal_handler",
"(",
"self",
",",
"signal_number",
",",
"signal_name",
")",
":",
"old_signal_handler",
"=",
"None",
"# set below",
"def",
"handler",
"(",
"handled_signal_number",
",",
"frame",
")",
":",
"# In case we catch this signal again while running... | Set a signal handler to gracefully exit on the given signal.
When this process receives the given signal, it will run `atexit`
handlers and then exit with `0`.
Args:
signal_number: The numeric code for the signal to handle, like
`signal.SIGTERM`.
signal_name: The human-readable signal ... | [
"Set",
"a",
"signal",
"handler",
"to",
"gracefully",
"exit",
"on",
"the",
"given",
"signal",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/program.py#L280-L302 | train | Installs a signal handler to gracefully exit on the given signal. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/program.py | TensorBoard._make_server | def _make_server(self):
"""Constructs the TensorBoard WSGI app and instantiates the server."""
app = application.standard_tensorboard_wsgi(self.flags,
self.plugin_loaders,
self.assets_zip_provider)
return self.se... | python | def _make_server(self):
"""Constructs the TensorBoard WSGI app and instantiates the server."""
app = application.standard_tensorboard_wsgi(self.flags,
self.plugin_loaders,
self.assets_zip_provider)
return self.se... | [
"def",
"_make_server",
"(",
"self",
")",
":",
"app",
"=",
"application",
".",
"standard_tensorboard_wsgi",
"(",
"self",
".",
"flags",
",",
"self",
".",
"plugin_loaders",
",",
"self",
".",
"assets_zip_provider",
")",
"return",
"self",
".",
"server_class",
"(",
... | Constructs the TensorBoard WSGI app and instantiates the server. | [
"Constructs",
"the",
"TensorBoard",
"WSGI",
"app",
"and",
"instantiates",
"the",
"server",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/program.py#L305-L310 | train | Constructs the TensorBoard WSGI app and instantiates the server. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/program.py | WerkzeugServer._get_wildcard_address | def _get_wildcard_address(self, port):
"""Returns a wildcard address for the port in question.
This will attempt to follow the best practice of calling getaddrinfo() with
a null host and AI_PASSIVE to request a server-side socket wildcard address.
If that succeeds, this returns the first IPv6 address f... | python | def _get_wildcard_address(self, port):
"""Returns a wildcard address for the port in question.
This will attempt to follow the best practice of calling getaddrinfo() with
a null host and AI_PASSIVE to request a server-side socket wildcard address.
If that succeeds, this returns the first IPv6 address f... | [
"def",
"_get_wildcard_address",
"(",
"self",
",",
"port",
")",
":",
"fallback_address",
"=",
"'::'",
"if",
"socket",
".",
"has_ipv6",
"else",
"'0.0.0.0'",
"if",
"hasattr",
"(",
"socket",
",",
"'AI_PASSIVE'",
")",
":",
"try",
":",
"addrinfos",
"=",
"socket",
... | Returns a wildcard address for the port in question.
This will attempt to follow the best practice of calling getaddrinfo() with
a null host and AI_PASSIVE to request a server-side socket wildcard address.
If that succeeds, this returns the first IPv6 address found, or if none,
then returns the first I... | [
"Returns",
"a",
"wildcard",
"address",
"for",
"the",
"port",
"in",
"question",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/program.py#L456-L486 | train | Returns a wildcard address for the given port. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/program.py | WerkzeugServer.server_bind | def server_bind(self):
"""Override to enable IPV4 mapping for IPV6 sockets when desired.
The main use case for this is so that when no host is specified, TensorBoard
can listen on all interfaces for both IPv4 and IPv6 connections, rather than
having to choose v4 or v6 and hope the browser didn't choose... | python | def server_bind(self):
"""Override to enable IPV4 mapping for IPV6 sockets when desired.
The main use case for this is so that when no host is specified, TensorBoard
can listen on all interfaces for both IPv4 and IPv6 connections, rather than
having to choose v4 or v6 and hope the browser didn't choose... | [
"def",
"server_bind",
"(",
"self",
")",
":",
"socket_is_v6",
"=",
"(",
"hasattr",
"(",
"socket",
",",
"'AF_INET6'",
")",
"and",
"self",
".",
"socket",
".",
"family",
"==",
"socket",
".",
"AF_INET6",
")",
"has_v6only_option",
"=",
"(",
"hasattr",
"(",
"so... | Override to enable IPV4 mapping for IPV6 sockets when desired.
The main use case for this is so that when no host is specified, TensorBoard
can listen on all interfaces for both IPv4 and IPv6 connections, rather than
having to choose v4 or v6 and hope the browser didn't choose the other one. | [
"Override",
"to",
"enable",
"IPV4",
"mapping",
"for",
"IPV6",
"sockets",
"when",
"desired",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/program.py#L488-L507 | train | Override to enable IPV4 mapping for IPV6 sockets when desired. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/program.py | WerkzeugServer.handle_error | def handle_error(self, request, client_address):
"""Override to get rid of noisy EPIPE errors."""
del request # unused
# Kludge to override a SocketServer.py method so we can get rid of noisy
# EPIPE errors. They're kind of a red herring as far as errors go. For
# example, `curl -N http://localhost... | python | def handle_error(self, request, client_address):
"""Override to get rid of noisy EPIPE errors."""
del request # unused
# Kludge to override a SocketServer.py method so we can get rid of noisy
# EPIPE errors. They're kind of a red herring as far as errors go. For
# example, `curl -N http://localhost... | [
"def",
"handle_error",
"(",
"self",
",",
"request",
",",
"client_address",
")",
":",
"del",
"request",
"# unused",
"# Kludge to override a SocketServer.py method so we can get rid of noisy",
"# EPIPE errors. They're kind of a red herring as far as errors go. For",
"# example, `curl -N ... | Override to get rid of noisy EPIPE errors. | [
"Override",
"to",
"get",
"rid",
"of",
"noisy",
"EPIPE",
"errors",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/program.py#L509-L520 | train | Override to get rid of noisy EPIPE errors. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/profile/trace_events_json.py | TraceEventsJsonStream._events | def _events(self):
"""Iterator over all catapult trace events, as python values."""
for did, device in sorted(six.iteritems(self._proto.devices)):
if device.name:
yield dict(
ph=_TYPE_METADATA,
pid=did,
name='process_name',
args=dict(name=device.name... | python | def _events(self):
"""Iterator over all catapult trace events, as python values."""
for did, device in sorted(six.iteritems(self._proto.devices)):
if device.name:
yield dict(
ph=_TYPE_METADATA,
pid=did,
name='process_name',
args=dict(name=device.name... | [
"def",
"_events",
"(",
"self",
")",
":",
"for",
"did",
",",
"device",
"in",
"sorted",
"(",
"six",
".",
"iteritems",
"(",
"self",
".",
"_proto",
".",
"devices",
")",
")",
":",
"if",
"device",
".",
"name",
":",
"yield",
"dict",
"(",
"ph",
"=",
"_TY... | Iterator over all catapult trace events, as python values. | [
"Iterator",
"over",
"all",
"catapult",
"trace",
"events",
"as",
"python",
"values",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/profile/trace_events_json.py#L47-L77 | train | Iterator over all catapult trace events as python values. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/profile/trace_events_json.py | TraceEventsJsonStream._event | def _event(self, event):
"""Converts a TraceEvent proto into a catapult trace event python value."""
result = dict(
pid=event.device_id,
tid=event.resource_id,
name=event.name,
ts=event.timestamp_ps / 1000000.0)
if event.duration_ps:
result['ph'] = _TYPE_COMPLETE
... | python | def _event(self, event):
"""Converts a TraceEvent proto into a catapult trace event python value."""
result = dict(
pid=event.device_id,
tid=event.resource_id,
name=event.name,
ts=event.timestamp_ps / 1000000.0)
if event.duration_ps:
result['ph'] = _TYPE_COMPLETE
... | [
"def",
"_event",
"(",
"self",
",",
"event",
")",
":",
"result",
"=",
"dict",
"(",
"pid",
"=",
"event",
".",
"device_id",
",",
"tid",
"=",
"event",
".",
"resource_id",
",",
"name",
"=",
"event",
".",
"name",
",",
"ts",
"=",
"event",
".",
"timestamp_... | Converts a TraceEvent proto into a catapult trace event python value. | [
"Converts",
"a",
"TraceEvent",
"proto",
"into",
"a",
"catapult",
"trace",
"event",
"python",
"value",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/profile/trace_events_json.py#L79-L96 | train | Converts a TraceEvent proto into a catapult trace event python value. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/scalar/summary.py | op | def op(name,
data,
display_name=None,
description=None,
collections=None):
"""Create a legacy scalar summary op.
Arguments:
name: A unique name for the generated summary node.
data: A real numeric rank-0 `Tensor`. Must have `dtype` castable
to `float32`.
display_name: ... | python | def op(name,
data,
display_name=None,
description=None,
collections=None):
"""Create a legacy scalar summary op.
Arguments:
name: A unique name for the generated summary node.
data: A real numeric rank-0 `Tensor`. Must have `dtype` castable
to `float32`.
display_name: ... | [
"def",
"op",
"(",
"name",
",",
"data",
",",
"display_name",
"=",
"None",
",",
"description",
"=",
"None",
",",
"collections",
"=",
"None",
")",
":",
"# TODO(nickfelt): remove on-demand imports once dep situation is fixed.",
"import",
"tensorflow",
".",
"compat",
"."... | Create a legacy scalar summary op.
Arguments:
name: A unique name for the generated summary node.
data: A real numeric rank-0 `Tensor`. Must have `dtype` castable
to `float32`.
display_name: Optional name for this summary in TensorBoard, as a
constant `str`. Defaults to `name`.
descriptio... | [
"Create",
"a",
"legacy",
"scalar",
"summary",
"op",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/scalar/summary.py#L35-L69 | train | Create a legacy scalar summary op. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/scalar/summary.py | pb | def pb(name, data, display_name=None, description=None):
"""Create a legacy scalar summary protobuf.
Arguments:
name: A unique name for the generated summary, including any desired
name scopes.
data: A rank-0 `np.array` or array-like form (so raw `int`s and
`float`s are fine, too).
display_... | python | def pb(name, data, display_name=None, description=None):
"""Create a legacy scalar summary protobuf.
Arguments:
name: A unique name for the generated summary, including any desired
name scopes.
data: A rank-0 `np.array` or array-like form (so raw `int`s and
`float`s are fine, too).
display_... | [
"def",
"pb",
"(",
"name",
",",
"data",
",",
"display_name",
"=",
"None",
",",
"description",
"=",
"None",
")",
":",
"# TODO(nickfelt): remove on-demand imports once dep situation is fixed.",
"import",
"tensorflow",
".",
"compat",
".",
"v1",
"as",
"tf",
"data",
"="... | Create a legacy scalar summary protobuf.
Arguments:
name: A unique name for the generated summary, including any desired
name scopes.
data: A rank-0 `np.array` or array-like form (so raw `int`s and
`float`s are fine, too).
display_name: Optional name for this summary in TensorBoard, as a
... | [
"Create",
"a",
"legacy",
"scalar",
"summary",
"protobuf",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/scalar/summary.py#L72-L109 | train | Create a legacy scalar summary protobuf. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/scripts/execrooter.py | run | def run(inputs, program, outputs):
"""Creates temp symlink tree, runs program, and copies back outputs.
Args:
inputs: List of fake paths to real paths, which are used for symlink tree.
program: List containing real path of program and its arguments. The
execroot directory will be appended as the la... | python | def run(inputs, program, outputs):
"""Creates temp symlink tree, runs program, and copies back outputs.
Args:
inputs: List of fake paths to real paths, which are used for symlink tree.
program: List containing real path of program and its arguments. The
execroot directory will be appended as the la... | [
"def",
"run",
"(",
"inputs",
",",
"program",
",",
"outputs",
")",
":",
"root",
"=",
"tempfile",
".",
"mkdtemp",
"(",
")",
"try",
":",
"cwd",
"=",
"os",
".",
"getcwd",
"(",
")",
"for",
"fake",
",",
"real",
"in",
"inputs",
":",
"parent",
"=",
"os",... | Creates temp symlink tree, runs program, and copies back outputs.
Args:
inputs: List of fake paths to real paths, which are used for symlink tree.
program: List containing real path of program and its arguments. The
execroot directory will be appended as the last argument.
outputs: List of fake o... | [
"Creates",
"temp",
"symlink",
"tree",
"runs",
"program",
"and",
"copies",
"back",
"outputs",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/scripts/execrooter.py#L28-L62 | train | Creates temp symlink tree runs program and copies back outputs. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/scripts/execrooter.py | main | def main(args):
"""Invokes run function using a JSON file config.
Args:
args: CLI args, which can be a JSON file containing an object whose
attributes are the parameters to the run function. If multiple JSON
files are passed, their contents are concatenated.
Returns:
0 if succeeded or non... | python | def main(args):
"""Invokes run function using a JSON file config.
Args:
args: CLI args, which can be a JSON file containing an object whose
attributes are the parameters to the run function. If multiple JSON
files are passed, their contents are concatenated.
Returns:
0 if succeeded or non... | [
"def",
"main",
"(",
"args",
")",
":",
"if",
"not",
"args",
":",
"raise",
"Exception",
"(",
"'Please specify at least one JSON config path'",
")",
"inputs",
"=",
"[",
"]",
"program",
"=",
"[",
"]",
"outputs",
"=",
"[",
"]",
"for",
"arg",
"in",
"args",
":"... | Invokes run function using a JSON file config.
Args:
args: CLI args, which can be a JSON file containing an object whose
attributes are the parameters to the run function. If multiple JSON
files are passed, their contents are concatenated.
Returns:
0 if succeeded or nonzero if failed.
Rai... | [
"Invokes",
"run",
"function",
"using",
"a",
"JSON",
"file",
"config",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/scripts/execrooter.py#L65-L90 | train | This function is the main function of the run function. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/backend/event_processing/sqlite_writer.py | initialize_schema | def initialize_schema(connection):
"""Initializes the TensorBoard sqlite schema using the given connection.
Args:
connection: A sqlite DB connection.
"""
cursor = connection.cursor()
cursor.execute("PRAGMA application_id={}".format(_TENSORBOARD_APPLICATION_ID))
cursor.execute("PRAGMA user_version={}".f... | python | def initialize_schema(connection):
"""Initializes the TensorBoard sqlite schema using the given connection.
Args:
connection: A sqlite DB connection.
"""
cursor = connection.cursor()
cursor.execute("PRAGMA application_id={}".format(_TENSORBOARD_APPLICATION_ID))
cursor.execute("PRAGMA user_version={}".f... | [
"def",
"initialize_schema",
"(",
"connection",
")",
":",
"cursor",
"=",
"connection",
".",
"cursor",
"(",
")",
"cursor",
".",
"execute",
"(",
"\"PRAGMA application_id={}\"",
".",
"format",
"(",
"_TENSORBOARD_APPLICATION_ID",
")",
")",
"cursor",
".",
"execute",
"... | Initializes the TensorBoard sqlite schema using the given connection.
Args:
connection: A sqlite DB connection. | [
"Initializes",
"the",
"TensorBoard",
"sqlite",
"schema",
"using",
"the",
"given",
"connection",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/backend/event_processing/sqlite_writer.py#L416-L430 | train | Initializes TensorBoard sqlite schema using the given connection. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/backend/event_processing/sqlite_writer.py | SqliteWriter._create_id | def _create_id(self):
"""Returns a freshly created DB-wide unique ID."""
cursor = self._db.cursor()
cursor.execute('INSERT INTO Ids DEFAULT VALUES')
return cursor.lastrowid | python | def _create_id(self):
"""Returns a freshly created DB-wide unique ID."""
cursor = self._db.cursor()
cursor.execute('INSERT INTO Ids DEFAULT VALUES')
return cursor.lastrowid | [
"def",
"_create_id",
"(",
"self",
")",
":",
"cursor",
"=",
"self",
".",
"_db",
".",
"cursor",
"(",
")",
"cursor",
".",
"execute",
"(",
"'INSERT INTO Ids DEFAULT VALUES'",
")",
"return",
"cursor",
".",
"lastrowid"
] | Returns a freshly created DB-wide unique ID. | [
"Returns",
"a",
"freshly",
"created",
"DB",
"-",
"wide",
"unique",
"ID",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/backend/event_processing/sqlite_writer.py#L58-L62 | train | Returns a freshly created DB - wide unique ID. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/backend/event_processing/sqlite_writer.py | SqliteWriter._maybe_init_user | def _maybe_init_user(self):
"""Returns the ID for the current user, creating the row if needed."""
user_name = os.environ.get('USER', '') or os.environ.get('USERNAME', '')
cursor = self._db.cursor()
cursor.execute('SELECT user_id FROM Users WHERE user_name = ?',
(user_name,))
row ... | python | def _maybe_init_user(self):
"""Returns the ID for the current user, creating the row if needed."""
user_name = os.environ.get('USER', '') or os.environ.get('USERNAME', '')
cursor = self._db.cursor()
cursor.execute('SELECT user_id FROM Users WHERE user_name = ?',
(user_name,))
row ... | [
"def",
"_maybe_init_user",
"(",
"self",
")",
":",
"user_name",
"=",
"os",
".",
"environ",
".",
"get",
"(",
"'USER'",
",",
"''",
")",
"or",
"os",
".",
"environ",
".",
"get",
"(",
"'USERNAME'",
",",
"''",
")",
"cursor",
"=",
"self",
".",
"_db",
".",
... | Returns the ID for the current user, creating the row if needed. | [
"Returns",
"the",
"ID",
"for",
"the",
"current",
"user",
"creating",
"the",
"row",
"if",
"needed",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/backend/event_processing/sqlite_writer.py#L64-L80 | train | Returns the ID for the current user creating the row if needed. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/backend/event_processing/sqlite_writer.py | SqliteWriter._maybe_init_experiment | def _maybe_init_experiment(self, experiment_name):
"""Returns the ID for the given experiment, creating the row if needed.
Args:
experiment_name: name of experiment.
"""
user_id = self._maybe_init_user()
cursor = self._db.cursor()
cursor.execute(
"""
SELECT experiment_id F... | python | def _maybe_init_experiment(self, experiment_name):
"""Returns the ID for the given experiment, creating the row if needed.
Args:
experiment_name: name of experiment.
"""
user_id = self._maybe_init_user()
cursor = self._db.cursor()
cursor.execute(
"""
SELECT experiment_id F... | [
"def",
"_maybe_init_experiment",
"(",
"self",
",",
"experiment_name",
")",
":",
"user_id",
"=",
"self",
".",
"_maybe_init_user",
"(",
")",
"cursor",
"=",
"self",
".",
"_db",
".",
"cursor",
"(",
")",
"cursor",
".",
"execute",
"(",
"\"\"\"\n SELECT experi... | Returns the ID for the given experiment, creating the row if needed.
Args:
experiment_name: name of experiment. | [
"Returns",
"the",
"ID",
"for",
"the",
"given",
"experiment",
"creating",
"the",
"row",
"if",
"needed",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/backend/event_processing/sqlite_writer.py#L82-L111 | train | Returns the ID for the given experiment creating the row if needed. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/backend/event_processing/sqlite_writer.py | SqliteWriter._maybe_init_run | def _maybe_init_run(self, experiment_name, run_name):
"""Returns the ID for the given run, creating the row if needed.
Args:
experiment_name: name of experiment containing this run.
run_name: name of run.
"""
experiment_id = self._maybe_init_experiment(experiment_name)
cursor = self._db... | python | def _maybe_init_run(self, experiment_name, run_name):
"""Returns the ID for the given run, creating the row if needed.
Args:
experiment_name: name of experiment containing this run.
run_name: name of run.
"""
experiment_id = self._maybe_init_experiment(experiment_name)
cursor = self._db... | [
"def",
"_maybe_init_run",
"(",
"self",
",",
"experiment_name",
",",
"run_name",
")",
":",
"experiment_id",
"=",
"self",
".",
"_maybe_init_experiment",
"(",
"experiment_name",
")",
"cursor",
"=",
"self",
".",
"_db",
".",
"cursor",
"(",
")",
"cursor",
".",
"ex... | Returns the ID for the given run, creating the row if needed.
Args:
experiment_name: name of experiment containing this run.
run_name: name of run. | [
"Returns",
"the",
"ID",
"for",
"the",
"given",
"run",
"creating",
"the",
"row",
"if",
"needed",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/backend/event_processing/sqlite_writer.py#L113-L141 | train | Returns the ID for the given run creating the row if needed. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/backend/event_processing/sqlite_writer.py | SqliteWriter._maybe_init_tags | def _maybe_init_tags(self, run_id, tag_to_metadata):
"""Returns a tag-to-ID map for the given tags, creating rows if needed.
Args:
run_id: the ID of the run to which these tags belong.
tag_to_metadata: map of tag name to SummaryMetadata for the tag.
"""
cursor = self._db.cursor()
# TODO... | python | def _maybe_init_tags(self, run_id, tag_to_metadata):
"""Returns a tag-to-ID map for the given tags, creating rows if needed.
Args:
run_id: the ID of the run to which these tags belong.
tag_to_metadata: map of tag name to SummaryMetadata for the tag.
"""
cursor = self._db.cursor()
# TODO... | [
"def",
"_maybe_init_tags",
"(",
"self",
",",
"run_id",
",",
"tag_to_metadata",
")",
":",
"cursor",
"=",
"self",
".",
"_db",
".",
"cursor",
"(",
")",
"# TODO: for huge numbers of tags (e.g. 1000+), this is slower than just",
"# querying for the known tag names explicitly; find... | Returns a tag-to-ID map for the given tags, creating rows if needed.
Args:
run_id: the ID of the run to which these tags belong.
tag_to_metadata: map of tag name to SummaryMetadata for the tag. | [
"Returns",
"a",
"tag",
"-",
"to",
"-",
"ID",
"map",
"for",
"the",
"given",
"tags",
"creating",
"rows",
"if",
"needed",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/backend/event_processing/sqlite_writer.py#L143-L174 | train | Returns a tag - to - ID map for the given tags creating rows if needed. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/backend/event_processing/sqlite_writer.py | SqliteWriter.write_summaries | def write_summaries(self, tagged_data, experiment_name, run_name):
"""Transactionally writes the given tagged summary data to the DB.
Args:
tagged_data: map from tag to TagData instances.
experiment_name: name of experiment.
run_name: name of run.
"""
logger.debug('Writing summaries f... | python | def write_summaries(self, tagged_data, experiment_name, run_name):
"""Transactionally writes the given tagged summary data to the DB.
Args:
tagged_data: map from tag to TagData instances.
experiment_name: name of experiment.
run_name: name of run.
"""
logger.debug('Writing summaries f... | [
"def",
"write_summaries",
"(",
"self",
",",
"tagged_data",
",",
"experiment_name",
",",
"run_name",
")",
":",
"logger",
".",
"debug",
"(",
"'Writing summaries for %s tags'",
",",
"len",
"(",
"tagged_data",
")",
")",
"# Connection used as context manager for auto commit/... | Transactionally writes the given tagged summary data to the DB.
Args:
tagged_data: map from tag to TagData instances.
experiment_name: name of experiment.
run_name: name of run. | [
"Transactionally",
"writes",
"the",
"given",
"tagged",
"summary",
"data",
"to",
"the",
"DB",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/backend/event_processing/sqlite_writer.py#L176-L214 | train | Transactionally writes the given tagged summary data to the DB. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/image/images_demo.py | image_data | def image_data(verbose=False):
"""Get the raw encoded image data, downloading it if necessary."""
# This is a principled use of the `global` statement; don't lint me.
global _IMAGE_DATA # pylint: disable=global-statement
if _IMAGE_DATA is None:
if verbose:
logger.info("--- Downloading image.")
wi... | python | def image_data(verbose=False):
"""Get the raw encoded image data, downloading it if necessary."""
# This is a principled use of the `global` statement; don't lint me.
global _IMAGE_DATA # pylint: disable=global-statement
if _IMAGE_DATA is None:
if verbose:
logger.info("--- Downloading image.")
wi... | [
"def",
"image_data",
"(",
"verbose",
"=",
"False",
")",
":",
"# This is a principled use of the `global` statement; don't lint me.",
"global",
"_IMAGE_DATA",
"# pylint: disable=global-statement",
"if",
"_IMAGE_DATA",
"is",
"None",
":",
"if",
"verbose",
":",
"logger",
".",
... | Get the raw encoded image data, downloading it if necessary. | [
"Get",
"the",
"raw",
"encoded",
"image",
"data",
"downloading",
"it",
"if",
"necessary",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/image/images_demo.py#L56-L65 | train | Get the raw encoded image data downloading it if necessary. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/image/images_demo.py | convolve | def convolve(image, pixel_filter, channels=3, name=None):
"""Perform a 2D pixel convolution on the given image.
Arguments:
image: A 3D `float32` `Tensor` of shape `[height, width, channels]`,
where `channels` is the third argument to this function and the
first two dimensions are arbitrary.
pix... | python | def convolve(image, pixel_filter, channels=3, name=None):
"""Perform a 2D pixel convolution on the given image.
Arguments:
image: A 3D `float32` `Tensor` of shape `[height, width, channels]`,
where `channels` is the third argument to this function and the
first two dimensions are arbitrary.
pix... | [
"def",
"convolve",
"(",
"image",
",",
"pixel_filter",
",",
"channels",
"=",
"3",
",",
"name",
"=",
"None",
")",
":",
"with",
"tf",
".",
"name_scope",
"(",
"name",
",",
"'convolve'",
")",
":",
"tf",
".",
"compat",
".",
"v1",
".",
"assert_type",
"(",
... | Perform a 2D pixel convolution on the given image.
Arguments:
image: A 3D `float32` `Tensor` of shape `[height, width, channels]`,
where `channels` is the third argument to this function and the
first two dimensions are arbitrary.
pixel_filter: A 2D `Tensor`, representing pixel weightings for the... | [
"Perform",
"a",
"2D",
"pixel",
"convolution",
"on",
"the",
"given",
"image",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/image/images_demo.py#L68-L96 | train | Perform a 2D pixel convolution on the given image. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/image/images_demo.py | get_image | def get_image(verbose=False):
"""Get the image as a TensorFlow variable.
Returns:
A `tf.Variable`, which must be initialized prior to use:
invoke `sess.run(result.initializer)`."""
base_data = tf.constant(image_data(verbose=verbose))
base_image = tf.image.decode_image(base_data, channels=3)
base_imag... | python | def get_image(verbose=False):
"""Get the image as a TensorFlow variable.
Returns:
A `tf.Variable`, which must be initialized prior to use:
invoke `sess.run(result.initializer)`."""
base_data = tf.constant(image_data(verbose=verbose))
base_image = tf.image.decode_image(base_data, channels=3)
base_imag... | [
"def",
"get_image",
"(",
"verbose",
"=",
"False",
")",
":",
"base_data",
"=",
"tf",
".",
"constant",
"(",
"image_data",
"(",
"verbose",
"=",
"verbose",
")",
")",
"base_image",
"=",
"tf",
".",
"image",
".",
"decode_image",
"(",
"base_data",
",",
"channels... | Get the image as a TensorFlow variable.
Returns:
A `tf.Variable`, which must be initialized prior to use:
invoke `sess.run(result.initializer)`. | [
"Get",
"the",
"image",
"as",
"a",
"TensorFlow",
"variable",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/image/images_demo.py#L99-L109 | train | Get the image as a TensorFlow variable. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/image/images_demo.py | run_box_to_gaussian | def run_box_to_gaussian(logdir, verbose=False):
"""Run a box-blur-to-Gaussian-blur demonstration.
See the summary description for more details.
Arguments:
logdir: Directory into which to write event logs.
verbose: Boolean; whether to log any output.
"""
if verbose:
logger.info('--- Starting run:... | python | def run_box_to_gaussian(logdir, verbose=False):
"""Run a box-blur-to-Gaussian-blur demonstration.
See the summary description for more details.
Arguments:
logdir: Directory into which to write event logs.
verbose: Boolean; whether to log any output.
"""
if verbose:
logger.info('--- Starting run:... | [
"def",
"run_box_to_gaussian",
"(",
"logdir",
",",
"verbose",
"=",
"False",
")",
":",
"if",
"verbose",
":",
"logger",
".",
"info",
"(",
"'--- Starting run: box_to_gaussian'",
")",
"tf",
".",
"compat",
".",
"v1",
".",
"reset_default_graph",
"(",
")",
"tf",
"."... | Run a box-blur-to-Gaussian-blur demonstration.
See the summary description for more details.
Arguments:
logdir: Directory into which to write event logs.
verbose: Boolean; whether to log any output. | [
"Run",
"a",
"box",
"-",
"blur",
"-",
"to",
"-",
"Gaussian",
"-",
"blur",
"demonstration",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/image/images_demo.py#L112-L191 | train | Run a box - to - Gaussian - blur demonstration. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/image/images_demo.py | run_sobel | def run_sobel(logdir, verbose=False):
"""Run a Sobel edge detection demonstration.
See the summary description for more details.
Arguments:
logdir: Directory into which to write event logs.
verbose: Boolean; whether to log any output.
"""
if verbose:
logger.info('--- Starting run: sobel')
tf.... | python | def run_sobel(logdir, verbose=False):
"""Run a Sobel edge detection demonstration.
See the summary description for more details.
Arguments:
logdir: Directory into which to write event logs.
verbose: Boolean; whether to log any output.
"""
if verbose:
logger.info('--- Starting run: sobel')
tf.... | [
"def",
"run_sobel",
"(",
"logdir",
",",
"verbose",
"=",
"False",
")",
":",
"if",
"verbose",
":",
"logger",
".",
"info",
"(",
"'--- Starting run: sobel'",
")",
"tf",
".",
"compat",
".",
"v1",
".",
"reset_default_graph",
"(",
")",
"tf",
".",
"compat",
".",... | Run a Sobel edge detection demonstration.
See the summary description for more details.
Arguments:
logdir: Directory into which to write event logs.
verbose: Boolean; whether to log any output. | [
"Run",
"a",
"Sobel",
"edge",
"detection",
"demonstration",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/image/images_demo.py#L194-L265 | train | A Sobel edge detection demonstration. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/image/images_demo.py | run_all | def run_all(logdir, verbose=False):
"""Run simulations on a reasonable set of parameters.
Arguments:
logdir: the directory into which to store all the runs' data
verbose: if true, print out each run's name as it begins
"""
run_box_to_gaussian(logdir, verbose=verbose)
run_sobel(logdir, verbose=verbose... | python | def run_all(logdir, verbose=False):
"""Run simulations on a reasonable set of parameters.
Arguments:
logdir: the directory into which to store all the runs' data
verbose: if true, print out each run's name as it begins
"""
run_box_to_gaussian(logdir, verbose=verbose)
run_sobel(logdir, verbose=verbose... | [
"def",
"run_all",
"(",
"logdir",
",",
"verbose",
"=",
"False",
")",
":",
"run_box_to_gaussian",
"(",
"logdir",
",",
"verbose",
"=",
"verbose",
")",
"run_sobel",
"(",
"logdir",
",",
"verbose",
"=",
"verbose",
")"
] | Run simulations on a reasonable set of parameters.
Arguments:
logdir: the directory into which to store all the runs' data
verbose: if true, print out each run's name as it begins | [
"Run",
"simulations",
"on",
"a",
"reasonable",
"set",
"of",
"parameters",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/image/images_demo.py#L268-L276 | train | Run all the runs in the specified directory. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/interactive_inference/utils/inference_utils.py | proto_value_for_feature | def proto_value_for_feature(example, feature_name):
"""Get the value of a feature from Example regardless of feature type."""
feature = get_example_features(example)[feature_name]
if feature is None:
raise ValueError('Feature {} is not on example proto.'.format(feature_name))
feature_type = feature.WhichOne... | python | def proto_value_for_feature(example, feature_name):
"""Get the value of a feature from Example regardless of feature type."""
feature = get_example_features(example)[feature_name]
if feature is None:
raise ValueError('Feature {} is not on example proto.'.format(feature_name))
feature_type = feature.WhichOne... | [
"def",
"proto_value_for_feature",
"(",
"example",
",",
"feature_name",
")",
":",
"feature",
"=",
"get_example_features",
"(",
"example",
")",
"[",
"feature_name",
"]",
"if",
"feature",
"is",
"None",
":",
"raise",
"ValueError",
"(",
"'Feature {} is not on example pro... | Get the value of a feature from Example regardless of feature type. | [
"Get",
"the",
"value",
"of",
"a",
"feature",
"from",
"Example",
"regardless",
"of",
"feature",
"type",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/interactive_inference/utils/inference_utils.py#L225-L234 | train | Get the value of a feature from Example regardless of feature type. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/interactive_inference/utils/inference_utils.py | parse_original_feature_from_example | def parse_original_feature_from_example(example, feature_name):
"""Returns an `OriginalFeatureList` for the specified feature_name.
Args:
example: An example.
feature_name: A string feature name.
Returns:
A filled in `OriginalFeatureList` object representing the feature.
"""
feature = get_exampl... | python | def parse_original_feature_from_example(example, feature_name):
"""Returns an `OriginalFeatureList` for the specified feature_name.
Args:
example: An example.
feature_name: A string feature name.
Returns:
A filled in `OriginalFeatureList` object representing the feature.
"""
feature = get_exampl... | [
"def",
"parse_original_feature_from_example",
"(",
"example",
",",
"feature_name",
")",
":",
"feature",
"=",
"get_example_features",
"(",
"example",
")",
"[",
"feature_name",
"]",
"feature_type",
"=",
"feature",
".",
"WhichOneof",
"(",
"'kind'",
")",
"original_value... | Returns an `OriginalFeatureList` for the specified feature_name.
Args:
example: An example.
feature_name: A string feature name.
Returns:
A filled in `OriginalFeatureList` object representing the feature. | [
"Returns",
"an",
"OriginalFeatureList",
"for",
"the",
"specified",
"feature_name",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/interactive_inference/utils/inference_utils.py#L237-L251 | train | Returns an OriginalFeatureList object representing the original feature. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/interactive_inference/utils/inference_utils.py | wrap_inference_results | def wrap_inference_results(inference_result_proto):
"""Returns packaged inference results from the provided proto.
Args:
inference_result_proto: The classification or regression response proto.
Returns:
An InferenceResult proto with the result from the response.
"""
inference_proto = inference_pb2.I... | python | def wrap_inference_results(inference_result_proto):
"""Returns packaged inference results from the provided proto.
Args:
inference_result_proto: The classification or regression response proto.
Returns:
An InferenceResult proto with the result from the response.
"""
inference_proto = inference_pb2.I... | [
"def",
"wrap_inference_results",
"(",
"inference_result_proto",
")",
":",
"inference_proto",
"=",
"inference_pb2",
".",
"InferenceResult",
"(",
")",
"if",
"isinstance",
"(",
"inference_result_proto",
",",
"classification_pb2",
".",
"ClassificationResponse",
")",
":",
"i... | Returns packaged inference results from the provided proto.
Args:
inference_result_proto: The classification or regression response proto.
Returns:
An InferenceResult proto with the result from the response. | [
"Returns",
"packaged",
"inference",
"results",
"from",
"the",
"provided",
"proto",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/interactive_inference/utils/inference_utils.py#L254-L270 | train | Wraps the provided InferenceResult proto into a new InferenceResult proto. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/interactive_inference/utils/inference_utils.py | get_numeric_feature_names | def get_numeric_feature_names(example):
"""Returns a list of feature names for float and int64 type features.
Args:
example: An example.
Returns:
A list of strings of the names of numeric features.
"""
numeric_features = ('float_list', 'int64_list')
features = get_example_features(example)
retur... | python | def get_numeric_feature_names(example):
"""Returns a list of feature names for float and int64 type features.
Args:
example: An example.
Returns:
A list of strings of the names of numeric features.
"""
numeric_features = ('float_list', 'int64_list')
features = get_example_features(example)
retur... | [
"def",
"get_numeric_feature_names",
"(",
"example",
")",
":",
"numeric_features",
"=",
"(",
"'float_list'",
",",
"'int64_list'",
")",
"features",
"=",
"get_example_features",
"(",
"example",
")",
"return",
"sorted",
"(",
"[",
"feature_name",
"for",
"feature_name",
... | Returns a list of feature names for float and int64 type features.
Args:
example: An example.
Returns:
A list of strings of the names of numeric features. | [
"Returns",
"a",
"list",
"of",
"feature",
"names",
"for",
"float",
"and",
"int64",
"type",
"features",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/interactive_inference/utils/inference_utils.py#L273-L287 | train | Returns a list of feature names for float and int64 type features. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/interactive_inference/utils/inference_utils.py | get_categorical_feature_names | def get_categorical_feature_names(example):
"""Returns a list of feature names for byte type features.
Args:
example: An example.
Returns:
A list of categorical feature names (e.g. ['education', 'marital_status'] )
"""
features = get_example_features(example)
return sorted([
feature_name for... | python | def get_categorical_feature_names(example):
"""Returns a list of feature names for byte type features.
Args:
example: An example.
Returns:
A list of categorical feature names (e.g. ['education', 'marital_status'] )
"""
features = get_example_features(example)
return sorted([
feature_name for... | [
"def",
"get_categorical_feature_names",
"(",
"example",
")",
":",
"features",
"=",
"get_example_features",
"(",
"example",
")",
"return",
"sorted",
"(",
"[",
"feature_name",
"for",
"feature_name",
"in",
"features",
"if",
"features",
"[",
"feature_name",
"]",
".",
... | Returns a list of feature names for byte type features.
Args:
example: An example.
Returns:
A list of categorical feature names (e.g. ['education', 'marital_status'] ) | [
"Returns",
"a",
"list",
"of",
"feature",
"names",
"for",
"byte",
"type",
"features",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/interactive_inference/utils/inference_utils.py#L290-L303 | train | Returns a list of categorical feature names for byte type features. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/interactive_inference/utils/inference_utils.py | get_numeric_features_to_observed_range | def get_numeric_features_to_observed_range(examples):
"""Returns numerical features and their observed ranges.
Args:
examples: Examples to read to get ranges.
Returns:
A dict mapping feature_name -> {'observedMin': 'observedMax': } dicts,
with a key for each numerical feature.
"""
observed_featu... | python | def get_numeric_features_to_observed_range(examples):
"""Returns numerical features and their observed ranges.
Args:
examples: Examples to read to get ranges.
Returns:
A dict mapping feature_name -> {'observedMin': 'observedMax': } dicts,
with a key for each numerical feature.
"""
observed_featu... | [
"def",
"get_numeric_features_to_observed_range",
"(",
"examples",
")",
":",
"observed_features",
"=",
"collections",
".",
"defaultdict",
"(",
"list",
")",
"# name -> [value, ]",
"for",
"example",
"in",
"examples",
":",
"for",
"feature_name",
"in",
"get_numeric_feature_n... | Returns numerical features and their observed ranges.
Args:
examples: Examples to read to get ranges.
Returns:
A dict mapping feature_name -> {'observedMin': 'observedMax': } dicts,
with a key for each numerical feature. | [
"Returns",
"numerical",
"features",
"and",
"their",
"observed",
"ranges",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/interactive_inference/utils/inference_utils.py#L306-L328 | train | Returns a dict mapping each numerical feature name to observed range. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/interactive_inference/utils/inference_utils.py | get_categorical_features_to_sampling | def get_categorical_features_to_sampling(examples, top_k):
"""Returns categorical features and a sampling of their most-common values.
The results of this slow function are used by the visualization repeatedly,
so the results are cached.
Args:
examples: Examples to read to get feature samples.
top_k: ... | python | def get_categorical_features_to_sampling(examples, top_k):
"""Returns categorical features and a sampling of their most-common values.
The results of this slow function are used by the visualization repeatedly,
so the results are cached.
Args:
examples: Examples to read to get feature samples.
top_k: ... | [
"def",
"get_categorical_features_to_sampling",
"(",
"examples",
",",
"top_k",
")",
":",
"observed_features",
"=",
"collections",
".",
"defaultdict",
"(",
"list",
")",
"# name -> [value, ]",
"for",
"example",
"in",
"examples",
":",
"for",
"feature_name",
"in",
"get_c... | Returns categorical features and a sampling of their most-common values.
The results of this slow function are used by the visualization repeatedly,
so the results are cached.
Args:
examples: Examples to read to get feature samples.
top_k: Max number of samples to return per feature.
Returns:
A d... | [
"Returns",
"categorical",
"features",
"and",
"a",
"sampling",
"of",
"their",
"most",
"-",
"common",
"values",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/interactive_inference/utils/inference_utils.py#L331-L367 | train | Returns categorical features and a sampling of their most - common values. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/interactive_inference/utils/inference_utils.py | make_mutant_features | def make_mutant_features(original_feature, index_to_mutate, viz_params):
"""Return a list of `MutantFeatureValue`s that are variants of original."""
lower = viz_params.x_min
upper = viz_params.x_max
examples = viz_params.examples
num_mutants = viz_params.num_mutants
if original_feature.feature_type == 'flo... | python | def make_mutant_features(original_feature, index_to_mutate, viz_params):
"""Return a list of `MutantFeatureValue`s that are variants of original."""
lower = viz_params.x_min
upper = viz_params.x_max
examples = viz_params.examples
num_mutants = viz_params.num_mutants
if original_feature.feature_type == 'flo... | [
"def",
"make_mutant_features",
"(",
"original_feature",
",",
"index_to_mutate",
",",
"viz_params",
")",
":",
"lower",
"=",
"viz_params",
".",
"x_min",
"upper",
"=",
"viz_params",
".",
"x_max",
"examples",
"=",
"viz_params",
".",
"examples",
"num_mutants",
"=",
"... | Return a list of `MutantFeatureValue`s that are variants of original. | [
"Return",
"a",
"list",
"of",
"MutantFeatureValue",
"s",
"that",
"are",
"variants",
"of",
"original",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/interactive_inference/utils/inference_utils.py#L370-L404 | train | Return a list of MutantFeatureValue s that are variants of original. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/interactive_inference/utils/inference_utils.py | make_mutant_tuples | def make_mutant_tuples(example_protos, original_feature, index_to_mutate,
viz_params):
"""Return a list of `MutantFeatureValue`s and a list of mutant Examples.
Args:
example_protos: The examples to mutate.
original_feature: A `OriginalFeatureList` that encapsulates the feature to
... | python | def make_mutant_tuples(example_protos, original_feature, index_to_mutate,
viz_params):
"""Return a list of `MutantFeatureValue`s and a list of mutant Examples.
Args:
example_protos: The examples to mutate.
original_feature: A `OriginalFeatureList` that encapsulates the feature to
... | [
"def",
"make_mutant_tuples",
"(",
"example_protos",
",",
"original_feature",
",",
"index_to_mutate",
",",
"viz_params",
")",
":",
"mutant_features",
"=",
"make_mutant_features",
"(",
"original_feature",
",",
"index_to_mutate",
",",
"viz_params",
")",
"mutant_examples",
... | Return a list of `MutantFeatureValue`s and a list of mutant Examples.
Args:
example_protos: The examples to mutate.
original_feature: A `OriginalFeatureList` that encapsulates the feature to
mutate.
index_to_mutate: The index of the int64_list or float_list to mutate.
viz_params: A `VizParams` ... | [
"Return",
"a",
"list",
"of",
"MutantFeatureValue",
"s",
"and",
"a",
"list",
"of",
"mutant",
"Examples",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/interactive_inference/utils/inference_utils.py#L407-L447 | train | Creates a list of tuples that are lists of MutantFeatureValue s and a list of MutantExamples. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/interactive_inference/utils/inference_utils.py | mutant_charts_for_feature | def mutant_charts_for_feature(example_protos, feature_name, serving_bundles,
viz_params):
"""Returns JSON formatted for rendering all charts for a feature.
Args:
example_proto: The example protos to mutate.
feature_name: The string feature name to mutate.
serving_bundles: ... | python | def mutant_charts_for_feature(example_protos, feature_name, serving_bundles,
viz_params):
"""Returns JSON formatted for rendering all charts for a feature.
Args:
example_proto: The example protos to mutate.
feature_name: The string feature name to mutate.
serving_bundles: ... | [
"def",
"mutant_charts_for_feature",
"(",
"example_protos",
",",
"feature_name",
",",
"serving_bundles",
",",
"viz_params",
")",
":",
"def",
"chart_for_index",
"(",
"index_to_mutate",
")",
":",
"mutant_features",
",",
"mutant_examples",
"=",
"make_mutant_tuples",
"(",
... | Returns JSON formatted for rendering all charts for a feature.
Args:
example_proto: The example protos to mutate.
feature_name: The string feature name to mutate.
serving_bundles: One `ServingBundle` object per model, that contains the
information to make the serving request.
viz_params: A `Viz... | [
"Returns",
"JSON",
"formatted",
"for",
"rendering",
"all",
"charts",
"for",
"a",
"feature",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/interactive_inference/utils/inference_utils.py#L450-L507 | train | Returns a JSON - formatted representation of the mutant charts for a single feature. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/interactive_inference/utils/inference_utils.py | make_json_formatted_for_single_chart | def make_json_formatted_for_single_chart(mutant_features,
inference_result_proto,
index_to_mutate):
"""Returns JSON formatted for a single mutant chart.
Args:
mutant_features: An iterable of `MutantFeatureValue`s representing the... | python | def make_json_formatted_for_single_chart(mutant_features,
inference_result_proto,
index_to_mutate):
"""Returns JSON formatted for a single mutant chart.
Args:
mutant_features: An iterable of `MutantFeatureValue`s representing the... | [
"def",
"make_json_formatted_for_single_chart",
"(",
"mutant_features",
",",
"inference_result_proto",
",",
"index_to_mutate",
")",
":",
"x_label",
"=",
"'step'",
"y_label",
"=",
"'scalar'",
"if",
"isinstance",
"(",
"inference_result_proto",
",",
"classification_pb2",
".",... | Returns JSON formatted for a single mutant chart.
Args:
mutant_features: An iterable of `MutantFeatureValue`s representing the
X-axis.
inference_result_proto: A ClassificationResponse or RegressionResponse
returned by Servo, representing the Y-axis.
It contains one 'classification' or 'regr... | [
"Returns",
"JSON",
"formatted",
"for",
"a",
"single",
"mutant",
"chart",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/interactive_inference/utils/inference_utils.py#L510-L603 | train | Returns a JSON - formatted representation of a single chart. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/interactive_inference/utils/inference_utils.py | get_example_features | def get_example_features(example):
"""Returns the non-sequence features from the provided example."""
return (example.features.feature if isinstance(example, tf.train.Example)
else example.context.feature) | python | def get_example_features(example):
"""Returns the non-sequence features from the provided example."""
return (example.features.feature if isinstance(example, tf.train.Example)
else example.context.feature) | [
"def",
"get_example_features",
"(",
"example",
")",
":",
"return",
"(",
"example",
".",
"features",
".",
"feature",
"if",
"isinstance",
"(",
"example",
",",
"tf",
".",
"train",
".",
"Example",
")",
"else",
"example",
".",
"context",
".",
"feature",
")"
] | Returns the non-sequence features from the provided example. | [
"Returns",
"the",
"non",
"-",
"sequence",
"features",
"from",
"the",
"provided",
"example",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/interactive_inference/utils/inference_utils.py#L606-L609 | train | Returns the non - sequence features from the provided example. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/interactive_inference/utils/inference_utils.py | run_inference_for_inference_results | def run_inference_for_inference_results(examples, serving_bundle):
"""Calls servo and wraps the inference results."""
inference_result_proto = run_inference(examples, serving_bundle)
inferences = wrap_inference_results(inference_result_proto)
infer_json = json_format.MessageToJson(
inferences, including_def... | python | def run_inference_for_inference_results(examples, serving_bundle):
"""Calls servo and wraps the inference results."""
inference_result_proto = run_inference(examples, serving_bundle)
inferences = wrap_inference_results(inference_result_proto)
infer_json = json_format.MessageToJson(
inferences, including_def... | [
"def",
"run_inference_for_inference_results",
"(",
"examples",
",",
"serving_bundle",
")",
":",
"inference_result_proto",
"=",
"run_inference",
"(",
"examples",
",",
"serving_bundle",
")",
"inferences",
"=",
"wrap_inference_results",
"(",
"inference_result_proto",
")",
"i... | Calls servo and wraps the inference results. | [
"Calls",
"servo",
"and",
"wraps",
"the",
"inference",
"results",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/interactive_inference/utils/inference_utils.py#L611-L617 | train | Calls servo and wraps the inference results. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/interactive_inference/utils/inference_utils.py | get_eligible_features | def get_eligible_features(examples, num_mutants):
"""Returns a list of JSON objects for each feature in the examples.
This list is used to drive partial dependence plots in the plugin.
Args:
examples: Examples to examine to determine the eligible features.
num_mutants: The number of mutations to... | python | def get_eligible_features(examples, num_mutants):
"""Returns a list of JSON objects for each feature in the examples.
This list is used to drive partial dependence plots in the plugin.
Args:
examples: Examples to examine to determine the eligible features.
num_mutants: The number of mutations to... | [
"def",
"get_eligible_features",
"(",
"examples",
",",
"num_mutants",
")",
":",
"features_dict",
"=",
"(",
"get_numeric_features_to_observed_range",
"(",
"examples",
")",
")",
"features_dict",
".",
"update",
"(",
"get_categorical_features_to_sampling",
"(",
"examples",
"... | Returns a list of JSON objects for each feature in the examples.
This list is used to drive partial dependence plots in the plugin.
Args:
examples: Examples to examine to determine the eligible features.
num_mutants: The number of mutations to make over each feature.
Returns:
A list wit... | [
"Returns",
"a",
"list",
"of",
"JSON",
"objects",
"for",
"each",
"feature",
"in",
"the",
"examples",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/interactive_inference/utils/inference_utils.py#L619-L647 | train | Returns a list of JSON objects for each feature in the examples. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/interactive_inference/utils/inference_utils.py | get_label_vocab | def get_label_vocab(vocab_path):
"""Returns a list of label strings loaded from the provided path."""
if vocab_path:
try:
with tf.io.gfile.GFile(vocab_path, 'r') as f:
return [line.rstrip('\n') for line in f]
except tf.errors.NotFoundError as err:
tf.logging.error('error reading vocab fi... | python | def get_label_vocab(vocab_path):
"""Returns a list of label strings loaded from the provided path."""
if vocab_path:
try:
with tf.io.gfile.GFile(vocab_path, 'r') as f:
return [line.rstrip('\n') for line in f]
except tf.errors.NotFoundError as err:
tf.logging.error('error reading vocab fi... | [
"def",
"get_label_vocab",
"(",
"vocab_path",
")",
":",
"if",
"vocab_path",
":",
"try",
":",
"with",
"tf",
".",
"io",
".",
"gfile",
".",
"GFile",
"(",
"vocab_path",
",",
"'r'",
")",
"as",
"f",
":",
"return",
"[",
"line",
".",
"rstrip",
"(",
"'\\n'",
... | Returns a list of label strings loaded from the provided path. | [
"Returns",
"a",
"list",
"of",
"label",
"strings",
"loaded",
"from",
"the",
"provided",
"path",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/interactive_inference/utils/inference_utils.py#L649-L657 | train | Returns a list of label strings loaded from the provided path. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/interactive_inference/utils/inference_utils.py | create_sprite_image | def create_sprite_image(examples):
"""Returns an encoded sprite image for use in Facets Dive.
Args:
examples: A list of serialized example protos to get images for.
Returns:
An encoded PNG.
"""
def generate_image_from_thubnails(thumbnails, thumbnail_dims):
"""Generates a sprite ... | python | def create_sprite_image(examples):
"""Returns an encoded sprite image for use in Facets Dive.
Args:
examples: A list of serialized example protos to get images for.
Returns:
An encoded PNG.
"""
def generate_image_from_thubnails(thumbnails, thumbnail_dims):
"""Generates a sprite ... | [
"def",
"create_sprite_image",
"(",
"examples",
")",
":",
"def",
"generate_image_from_thubnails",
"(",
"thumbnails",
",",
"thumbnail_dims",
")",
":",
"\"\"\"Generates a sprite atlas image from a set of thumbnails.\"\"\"",
"num_thumbnails",
"=",
"tf",
".",
"shape",
"(",
"thum... | Returns an encoded sprite image for use in Facets Dive.
Args:
examples: A list of serialized example protos to get images for.
Returns:
An encoded PNG. | [
"Returns",
"an",
"encoded",
"sprite",
"image",
"for",
"use",
"in",
"Facets",
"Dive",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/interactive_inference/utils/inference_utils.py#L659-L727 | train | Creates a sprite image for use in Facets Dive. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/interactive_inference/utils/inference_utils.py | run_inference | def run_inference(examples, serving_bundle):
"""Run inference on examples given model information
Args:
examples: A list of examples that matches the model spec.
serving_bundle: A `ServingBundle` object that contains the information to
make the inference request.
Returns:
A ClassificationRespo... | python | def run_inference(examples, serving_bundle):
"""Run inference on examples given model information
Args:
examples: A list of examples that matches the model spec.
serving_bundle: A `ServingBundle` object that contains the information to
make the inference request.
Returns:
A ClassificationRespo... | [
"def",
"run_inference",
"(",
"examples",
",",
"serving_bundle",
")",
":",
"batch_size",
"=",
"64",
"if",
"serving_bundle",
".",
"estimator",
"and",
"serving_bundle",
".",
"feature_spec",
":",
"# If provided an estimator and feature spec then run inference locally.",
"preds"... | Run inference on examples given model information
Args:
examples: A list of examples that matches the model spec.
serving_bundle: A `ServingBundle` object that contains the information to
make the inference request.
Returns:
A ClassificationResponse or RegressionResponse proto. | [
"Run",
"inference",
"on",
"examples",
"given",
"model",
"information"
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/interactive_inference/utils/inference_utils.py#L729-L765 | train | Run inference on examples given model information. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/backend/event_processing/reservoir.py | Reservoir.Items | def Items(self, key):
"""Return items associated with given key.
Args:
key: The key for which we are finding associated items.
Raises:
KeyError: If the key is not found in the reservoir.
Returns:
[list, of, items] associated with that key.
"""
with self._mutex:
if key ... | python | def Items(self, key):
"""Return items associated with given key.
Args:
key: The key for which we are finding associated items.
Raises:
KeyError: If the key is not found in the reservoir.
Returns:
[list, of, items] associated with that key.
"""
with self._mutex:
if key ... | [
"def",
"Items",
"(",
"self",
",",
"key",
")",
":",
"with",
"self",
".",
"_mutex",
":",
"if",
"key",
"not",
"in",
"self",
".",
"_buckets",
":",
"raise",
"KeyError",
"(",
"'Key %s was not found in Reservoir'",
"%",
"key",
")",
"bucket",
"=",
"self",
".",
... | Return items associated with given key.
Args:
key: The key for which we are finding associated items.
Raises:
KeyError: If the key is not found in the reservoir.
Returns:
[list, of, items] associated with that key. | [
"Return",
"items",
"associated",
"with",
"given",
"key",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/backend/event_processing/reservoir.py#L96-L112 | train | Returns a list of items associated with a given key. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/backend/event_processing/reservoir.py | Reservoir.AddItem | def AddItem(self, key, item, f=lambda x: x):
"""Add a new item to the Reservoir with the given tag.
If the reservoir has not yet reached full size, the new item is guaranteed
to be added. If the reservoir is full, then behavior depends on the
always_keep_last boolean.
If always_keep_last was set t... | python | def AddItem(self, key, item, f=lambda x: x):
"""Add a new item to the Reservoir with the given tag.
If the reservoir has not yet reached full size, the new item is guaranteed
to be added. If the reservoir is full, then behavior depends on the
always_keep_last boolean.
If always_keep_last was set t... | [
"def",
"AddItem",
"(",
"self",
",",
"key",
",",
"item",
",",
"f",
"=",
"lambda",
"x",
":",
"x",
")",
":",
"with",
"self",
".",
"_mutex",
":",
"bucket",
"=",
"self",
".",
"_buckets",
"[",
"key",
"]",
"bucket",
".",
"AddItem",
"(",
"item",
",",
"... | Add a new item to the Reservoir with the given tag.
If the reservoir has not yet reached full size, the new item is guaranteed
to be added. If the reservoir is full, then behavior depends on the
always_keep_last boolean.
If always_keep_last was set to true, the new item is guaranteed to be added
t... | [
"Add",
"a",
"new",
"item",
"to",
"the",
"Reservoir",
"with",
"the",
"given",
"tag",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/backend/event_processing/reservoir.py#L114-L138 | train | Adds a new item to the Reservoir with the given tag. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/backend/event_processing/reservoir.py | Reservoir.FilterItems | def FilterItems(self, filterFn, key=None):
"""Filter items within a Reservoir, using a filtering function.
Args:
filterFn: A function that returns True for the items to be kept.
key: An optional bucket key to filter. If not specified, will filter all
all buckets.
Returns:
The num... | python | def FilterItems(self, filterFn, key=None):
"""Filter items within a Reservoir, using a filtering function.
Args:
filterFn: A function that returns True for the items to be kept.
key: An optional bucket key to filter. If not specified, will filter all
all buckets.
Returns:
The num... | [
"def",
"FilterItems",
"(",
"self",
",",
"filterFn",
",",
"key",
"=",
"None",
")",
":",
"with",
"self",
".",
"_mutex",
":",
"if",
"key",
":",
"if",
"key",
"in",
"self",
".",
"_buckets",
":",
"return",
"self",
".",
"_buckets",
"[",
"key",
"]",
".",
... | Filter items within a Reservoir, using a filtering function.
Args:
filterFn: A function that returns True for the items to be kept.
key: An optional bucket key to filter. If not specified, will filter all
all buckets.
Returns:
The number of items removed. | [
"Filter",
"items",
"within",
"a",
"Reservoir",
"using",
"a",
"filtering",
"function",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/backend/event_processing/reservoir.py#L140-L159 | train | Filter items within a Reservoir using a filtering function. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/backend/event_processing/reservoir.py | _ReservoirBucket.AddItem | def AddItem(self, item, f=lambda x: x):
"""Add an item to the ReservoirBucket, replacing an old item if necessary.
The new item is guaranteed to be added to the bucket, and to be the last
element in the bucket. If the bucket has reached capacity, then an old item
will be replaced. With probability (_ma... | python | def AddItem(self, item, f=lambda x: x):
"""Add an item to the ReservoirBucket, replacing an old item if necessary.
The new item is guaranteed to be added to the bucket, and to be the last
element in the bucket. If the bucket has reached capacity, then an old item
will be replaced. With probability (_ma... | [
"def",
"AddItem",
"(",
"self",
",",
"item",
",",
"f",
"=",
"lambda",
"x",
":",
"x",
")",
":",
"with",
"self",
".",
"_mutex",
":",
"if",
"len",
"(",
"self",
".",
"items",
")",
"<",
"self",
".",
"_max_size",
"or",
"self",
".",
"_max_size",
"==",
... | Add an item to the ReservoirBucket, replacing an old item if necessary.
The new item is guaranteed to be added to the bucket, and to be the last
element in the bucket. If the bucket has reached capacity, then an old item
will be replaced. With probability (_max_size/_num_items_seen) a random item
in th... | [
"Add",
"an",
"item",
"to",
"the",
"ReservoirBucket",
"replacing",
"an",
"old",
"item",
"if",
"necessary",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/backend/event_processing/reservoir.py#L196-L224 | train | Adds an item to the ReservoirBucket. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/backend/event_processing/reservoir.py | _ReservoirBucket.FilterItems | def FilterItems(self, filterFn):
"""Filter items in a ReservoirBucket, using a filtering function.
Filtering items from the reservoir bucket must update the
internal state variable self._num_items_seen, which is used for determining
the rate of replacement in reservoir sampling. Ideally, self._num_item... | python | def FilterItems(self, filterFn):
"""Filter items in a ReservoirBucket, using a filtering function.
Filtering items from the reservoir bucket must update the
internal state variable self._num_items_seen, which is used for determining
the rate of replacement in reservoir sampling. Ideally, self._num_item... | [
"def",
"FilterItems",
"(",
"self",
",",
"filterFn",
")",
":",
"with",
"self",
".",
"_mutex",
":",
"size_before",
"=",
"len",
"(",
"self",
".",
"items",
")",
"self",
".",
"items",
"=",
"list",
"(",
"filter",
"(",
"filterFn",
",",
"self",
".",
"items",... | Filter items in a ReservoirBucket, using a filtering function.
Filtering items from the reservoir bucket must update the
internal state variable self._num_items_seen, which is used for determining
the rate of replacement in reservoir sampling. Ideally, self._num_items_seen
would contain the exact numbe... | [
"Filter",
"items",
"in",
"a",
"ReservoirBucket",
"using",
"a",
"filtering",
"function",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/backend/event_processing/reservoir.py#L226-L254 | train | Filters items in a ReservoirBucket using a filtering function. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/util/tensor_util.py | _GetDenseDimensions | def _GetDenseDimensions(list_of_lists):
"""Returns the inferred dense dimensions of a list of lists."""
if not isinstance(list_of_lists, (list, tuple)):
return []
elif not list_of_lists:
return [0]
else:
return [len(list_of_lists)] + _GetDenseDimensions(list_of_lists[0]) | python | def _GetDenseDimensions(list_of_lists):
"""Returns the inferred dense dimensions of a list of lists."""
if not isinstance(list_of_lists, (list, tuple)):
return []
elif not list_of_lists:
return [0]
else:
return [len(list_of_lists)] + _GetDenseDimensions(list_of_lists[0]) | [
"def",
"_GetDenseDimensions",
"(",
"list_of_lists",
")",
":",
"if",
"not",
"isinstance",
"(",
"list_of_lists",
",",
"(",
"list",
",",
"tuple",
")",
")",
":",
"return",
"[",
"]",
"elif",
"not",
"list_of_lists",
":",
"return",
"[",
"0",
"]",
"else",
":",
... | Returns the inferred dense dimensions of a list of lists. | [
"Returns",
"the",
"inferred",
"dense",
"dimensions",
"of",
"a",
"list",
"of",
"lists",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/util/tensor_util.py#L134-L141 | train | Returns the inferred dense dimensions of a list of lists. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/util/tensor_util.py | make_tensor_proto | def make_tensor_proto(values, dtype=None, shape=None, verify_shape=False):
"""Create a TensorProto.
Args:
values: Values to put in the TensorProto.
dtype: Optional tensor_pb2 DataType value.
shape: List of integers representing the dimensions of tensor.
verify_shape: B... | python | def make_tensor_proto(values, dtype=None, shape=None, verify_shape=False):
"""Create a TensorProto.
Args:
values: Values to put in the TensorProto.
dtype: Optional tensor_pb2 DataType value.
shape: List of integers representing the dimensions of tensor.
verify_shape: B... | [
"def",
"make_tensor_proto",
"(",
"values",
",",
"dtype",
"=",
"None",
",",
"shape",
"=",
"None",
",",
"verify_shape",
"=",
"False",
")",
":",
"if",
"isinstance",
"(",
"values",
",",
"tensor_pb2",
".",
"TensorProto",
")",
":",
"return",
"values",
"if",
"d... | Create a TensorProto.
Args:
values: Values to put in the TensorProto.
dtype: Optional tensor_pb2 DataType value.
shape: List of integers representing the dimensions of tensor.
verify_shape: Boolean that enables verification of a shape of values.
Returns:
A `TensorPr... | [
"Create",
"a",
"TensorProto",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/util/tensor_util.py#L280-L480 | train | Creates a TensorProto from values dtype and shape. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/util/tensor_util.py | make_ndarray | def make_ndarray(tensor):
"""Create a numpy ndarray from a tensor.
Create a numpy ndarray with the same shape and data as the tensor.
Args:
tensor: A TensorProto.
Returns:
A numpy array with the tensor contents.
Raises:
TypeError: if tensor has unsupported type.
"""
shape = [d.size fo... | python | def make_ndarray(tensor):
"""Create a numpy ndarray from a tensor.
Create a numpy ndarray with the same shape and data as the tensor.
Args:
tensor: A TensorProto.
Returns:
A numpy array with the tensor contents.
Raises:
TypeError: if tensor has unsupported type.
"""
shape = [d.size fo... | [
"def",
"make_ndarray",
"(",
"tensor",
")",
":",
"shape",
"=",
"[",
"d",
".",
"size",
"for",
"d",
"in",
"tensor",
".",
"tensor_shape",
".",
"dim",
"]",
"num_elements",
"=",
"np",
".",
"prod",
"(",
"shape",
",",
"dtype",
"=",
"np",
".",
"int64",
")",... | Create a numpy ndarray from a tensor.
Create a numpy ndarray with the same shape and data as the tensor.
Args:
tensor: A TensorProto.
Returns:
A numpy array with the tensor contents.
Raises:
TypeError: if tensor has unsupported type. | [
"Create",
"a",
"numpy",
"ndarray",
"from",
"a",
"tensor",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/util/tensor_util.py#L483-L596 | train | Create a numpy ndarray from a tensor. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/custom_scalar/summary.py | op | def op(scalars_layout, collections=None):
"""Creates a summary that contains a layout.
When users navigate to the custom scalars dashboard, they will see a layout
based on the proto provided to this function.
Args:
scalars_layout: The scalars_layout_pb2.Layout proto that specifies the
layout.
... | python | def op(scalars_layout, collections=None):
"""Creates a summary that contains a layout.
When users navigate to the custom scalars dashboard, they will see a layout
based on the proto provided to this function.
Args:
scalars_layout: The scalars_layout_pb2.Layout proto that specifies the
layout.
... | [
"def",
"op",
"(",
"scalars_layout",
",",
"collections",
"=",
"None",
")",
":",
"# TODO(nickfelt): remove on-demand imports once dep situation is fixed.",
"import",
"tensorflow",
".",
"compat",
".",
"v1",
"as",
"tf",
"assert",
"isinstance",
"(",
"scalars_layout",
",",
... | Creates a summary that contains a layout.
When users navigate to the custom scalars dashboard, they will see a layout
based on the proto provided to this function.
Args:
scalars_layout: The scalars_layout_pb2.Layout proto that specifies the
layout.
collections: Optional list of graph collections... | [
"Creates",
"a",
"summary",
"that",
"contains",
"a",
"layout",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/custom_scalar/summary.py#L27-L53 | train | Creates a tensor summary op that writes the layout to disk. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/plugins/custom_scalar/summary.py | pb | def pb(scalars_layout):
"""Creates a summary that contains a layout.
When users navigate to the custom scalars dashboard, they will see a layout
based on the proto provided to this function.
Args:
scalars_layout: The scalars_layout_pb2.Layout proto that specifies the
layout.
Returns:
A summ... | python | def pb(scalars_layout):
"""Creates a summary that contains a layout.
When users navigate to the custom scalars dashboard, they will see a layout
based on the proto provided to this function.
Args:
scalars_layout: The scalars_layout_pb2.Layout proto that specifies the
layout.
Returns:
A summ... | [
"def",
"pb",
"(",
"scalars_layout",
")",
":",
"# TODO(nickfelt): remove on-demand imports once dep situation is fixed.",
"import",
"tensorflow",
".",
"compat",
".",
"v1",
"as",
"tf",
"assert",
"isinstance",
"(",
"scalars_layout",
",",
"layout_pb2",
".",
"Layout",
")",
... | Creates a summary that contains a layout.
When users navigate to the custom scalars dashboard, they will see a layout
based on the proto provided to this function.
Args:
scalars_layout: The scalars_layout_pb2.Layout proto that specifies the
layout.
Returns:
A summary proto containing the layo... | [
"Creates",
"a",
"summary",
"that",
"contains",
"a",
"layout",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/plugins/custom_scalar/summary.py#L56-L81 | train | Creates a summary that contains a layout. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/compat/tensorflow_stub/tensor_shape.py | Dimension.is_convertible_with | def is_convertible_with(self, other):
"""Returns true if `other` is convertible with this Dimension.
Two known Dimensions are convertible if they have the same value.
An unknown Dimension is convertible with all other Dimensions.
Args:
other: Another Dimension.
Retur... | python | def is_convertible_with(self, other):
"""Returns true if `other` is convertible with this Dimension.
Two known Dimensions are convertible if they have the same value.
An unknown Dimension is convertible with all other Dimensions.
Args:
other: Another Dimension.
Retur... | [
"def",
"is_convertible_with",
"(",
"self",
",",
"other",
")",
":",
"other",
"=",
"as_dimension",
"(",
"other",
")",
"return",
"self",
".",
"_value",
"is",
"None",
"or",
"other",
".",
"value",
"is",
"None",
"or",
"self",
".",
"_value",
"==",
"other",
".... | Returns true if `other` is convertible with this Dimension.
Two known Dimensions are convertible if they have the same value.
An unknown Dimension is convertible with all other Dimensions.
Args:
other: Another Dimension.
Returns:
True if this Dimension and `other` ... | [
"Returns",
"true",
"if",
"other",
"is",
"convertible",
"with",
"this",
"Dimension",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/compat/tensorflow_stub/tensor_shape.py#L88-L101 | train | Returns true if this Dimension is convertible with other. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/compat/tensorflow_stub/tensor_shape.py | Dimension.merge_with | def merge_with(self, other):
"""Returns a Dimension that combines the information in `self` and `other`.
Dimensions are combined as follows:
```python
tf.Dimension(n) .merge_with(tf.Dimension(n)) == tf.Dimension(n)
tf.Dimension(n) .merge_with(tf.Dimension(None)) == tf.Di... | python | def merge_with(self, other):
"""Returns a Dimension that combines the information in `self` and `other`.
Dimensions are combined as follows:
```python
tf.Dimension(n) .merge_with(tf.Dimension(n)) == tf.Dimension(n)
tf.Dimension(n) .merge_with(tf.Dimension(None)) == tf.Di... | [
"def",
"merge_with",
"(",
"self",
",",
"other",
")",
":",
"other",
"=",
"as_dimension",
"(",
"other",
")",
"self",
".",
"assert_is_convertible_with",
"(",
"other",
")",
"if",
"self",
".",
"_value",
"is",
"None",
":",
"return",
"Dimension",
"(",
"other",
... | Returns a Dimension that combines the information in `self` and `other`.
Dimensions are combined as follows:
```python
tf.Dimension(n) .merge_with(tf.Dimension(n)) == tf.Dimension(n)
tf.Dimension(n) .merge_with(tf.Dimension(None)) == tf.Dimension(n)
tf.Dimension(None).me... | [
"Returns",
"a",
"Dimension",
"that",
"combines",
"the",
"information",
"in",
"self",
"and",
"other",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/compat/tensorflow_stub/tensor_shape.py#L116-L145 | train | Returns a Dimension that combines the information in self and other. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/compat/tensorflow_stub/tensor_shape.py | TensorShape.ndims | def ndims(self):
"""Returns the rank of this shape, or None if it is unspecified."""
if self._dims is None:
return None
else:
if self._ndims is None:
self._ndims = len(self._dims)
return self._ndims | python | def ndims(self):
"""Returns the rank of this shape, or None if it is unspecified."""
if self._dims is None:
return None
else:
if self._ndims is None:
self._ndims = len(self._dims)
return self._ndims | [
"def",
"ndims",
"(",
"self",
")",
":",
"if",
"self",
".",
"_dims",
"is",
"None",
":",
"return",
"None",
"else",
":",
"if",
"self",
".",
"_ndims",
"is",
"None",
":",
"self",
".",
"_ndims",
"=",
"len",
"(",
"self",
".",
"_dims",
")",
"return",
"sel... | Returns the rank of this shape, or None if it is unspecified. | [
"Returns",
"the",
"rank",
"of",
"this",
"shape",
"or",
"None",
"if",
"it",
"is",
"unspecified",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/compat/tensorflow_stub/tensor_shape.py#L566-L573 | train | Returns the rank of this shape or None if it is unspecified. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/compat/tensorflow_stub/tensor_shape.py | TensorShape.num_elements | def num_elements(self):
"""Returns the total number of elements, or none for incomplete shapes."""
if self.is_fully_defined():
size = 1
for dim in self._dims:
size *= dim.value
return size
else:
return None | python | def num_elements(self):
"""Returns the total number of elements, or none for incomplete shapes."""
if self.is_fully_defined():
size = 1
for dim in self._dims:
size *= dim.value
return size
else:
return None | [
"def",
"num_elements",
"(",
"self",
")",
":",
"if",
"self",
".",
"is_fully_defined",
"(",
")",
":",
"size",
"=",
"1",
"for",
"dim",
"in",
"self",
".",
"_dims",
":",
"size",
"*=",
"dim",
".",
"value",
"return",
"size",
"else",
":",
"return",
"None"
] | Returns the total number of elements, or none for incomplete shapes. | [
"Returns",
"the",
"total",
"number",
"of",
"elements",
"or",
"none",
"for",
"incomplete",
"shapes",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/compat/tensorflow_stub/tensor_shape.py#L639-L647 | train | Returns the total number of elements for incomplete shapes or None for incomplete shapes. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/compat/tensorflow_stub/tensor_shape.py | TensorShape.merge_with | def merge_with(self, other):
"""Returns a `TensorShape` combining the information in `self` and `other`.
The dimensions in `self` and `other` are merged elementwise,
according to the rules defined for `Dimension.merge_with()`.
Args:
other: Another `TensorShape`.
Retu... | python | def merge_with(self, other):
"""Returns a `TensorShape` combining the information in `self` and `other`.
The dimensions in `self` and `other` are merged elementwise,
according to the rules defined for `Dimension.merge_with()`.
Args:
other: Another `TensorShape`.
Retu... | [
"def",
"merge_with",
"(",
"self",
",",
"other",
")",
":",
"other",
"=",
"as_shape",
"(",
"other",
")",
"if",
"self",
".",
"_dims",
"is",
"None",
":",
"return",
"other",
"else",
":",
"try",
":",
"self",
".",
"assert_same_rank",
"(",
"other",
")",
"new... | Returns a `TensorShape` combining the information in `self` and `other`.
The dimensions in `self` and `other` are merged elementwise,
according to the rules defined for `Dimension.merge_with()`.
Args:
other: Another `TensorShape`.
Returns:
A `TensorShape` containin... | [
"Returns",
"a",
"TensorShape",
"combining",
"the",
"information",
"in",
"self",
"and",
"other",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/compat/tensorflow_stub/tensor_shape.py#L649-L676 | train | Returns a TensorShape containing the combined information in self and other. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/compat/tensorflow_stub/tensor_shape.py | TensorShape.concatenate | def concatenate(self, other):
"""Returns the concatenation of the dimension in `self` and `other`.
*N.B.* If either `self` or `other` is completely unknown,
concatenation will discard information about the other shape. In
future, we might support concatenation that preserves this
... | python | def concatenate(self, other):
"""Returns the concatenation of the dimension in `self` and `other`.
*N.B.* If either `self` or `other` is completely unknown,
concatenation will discard information about the other shape. In
future, we might support concatenation that preserves this
... | [
"def",
"concatenate",
"(",
"self",
",",
"other",
")",
":",
"# TODO(mrry): Handle the case where we concatenate a known shape with a",
"# completely unknown shape, so that we can use the partial information.",
"other",
"=",
"as_shape",
"(",
"other",
")",
"if",
"self",
".",
"_dim... | Returns the concatenation of the dimension in `self` and `other`.
*N.B.* If either `self` or `other` is completely unknown,
concatenation will discard information about the other shape. In
future, we might support concatenation that preserves this
information for use with slicing.
... | [
"Returns",
"the",
"concatenation",
"of",
"the",
"dimension",
"in",
"self",
"and",
"other",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/compat/tensorflow_stub/tensor_shape.py#L678-L699 | train | Returns the concatenation of the dimension in self and other. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/compat/tensorflow_stub/tensor_shape.py | TensorShape.assert_same_rank | def assert_same_rank(self, other):
"""Raises an exception if `self` and `other` do not have convertible ranks.
Args:
other: Another `TensorShape`.
Raises:
ValueError: If `self` and `other` do not represent shapes with the
same rank.
"""
other = a... | python | def assert_same_rank(self, other):
"""Raises an exception if `self` and `other` do not have convertible ranks.
Args:
other: Another `TensorShape`.
Raises:
ValueError: If `self` and `other` do not represent shapes with the
same rank.
"""
other = a... | [
"def",
"assert_same_rank",
"(",
"self",
",",
"other",
")",
":",
"other",
"=",
"as_shape",
"(",
"other",
")",
"if",
"self",
".",
"ndims",
"is",
"not",
"None",
"and",
"other",
".",
"ndims",
"is",
"not",
"None",
":",
"if",
"self",
".",
"ndims",
"!=",
... | Raises an exception if `self` and `other` do not have convertible ranks.
Args:
other: Another `TensorShape`.
Raises:
ValueError: If `self` and `other` do not represent shapes with the
same rank. | [
"Raises",
"an",
"exception",
"if",
"self",
"and",
"other",
"do",
"not",
"have",
"convertible",
"ranks",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/compat/tensorflow_stub/tensor_shape.py#L701-L716 | train | Raises an exception if self and other do not have convertible ranks. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/compat/tensorflow_stub/tensor_shape.py | TensorShape.with_rank | def with_rank(self, rank):
"""Returns a shape based on `self` with the given rank.
This method promotes a completely unknown shape to one with a
known rank.
Args:
rank: An integer.
Returns:
A shape that is at least as specific as `self` with the given rank.... | python | def with_rank(self, rank):
"""Returns a shape based on `self` with the given rank.
This method promotes a completely unknown shape to one with a
known rank.
Args:
rank: An integer.
Returns:
A shape that is at least as specific as `self` with the given rank.... | [
"def",
"with_rank",
"(",
"self",
",",
"rank",
")",
":",
"try",
":",
"return",
"self",
".",
"merge_with",
"(",
"unknown_shape",
"(",
"ndims",
"=",
"rank",
")",
")",
"except",
"ValueError",
":",
"raise",
"ValueError",
"(",
"\"Shape %s must have rank %d\"",
"%"... | Returns a shape based on `self` with the given rank.
This method promotes a completely unknown shape to one with a
known rank.
Args:
rank: An integer.
Returns:
A shape that is at least as specific as `self` with the given rank.
Raises:
ValueError... | [
"Returns",
"a",
"shape",
"based",
"on",
"self",
"with",
"the",
"given",
"rank",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/compat/tensorflow_stub/tensor_shape.py#L730-L748 | train | Returns a new shape based on self with the given rank. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/compat/tensorflow_stub/tensor_shape.py | TensorShape.with_rank_at_least | def with_rank_at_least(self, rank):
"""Returns a shape based on `self` with at least the given rank.
Args:
rank: An integer.
Returns:
A shape that is at least as specific as `self` with at least the given
rank.
Raises:
ValueError: If `self` does... | python | def with_rank_at_least(self, rank):
"""Returns a shape based on `self` with at least the given rank.
Args:
rank: An integer.
Returns:
A shape that is at least as specific as `self` with at least the given
rank.
Raises:
ValueError: If `self` does... | [
"def",
"with_rank_at_least",
"(",
"self",
",",
"rank",
")",
":",
"if",
"self",
".",
"ndims",
"is",
"not",
"None",
"and",
"self",
".",
"ndims",
"<",
"rank",
":",
"raise",
"ValueError",
"(",
"\"Shape %s must have rank at least %d\"",
"%",
"(",
"self",
",",
"... | Returns a shape based on `self` with at least the given rank.
Args:
rank: An integer.
Returns:
A shape that is at least as specific as `self` with at least the given
rank.
Raises:
ValueError: If `self` does not represent a shape with at least the given
... | [
"Returns",
"a",
"shape",
"based",
"on",
"self",
"with",
"at",
"least",
"the",
"given",
"rank",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/compat/tensorflow_stub/tensor_shape.py#L750-L767 | train | Returns a new shape based on self with at least the given rank. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/compat/tensorflow_stub/tensor_shape.py | TensorShape.with_rank_at_most | def with_rank_at_most(self, rank):
"""Returns a shape based on `self` with at most the given rank.
Args:
rank: An integer.
Returns:
A shape that is at least as specific as `self` with at most the given
rank.
Raises:
ValueError: If `self` does no... | python | def with_rank_at_most(self, rank):
"""Returns a shape based on `self` with at most the given rank.
Args:
rank: An integer.
Returns:
A shape that is at least as specific as `self` with at most the given
rank.
Raises:
ValueError: If `self` does no... | [
"def",
"with_rank_at_most",
"(",
"self",
",",
"rank",
")",
":",
"if",
"self",
".",
"ndims",
"is",
"not",
"None",
"and",
"self",
".",
"ndims",
">",
"rank",
":",
"raise",
"ValueError",
"(",
"\"Shape %s must have rank at most %d\"",
"%",
"(",
"self",
",",
"ra... | Returns a shape based on `self` with at most the given rank.
Args:
rank: An integer.
Returns:
A shape that is at least as specific as `self` with at most the given
rank.
Raises:
ValueError: If `self` does not represent a shape with at most the given
... | [
"Returns",
"a",
"shape",
"based",
"on",
"self",
"with",
"at",
"most",
"the",
"given",
"rank",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/compat/tensorflow_stub/tensor_shape.py#L769-L786 | train | Returns a new shape based on self with at most the given rank. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/compat/tensorflow_stub/tensor_shape.py | TensorShape.is_convertible_with | def is_convertible_with(self, other):
"""Returns True iff `self` is convertible with `other`.
Two possibly-partially-defined shapes are convertible if there
exists a fully-defined shape that both shapes can represent. Thus,
convertibility allows the shape inference code to reason about
... | python | def is_convertible_with(self, other):
"""Returns True iff `self` is convertible with `other`.
Two possibly-partially-defined shapes are convertible if there
exists a fully-defined shape that both shapes can represent. Thus,
convertibility allows the shape inference code to reason about
... | [
"def",
"is_convertible_with",
"(",
"self",
",",
"other",
")",
":",
"other",
"=",
"as_shape",
"(",
"other",
")",
"if",
"self",
".",
"_dims",
"is",
"not",
"None",
"and",
"other",
".",
"dims",
"is",
"not",
"None",
":",
"if",
"self",
".",
"ndims",
"!=",
... | Returns True iff `self` is convertible with `other`.
Two possibly-partially-defined shapes are convertible if there
exists a fully-defined shape that both shapes can represent. Thus,
convertibility allows the shape inference code to reason about
partially-defined shapes. For example:
... | [
"Returns",
"True",
"iff",
"self",
"is",
"convertible",
"with",
"other",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/compat/tensorflow_stub/tensor_shape.py#L788-L833 | train | Returns True iff self is convertible with other. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/compat/tensorflow_stub/tensor_shape.py | TensorShape.most_specific_convertible_shape | def most_specific_convertible_shape(self, other):
"""Returns the most specific TensorShape convertible with `self` and `other`.
* TensorShape([None, 1]) is the most specific TensorShape convertible with
both TensorShape([2, 1]) and TensorShape([5, 1]). Note that
TensorShape(None) is... | python | def most_specific_convertible_shape(self, other):
"""Returns the most specific TensorShape convertible with `self` and `other`.
* TensorShape([None, 1]) is the most specific TensorShape convertible with
both TensorShape([2, 1]) and TensorShape([5, 1]). Note that
TensorShape(None) is... | [
"def",
"most_specific_convertible_shape",
"(",
"self",
",",
"other",
")",
":",
"other",
"=",
"as_shape",
"(",
"other",
")",
"if",
"self",
".",
"_dims",
"is",
"None",
"or",
"other",
".",
"dims",
"is",
"None",
"or",
"self",
".",
"ndims",
"!=",
"other",
"... | Returns the most specific TensorShape convertible with `self` and `other`.
* TensorShape([None, 1]) is the most specific TensorShape convertible with
both TensorShape([2, 1]) and TensorShape([5, 1]). Note that
TensorShape(None) is also convertible with above mentioned TensorShapes.
... | [
"Returns",
"the",
"most",
"specific",
"TensorShape",
"convertible",
"with",
"self",
"and",
"other",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/compat/tensorflow_stub/tensor_shape.py#L850-L878 | train | Returns the most specific TensorShape convertible with self and other. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/compat/tensorflow_stub/tensor_shape.py | TensorShape.is_fully_defined | def is_fully_defined(self):
"""Returns True iff `self` is fully defined in every dimension."""
return self._dims is not None and all(
dim.value is not None for dim in self._dims
) | python | def is_fully_defined(self):
"""Returns True iff `self` is fully defined in every dimension."""
return self._dims is not None and all(
dim.value is not None for dim in self._dims
) | [
"def",
"is_fully_defined",
"(",
"self",
")",
":",
"return",
"self",
".",
"_dims",
"is",
"not",
"None",
"and",
"all",
"(",
"dim",
".",
"value",
"is",
"not",
"None",
"for",
"dim",
"in",
"self",
".",
"_dims",
")"
] | Returns True iff `self` is fully defined in every dimension. | [
"Returns",
"True",
"iff",
"self",
"is",
"fully",
"defined",
"in",
"every",
"dimension",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/compat/tensorflow_stub/tensor_shape.py#L880-L884 | train | Returns True iff self is fully defined in every dimension. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/compat/tensorflow_stub/tensor_shape.py | TensorShape.as_list | def as_list(self):
"""Returns a list of integers or `None` for each dimension.
Returns:
A list of integers or `None` for each dimension.
Raises:
ValueError: If `self` is an unknown shape with an unknown rank.
"""
if self._dims is None:
raise Valu... | python | def as_list(self):
"""Returns a list of integers or `None` for each dimension.
Returns:
A list of integers or `None` for each dimension.
Raises:
ValueError: If `self` is an unknown shape with an unknown rank.
"""
if self._dims is None:
raise Valu... | [
"def",
"as_list",
"(",
"self",
")",
":",
"if",
"self",
".",
"_dims",
"is",
"None",
":",
"raise",
"ValueError",
"(",
"\"as_list() is not defined on an unknown TensorShape.\"",
")",
"return",
"[",
"dim",
".",
"value",
"for",
"dim",
"in",
"self",
".",
"_dims",
... | Returns a list of integers or `None` for each dimension.
Returns:
A list of integers or `None` for each dimension.
Raises:
ValueError: If `self` is an unknown shape with an unknown rank. | [
"Returns",
"a",
"list",
"of",
"integers",
"or",
"None",
"for",
"each",
"dimension",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/compat/tensorflow_stub/tensor_shape.py#L895-L906 | train | Returns a list of integers or None for each dimension. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
tensorflow/tensorboard | tensorboard/compat/tensorflow_stub/tensor_shape.py | TensorShape.as_proto | def as_proto(self):
"""Returns this shape as a `TensorShapeProto`."""
if self._dims is None:
return tensor_shape_pb2.TensorShapeProto(unknown_rank=True)
else:
return tensor_shape_pb2.TensorShapeProto(
dim=[
tensor_shape_pb2.TensorShapeP... | python | def as_proto(self):
"""Returns this shape as a `TensorShapeProto`."""
if self._dims is None:
return tensor_shape_pb2.TensorShapeProto(unknown_rank=True)
else:
return tensor_shape_pb2.TensorShapeProto(
dim=[
tensor_shape_pb2.TensorShapeP... | [
"def",
"as_proto",
"(",
"self",
")",
":",
"if",
"self",
".",
"_dims",
"is",
"None",
":",
"return",
"tensor_shape_pb2",
".",
"TensorShapeProto",
"(",
"unknown_rank",
"=",
"True",
")",
"else",
":",
"return",
"tensor_shape_pb2",
".",
"TensorShapeProto",
"(",
"d... | Returns this shape as a `TensorShapeProto`. | [
"Returns",
"this",
"shape",
"as",
"a",
"TensorShapeProto",
"."
] | 8e5f497b48e40f2a774f85416b8a35ac0693c35e | https://github.com/tensorflow/tensorboard/blob/8e5f497b48e40f2a774f85416b8a35ac0693c35e/tensorboard/compat/tensorflow_stub/tensor_shape.py#L908-L920 | train | Returns this shape as a TensorShapeProto. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.