Initialize Logger
- class
visualdl.
LogWriter
(dir, sync_cycle, writer=None) - LogWriter is a Python wrapper to write data to log file with the dataformat defined in storage.proto. A User can get Scalar Reader/Image Reader/Histogram Reader from this module and use them to write the data to log file.
Parameters:
- dir (basestring) – The directory path to the saved log files.
- sync_cycle (integer) – Specify how often should the system store data into the file system.Typically adding a record requires 6 operations.System will save the data into the file system once operations count reaches sync_cycle.Returns:a new LogWriter instanceReturn type:LogWriter
Parameters:mode (basestring) – The logger will group data under mode.Returns:the logWriter itselfReturn type:LogWriter
Parameters:
- **tag** (_basestring_) – The audio writer will label the audio with tag
- **num_samples** (_integer_) – how many samples to take in a step.
- **step_cycle** (_integer_) – store every _step_cycle_ as a record.Returns:
A audio writer to sample audioReturn type:AudioWriter
Returns:An embedding writer to record embedding dataReturn type:embeddingWriter
histogram
(tag, num_buckets, type='float')- Create a histogram writer that used to writehistogram related data.
Parameters:tag (basestring) – The histogram writer will label the data with tagReturns:A histogram writer to record distributionReturn type:HistogramWriter
Parameters:
- **tag** (_basestring_) – The image writer will label the image with tag
- **num_samples** (_integer_) – how many samples to take in a step.
- **step_cycle** (_integer_) – store every _step_cycle_ as a record.Returns:
A image writer to sample imagesReturn type:ImageWriter
Parameters:mode (basestring) – The logger will group data under mode.Returns:a new LogWriter instance with modeReturn type:LogWriter
save
()Force the VisualDL to sync with the file system.
- Create a scalar writer with tag and type to write scalar data.
Parameters:tag (basestring) – The scalar writer will label the data with tagReturns:A scalar writer to handle step and value recordsReturn type:ScalarWriter
Parameters:tag (basestring) – The text writer will label the data with tagReturns:A text writer to record distributionReturn type:TextWriter
- class
visualdl.
LogReader
(dir, reader=None) LogReader is a Python wrapper to read and analysis the data thatsaved with data format defined in storage.proto. A User can getScalar Reader/Image Reader/Histogram Reader from this module and usethem to reade the data you need.
Parameters:mode (basestring) – The log reader will read the data grouped by mode.Returns:a new log reader instanceReturn type:LogReader
Parameters:tag (basestring) – The reader will read the audio data marked with tag
Parameters:tag (basestring) – The reader will read the histogram data marked with tag
Parameters:tag (basestring) – The reader will read the image data marked with tag
Parameters:mode (basestring) – The log reader will read the data grouped by mode.Returns:the log reader itselfReturn type:LogReader
Returns:a list of all modesReturn type:list
Parameters:tag (basestring) – The reader will read the scalar data marked with tag
Parameters:component – scalar|histogram|imageReturns:all the tagsType:list
Parameters:tag (basestring) – The reader will read the text data marked with tag