-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Components - Tensorboard visualization (#3760)
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
components/tensorflow/tensorboard/prepare_tensorboard/component.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Create Tensorboard visualization | ||
description: | | ||
Pre-creates Tensorboard visualization for a given Log dir URI. | ||
This way the Tensorboard can be viewed before the training completes. | ||
The output Log dir URI should be passed to a trainer component that will write Tensorboard logs to that directory. | ||
inputs: | ||
- {name: Log dir URI} | ||
outputs: | ||
- {name: Log dir URI} | ||
- {name: MLPipeline UI Metadata} | ||
implementation: | ||
container: | ||
image: alpine | ||
command: | ||
- sh | ||
- -ex | ||
- -c | ||
- | | ||
log_dir="$0" | ||
output_log_dir_path="$1" | ||
output_metadata_path="$2" | ||
mkdir -p "$(dirname "$output_log_dir_path")" | ||
mkdir -p "$(dirname "$output_metadata_path")" | ||
echo "$log_dir" > "$output_log_dir_path" | ||
echo ' | ||
{ | ||
"outputs" : [{ | ||
"type": "tensorboard", | ||
"source": "'"$log_dir"'" | ||
}] | ||
} | ||
' >"$output_metadata_path" | ||
- {inputValue: Log dir URI} | ||
- {outputPath: Log dir URI} | ||
- {outputPath: MLPipeline UI Metadata} |