Skip to content

several small documentation fixes #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/src/custom_behaviour.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Specifying a backend

By default TensorBoardLogger follows those rules to chose what backend a certain
By default TensorBoardLogger follows these rules to choose what backend a certain
value is sent to:

- `::AbstractVector{<:Real}` -> [Histogram backend](https://www.tensorflow.org/guide/tensorboard_histograms) as a vector
Expand Down
2 changes: 1 addition & 1 deletion docs/src/deserialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ If you want to read data that have been saved previously, you can also construct
Alternatively, you can use the method [`map_summaries`](@ref) to iterate a function of your choice among the data contained in a logger. This function
takes two arguments: a function and the path/`TBLogger` to the data.

The function is mapped across all logged summaries. It's signature should be
The function is mapped across all logged summaries. Its signature should be
`fun(tag, iteration, value)`, where tag is a `String` with the tag used to serialize the data, `iteration` is an `Int` corresponding to the iteration at which the data was serialized, and `value` is the serialized value.

An attempt is made to reconstruct as much as possible the original data, but in the serialization process data is usually converted to lower precision and compressed, so sometimes it's not the case.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/examples/flux.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Using TensorBoard with [Flux](https://fluxml.ai)
For a Google Colab version of this example, go [here](https://colab.research.google.com/drive/1xfUsBn9GEqbRjBF-UX_jnGjHZNtNsMae)
For a Google Colab version of this example, go [here](https://colab.research.google.com/drive/1xfUsBn9GEqbRjBF-UX_jnGjHZNtNsMae).
The most important part of the example is the callback `TBCallback` which
handles logging to TensorBoard.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/explicit_interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

in addition to the standard logging interface, it is possible to log
data to TensorBoard using the functions documented below.
All the functions accept take as first argument a `TBLogger` object
All the functions take as first argument a `TBLogger` object
and as the second argument a `String` as the tag under which the
data will be logged.

Expand Down
8 changes: 4 additions & 4 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ end

When you log data to tensorboard, it is processed to convert it to the format
used by TensorBoard.
In particoular, fields in structures are logged individually individually and complex
numbers/arrays are split into their real and imaginary parts. Depending on it's type, an
In particular, fields in structures are logged individually and complex
numbers/arrays are split into their real and imaginary parts. Depending on its type, an
object is serialized to the relevant backend, with the text backend being the
default fallback.

Expand All @@ -116,6 +116,6 @@ We also support logging custom types from a the following third-party libraries:

## Explicit logging

In alternative, you can also log data to TensorBoard through it's functional interface,
In alternative, you can also log data to TensorBoard through its functional interface,
by calling the relevant method with a tag string and the data. For information
on this interface refer to [Explicit interface]@ref()...
on this interface refer to [Explicit interface](@ref)...
2 changes: 1 addition & 1 deletion src/Deserialization/histograms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function lookahead_deserialize_histogram_summary(old_tag, old_val, evs::Summary,
res = iterate(evs, state + 1)
res == nothing && return result

# if the next event is identified, check it's type
# if the next event is identified, check its type
(new_tag, summary), i_state = res
typ = summary_type(summary)

Expand Down
2 changes: 1 addition & 1 deletion src/Deserialization/lookahead.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function lookahead_deserialize_simple_value_summary(old_tag, old_val, evs::Summa
res = iterate(evs, state + 1)
res == nothing && return result

# if the next event is identified, check it's type
# if the next event is identified, check its type
(new_tag, summary), i_state = res
typ = summary_type(summary)

Expand Down
4 changes: 2 additions & 2 deletions src/Loggers/LogCustomScalar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
@enum tb_chart_type tb_multiline=1 tb_margin=2

"""
log_custom_scalar(logger, layout::AbstractDict; step = step(logger))
log_custom_scalar(logger, layout::AbstractDict; step = step(logger))

Groups multiple scalars in the same plot to be visualized by the CUSTOM_SCALARS
plugin. Note that this function sets the metadata: the actual values must be
logged separately with `log_value` and referenced with the correct tag.

The `layout` argument is structured as follows:

layout = Dict(category => Dict(name => (chart_type, [tag1, tag2, ...])))
layout = Dict(category => Dict(name => (chart_type, [tag1, tag2, ...])))

where `category` is the main tag for the plot, `name` is the plot's name,
`chart_type` is one between `tb_multiline` and `tb_margin` and the array of tags
Expand Down
2 changes: 1 addition & 1 deletion src/Loggers/LogValue.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
log_value(logger, name, value; step=step(logger))

Logs a Floating-point variable with name `name` at step `step`.
Logs a floating-point variable with name `name` at step `step`.
If `value` is a complex number, the real and imaginary part are logged
separately.
"""
Expand Down
2 changes: 1 addition & 1 deletion src/PNG.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ include("FileIO_workaround.jl")
"""
PngImage

A wrapper around the binary encoding of a PNG image, holding it's attributes
A wrapper around the binary encoding of a PNG image, holding its attributes
"""
struct PngImage
attr::Dict
Expand Down
10 changes: 5 additions & 5 deletions src/TBLogger.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ Creates a folder at path `logdir`. If the folder already exhists the behaviour
is determined by `overwrite`.

- `overwrite=tb_increment` appends an increasing number 1,2... to logdir.
- `overwrite=tb_overwrite` overwrites the folder, deleting it's content.
- `overwrite=tb_append` appends to it's previous content.
- `overwrite=tb_overwrite` overwrites the folder, deleting its content.
- `overwrite=tb_append` appends to its previous content.
"""
function init_logdir(logdir, overwrite=tb_increment)
if overwrite == tb_overwrite
Expand Down Expand Up @@ -122,9 +122,9 @@ function create_eventfile(logdir, purge_step=nothing, time=time(); prepend="")
end

"""
add_eventfile(lg::TBLogger, path::String)
add_eventfile(lg::TBLogger, path::String)

Adds an event file to `lg` with `path` prepended to it's name. It can be used
Adds an event file to `lg` with `path` prepended to its name. It can be used
to create sub-event collection in a single event collection.
"""
function add_eventfile(lg::TBLogger, path="")
Expand Down Expand Up @@ -198,7 +198,7 @@ step(lg::TBLogger) = lg.global_step
"""
reset!(lg)

Reset the TBLogger `lg`, deleting everything in it's log directory.
Reset the TBLogger `lg`, deleting everything in its log directory.
"""
function reset!(lg::TBLogger)
# close open streams
Expand Down
2 changes: 1 addition & 1 deletion src/logger_dispatch_overrides.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Returns the wrapped data inside of `x`.
"""
content(x::WrapperLogType) = @error "You should define `content($(typeof(x)))`"

# When we hit a wrapped type, we dispatch based on it's type.
# When we hit a wrapped type, we dispatch based on its type.
preprocess(name, val::WrapperLogType, data) = push!(data, name=>val)

# When logging to text or console, unwrap the LogType to fix formatting.
Expand Down