gradio icon indicating copy to clipboard operation
gradio copied to clipboard

Wandb guide

Open AK391 opened this issue 1 year ago • 13 comments

Opening a WIP PR that fixes: https://github.com/gradio-app/gradio/issues/1759

Guide on how to integrate with Weights and Biases

AK391 avatar Jul 26 '22 23:07 AK391

Moving to draft status for now -- let us know when you want a review @AK391!

abidlabs avatar Jul 28 '22 18:07 abidlabs

@abidlabs should be ready for review now, also will be sending this to the wandb team in slack to go over and to see if they want to use the wandb organization https://huggingface.co/wandb on HF to adding gradio demos made through following this guide

AK391 avatar Aug 01 '22 22:08 AK391

Hey @AK391, I moved the Guide to the proper location in the repo, so that it would be visible when building locally. However, the Guide's formatting looks all messed up to me:

http://localhost:8000/Gradio_and_Wandb_Integration/

image

Something's off about the Markdown syntax. Is the Guide looking fine for you locally? Let me know if you need any help setting up the website locally

abidlabs avatar Aug 01 '22 23:08 abidlabs

@abidlabs formatting issue should be fixed now, guide locally looks like this Screen Shot 2022-08-03 at 1 10 47 AM

AK391 avatar Aug 03 '22 05:08 AK391

@AK391 I'm still seeing a lot of broken formatting and jumbled text in the body of the blog post. For example, see this paragraph where the markdown isn't rendering right:

image

Are you seeing this on your end?

abidlabs avatar Aug 04 '22 05:08 abidlabs

@abidlabs thanks, should be fixed now Screen Shot 2022-08-04 at 8 11 36 AM

AK391 avatar Aug 04 '22 12:08 AK391

Thanks @AK391 the Guide is loading for me now! However, I'm still confused by this Guide for several reasons:

  • There's way too much code. I think we should avoid writing the code that's already in the colab notebook.
  • It seems like we're showing how to use wandb for experiment tracking, but not really showing how to embed a Gradio demo in the wandb report (using the Interface.integrate() or Blocks.integrate() functions).
  • It would be nice to have a "final" colab notebook with all of the jojogan, gradio, and wandb code in one place that we link to at the end

abidlabs avatar Aug 04 '22 18:08 abidlabs

@abidlabs thanks for the review made most of the updates, will look into adding a final notebook to add to the end

AK391 avatar Aug 04 '22 23:08 AK391

Thanks @AK391 this looks much better.

I'm still seeing some weird things, though. For example, all of this "@markdown" in the code. Is this supposed to be here?

image

And some code not being formatted as code, like here:

image

I can make a pass through the Guide tomorrow and clean up these formatting issues.

Would you be able put together a "final" colab notebook with all of the jojogan, gradio, and wandb code in one place that we could link to?

abidlabs avatar Aug 05 '22 03:08 abidlabs

@abidlabs thanks for checking @markdown is actually from the original colab notebook https://colab.research.google.com/github/mchong6/JoJoGAN/blob/main/stylize.ipynb from the jojogan repo, it renders panels like this to interact with rather than running the code cell but I will remove it from the guide as its confusing Screen Shot 2022-08-05 at 1 16 24 PM

AK391 avatar Aug 05 '22 17:08 AK391

Sounds good, we're pretty close I think -- just let me know when you want me to review again.

abidlabs avatar Aug 05 '22 20:08 abidlabs

@abidlabs final colab is ready https://colab.research.google.com/drive/1Xq7YLsE3CNqGjcmfj5hiwGXCnYY3anrm?usp=sharing, one issue when using blocks and then integrate, works fine but when using interface and integrate I get this error

AttributeError                            Traceback (most recent call last)
<ipython-input-14-2371ac6ca7c4> in <module>()
----> 1 demo.integrate(wandb=wandb)

AttributeError: 'tuple' object has no attribute 'integrate'

AK391 avatar Aug 11 '22 01:08 AK391

@abidlabs thanks, issue should be resolved now, updated colab and the code block in the guide

AK391 avatar Aug 11 '22 06:08 AK391

@abidlabs following up on this, should be ready for review

AK391 avatar Aug 20 '22 22:08 AK391

Sounds good, will take a look today!

abidlabs avatar Aug 23 '22 16:08 abidlabs

Thanks for making all of the edits, @AK391, looks good to me :)

I made some tweaks to shorten things up and I think maybe the code can be shortened even more, but it's a good guide for now!

I'll go ahead and merge it in after the CI runs

abidlabs avatar Aug 23 '22 22:08 abidlabs