<jupyter_start><jupyter_text>Simple Profiler Wandb Logging> Automatically logs Simple Profiler Callback to wandb. Logs two wandb tables: - `simple_profile_report`: formatted report from Simple Profiler Callback- `simple_profile_results`: raw results from Simple Profiler Callback  Usage```pythonfrom fastai.callback.wandb import WandbCallbackfrom fastxtend.callback import simpleprofilerfrom fastxtend.utils import simpleprofiler_wandb setup learner, dataloaders, and initialize wandb run and WandbCallbacklearn.profile() train model and log wandb run like normal```<jupyter_code>#export
import wandb
from fastcore.foundation import patch
from fastai.callback.wandb import WandbCallback
#exporti
if not hasattr(WandbCallback,'_orig_before_fit'): WandbCallback._orig_before_fit = WandbCallback.before_fit
if not hasattr(WandbCallback,'_orig_after_fit'): WandbCallback._orig_after_fit = WandbCallback.after_fit
#exporti
@patch
def before_fit(self:WandbCallback):
    if not hasattr(self.learn, 'lr_finder') and hasattr(self.learn, 'simple_profiler'):
        self.log_simple_profiler = True
    else:
        self.log_simple_profiler = False
    
    self._orig_before_fit()
#exporti
@patch
def after_fit(self:WandbCallback):
    self._orig_after_fit()

    if self.log_simple_profiler:
        report = wandb.Table(dataframe=self.learn.simple_profile_report)
        results = wandb.Table(dataframe=self.learn.simple_profile_results)

        wandb.log({"simple_profile_report": report})
        wandb.log({"simple_profile_results": results})
        wandb.log({}) # ensure sync 
        
        self.log_simple_profiler = False
#hide
#slow
from nbdev.export import notebook2script; notebook2script()<jupyter_output>Converted augment.tensor_item_tfm.ipynb.
Converted callback.cutmixup.ipynb.
Converted callback.lr_finder.ipynb.
Converted callback.simpleprofiler.ipynb.
Converted index.ipynb.
Converted schedulers.fit_flat_varied.ipynb.
Converted utils.simpleprofiler_wandb.ipynb.
{'fraction_non_alphanumeric': 0.08034360788276908, 'fraction_numerical': 0.001010611419909045, 'mean_word_length': 5.644295302013423, 'pattern_counts': {'":': 2, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '270999', 'license': 'MIT', 'n_tokens_mistral': 633, 'n_tokens_neox': 644, 'n_words': 134, 'path': 'nbs/utils.simpleprofiler_wandb.ipynb', 'repo_name': 'warner-benjamin/fastai_snippets', 'size': '1979'}