Open prigoyal opened 3 years ago
@prigoyal when you said
https://github.com/MLH-Fellowship/vissl/blob/master/vissl/hooks/tensorboard_hook.py#L103-L106 -> here , add these metrics to the storage using storage.put_scalars
did you mean the following lines? https://github.com/MLH-Fellowship/vissl/blob/4cffc1c37b236371e4459278c0d7997bfdcd7e8d/vissl/hooks/tensorboard_hook.py#L123-L127
There are also 3 instances of the following lines
https://github.com/MLH-Fellowship/vissl/blob/master/vissl/hooks/tensorboard_hook.py#L135-L139
is that a mistake or did the links just get repeated?
@prigoyal when you said
https://github.com/MLH-Fellowship/vissl/blob/master/vissl/hooks/tensorboard_hook.py#L103-L106 -> here , add these metrics to the storage using storage.put_scalars
did you mean the following lines? https://github.com/MLH-Fellowship/vissl/blob/4cffc1c37b236371e4459278c0d7997bfdcd7e8d/vissl/hooks/tensorboard_hook.py#L123-L127
There are also 3 instances of the following lines
https://github.com/MLH-Fellowship/vissl/blob/master/vissl/hooks/tensorboard_hook.py#L135-L139
is that a mistake or did the links just get repeated?
Clarified on the PR :)
In this task, our goal is to implement a
TensorboardWriter
that leverages the VISSL storage object that we build in Phase2. The task summarizes the steps we can take for that:Step1: Setup Tensorboard
python tools/run_distributed_engines.py config=test/cpu_test/test_cpu_resnet_simclr config.DATA.TRAIN.DATA_SOURCES=[synthetic] config.HOOKS.TENSORBOARD_SETUP.USE_TENSORBOARD=true config.CHECKPOINT.DIR=./checkpoints
and verify that you can see visualization on tensorboard. Follow the tensorboard documentation for how the visualization tool can be opened in your browser on a localhost.Step2: Implement the tensorboard related methods in the
VisslEventStorage
Step3: Implement the TensorboardWriter
Step4: Initialize the writer by appending it to the writers in
build_event_storage_writers
in thetrain_task.py
. The values of init can be obtained from the config. For example: https://github.com/MLH-Fellowship/vissl/blob/4cffc1c37b236371e4459278c0d7997bfdcd7e8d/vissl/utils/tensorboard.py#L66-L73Step5: Places where to replace with
storage.put_histograms()
: https://github.com/MLH-Fellowship/vissl/blob/4cffc1c37b236371e4459278c0d7997bfdcd7e8d/vissl/hooks/tensorboard_hook.py#L87-L90 https://github.com/MLH-Fellowship/vissl/blob/4cffc1c37b236371e4459278c0d7997bfdcd7e8d/vissl/hooks/tensorboard_hook.py#L103-L106 here , add these metrics to the storage usingstorage.put_scalars
https://github.com/MLH-Fellowship/vissl/blob/4cffc1c37b236371e4459278c0d7997bfdcd7e8d/vissl/hooks/tensorboard_hook.py#L123-L127 https://github.com/MLH-Fellowship/vissl/blob/4cffc1c37b236371e4459278c0d7997bfdcd7e8d/vissl/hooks/tensorboard_hook.py#L135-L139 https://github.com/MLH-Fellowship/vissl/blob/4cffc1c37b236371e4459278c0d7997bfdcd7e8d/vissl/hooks/tensorboard_hook.py#L145-L149Step6: Add a key
VISUALIZATION_SAMPLE_PERIOD=-1
to visualize the images here https://github.com/MLH-Fellowship/vissl/blob/930e0c9d9f1f9035f3801b85d61f68377d0487b5/vissl/config/defaults.yaml#L121 and make use of the key at https://github.com/MLH-Fellowship/vissl/blob/master/vissl/trainer/train_steps/standard_train_step.py#L119 to do something like this. The config is in train_task asself.config