# W&B Support for the HF Flax Community Week

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fw-b-support-for-the-hf-flax-community-week%2F8091%3E%5C
**Category:** Flax/JAX Projects\
**Created:** [July 6, 2021, 12:28pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fw-b-support-for-the-hf-flax-community-week%2F8091 "2021-07-06T12:28:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![morgan](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/morgan/32/2293_2.png) [@morgan](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmorgan)%5C
**Post date:** [July 6, 2021, 12:28pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fw-b-support-for-the-hf-flax-community-week%2F8091%2F1 "2021-07-06T12:28:50Z")

</div>

Hey all!

I’m super stoked be be taking part in another community week (project “BART pre-training” woop woop!).

I work at Weights & Biases and to help out, we are delighted to support the community here in 3 ways:

- Free W&B Team account for all projects
- W&B setup/Q&A sessions with all HF Projects for the duration of the event
- Code to log to W&B

Full information is here: **[W&B HF Community Week Suppport](http://wandb.me/hf-flax-week)**

## W&B Team sign-up

Add your HF Discord username and Project Name to **[this Google Sheet](https://docs.google.com/spreadsheets/d/1kLcjj34dCqYR5PpdLblp9Yvbc8VWFvk42kJ-9axvgWs/edit#gid=0)** and I’ll ping you when its set up!

## Logging with W&B

Below is all you need to get rich logging to your W&B workspace. **W&B can pick up Tensorboard log files** so there is no need to add additional logging calls, unless you’d like to log additional metrics not logged to Tensorboard. See our docs for the W&B [Tensorboard integration](https://docs.wandb.ai/guides/integrations/tensorboard)

First, install wandb

`pip install wandb --upgrade`

Then use the code below to log to weights and biases

```auto
def main﻿(﻿)﻿:
﻿
  import wandb
  if jax.process_index() == 0
    wandb.init(
      entity=﻿'my_team_name_or_username'﻿, 
      project=﻿'norwegian-t5-demo'﻿,
      sync_tensorboard=﻿True﻿
  )  
﻿
  # log your configs with wandb.config, accepts a dict
  if jax.process_index() == 0
    wandb.config.update(training_args) # optional, log your configs
    wandb.config.update(model_args) # optional, log your configs
    wandb.config.update(data_args) # optional, log your configs
﻿
    wandb.config[﻿'my_other_thing'﻿] = 12345 # log additional things
﻿
  .﻿.﻿.
﻿
  # Log additional metrics not logged to Tensorboard
  for b in batches
    .﻿.﻿.
    metric = get_metric(﻿)
    if jax.process_index() == 0
      wandb.log(﻿{﻿'my_metric' : metric}﻿)

```

Let me know if there are any W&B questions I can help with, and I hope you all enjoy a fantastic week!

Morgan
