Leaderboard Gradio or Dash? #1277
Replies: 8 comments 1 reply
-
I'm just gonna tag you, so that you can chime in @KennethEnevoldsen @orionw @Muennighoff @vaibhavad @imenelydiaker @isaac-chung @tomaarsen |
Beta Was this translation helpful? Give feedback.
-
Thanks @x-tabdeveloping for the great work! I think one highlight of the current leaderboard is that anyone can come in and edit it/make PRs. I am a bit hesitant to move off of the simple supported libraries like Gradio and Streamlit. OTOH, I'm certain you would create a very slick UI in Dash though and we could probably pick it up -- plus how much do we really change the leaderboard beyond adding models and/or new tabs? So I would say I probably lean against switching, but could be convinced if the UI is that much better for Dash/some other framework. But I haven't been working with the leaderboard for long so I defer to others. |
Beta Was this translation helpful? Give feedback.
-
Great overview! I'm not sure about the details of the 4 Gradio issues so tagging @abidlabs & @pngwn & @dawoodkhan82 - It'd be great to get your thoughts (it is about changing the mteb lb space - https://huggingface.co/spaces/mteb/leaderboard). |
Beta Was this translation helpful? Give feedback.
-
Hi @x-tabdeveloping and folks! Thanks for the great issue, this is super helpful for us to learn what the pain points for Gradio users are. I'll address the points that you mentioned, but ultimately will leave to you all to decide the best path forward for the leaderboard:
If there is a component that is missing in Gradio, you actually can create a custom component, which is a combination of Python + Svelte-flavored JavaScript. The effort required in writing a custom component varies, but for small changes like adding scrolling to the Dropdown choices, its quite straightforward as you can template off of the existing Dropdown component and add the modification. You can then publish it so its available to other users. You can browser ~80 custom components here: https://www.gradio.app/custom-components/gallery, which actually includes a double-ended slider.
It is true that Gradio events are not built on dependency graphs, but this is an explicit decision, as we want our developers to be able create interactive web apps without needing to delve deeply into underlying structures like dependency graphs. That being said, we are open to suggestions on how we can improve the developer experience for events, e.g. we could provide an alternative way to define an event for complex apps. Speaking of which...
Gradio has been successfully used for quite complex apps! Some examples include Automatic1111, Fooocus, and oobabooga, and kotaemon.
This is possible as well in Gradio. Every event includes a |
Beta Was this translation helpful? Give feedback.
-
Given that we are expecting many new changes going forward (MIEB etc.) I am generally leading toward "easier to change" > "better leaderboard". Ideally, however, it should be both :) I do believe both frameworks can solve both problems though. For me, it is fine to leave the decision up to @x-tabdeveloping (we can also discuss it further in person tomorrow/monday). |
Beta Was this translation helpful? Give feedback.
-
Hey folks. As a maintainer of gradio I thought it would be good to add some other details that may be relevant in addition to what @abidlabs mentioned. In v5 (the release of which is imminent) gradio will set itself apart from most similar tools like dash with a couple of features. Accessibility available today but constantly improving We have made a huge effort to ensure that gradio is as accessible as possible to as many users as possible including making gradio applications navigable with both keyboards and other assisted devices and adhering to best practices around color contrast and element sizing. Security available at v5 launch and constantly improving We have been working tirelessly over the past few months to make gradio the most secure way to build machine learning applications. This includes working with an independent third party to make everything as good as it can be. We will have more extensive details at launch (very soon). Server Side Rendering available at v5 launch Starting in version 5 gradio applications will be rendered in the server as well as the client. This leads to significantly better behaviour in a number of ways:
Multiple pages coming shortly after the v5 release In an update post v5 launch, users will have the ability to create multiple pages. This allows far more flexibility in how an application is structured as it will allow more nuanced information architecture and UX design. Instead of needing to put everything in tabs (which have now been redesigned and are much cleaner) you will have the option of using pages which will be great for detailing more information about the project or providing instructions for submissions. These are not rudimentary FAST API routes either, gradio will be using SvelteKit under the hood, so sub pages will also be server rendered if a user visits them directly but subsequent navigations will be highly optimised client side navigations with intelligent asset preloading, leading to a seamless user experience. I'm not in the business of convincing people to use tools if they don't want to but hopefully this is helpful in some way. I fully support your decision to use whatever tool seems best to you. Gradio certainly isn't perfect and we are always hoping to improve, but we do believe we focus on certain details far more than most other frameworks which can sometimes stretch us a little more than if we just focused on the UI. While there are a few rough edges that we need to smooth out, with v5 and the changes planned shortly after v5, we don't really think any other tool has a comparable feature set without dropping down to a JavaScript based meta-framework. Regarding the pain points you have encountered, I'd love to hear more about them regardless of what framework you end up choosing. Would you be willing to chat more about them so we can figure out how to improve those issues? We could jump on a call sometime or we can do it asynchronously. Leaderboards are a core use case for us so we do want to make the experience as good as possible and your feedback would be invaluable, we are also happy to work with you to help resolve any issues if you do end up going with gradio. |
Beta Was this translation helpful? Give feedback.
-
Hey all! Thanks for the insightful comments, I really appreciate them! (also sorry for the delay, I have been a bit busy with other stuff) As some of the responses have demonstrated, at least some of my problems were stemming from me being inexperienced with Gradio, thanks for pointing these out. Example 1:
You have two dropdowns, one of them is multi-choice and contains languages, the other one is single-choice and contains language families. @gr.on(inputs=[lang_dropdown], outputs=[fam_dropdown])
def update_fam():
...
@gr.on(inputs=[fam_dropdown], outputs=[lang_dropdown])
def update_langs():
... it's not immediately clear to me how this gets resolved, or if it results in an infinite loop, and I'm also unsure whether these callbacks are only called upon user interaction or also when other callbacks trigger them. Example 2:I want to have multi-select dropdowns, that become scrollable if they reach a certain height. dmc.MultiSelect(
label="Select Languages",
data=[...],
clearable=True,
searchable=True,
value=[...],
classNames={
"pillsList": "overflow-y-scroll max-h-32"
},
) While I haven't put too much effort into figuring this out in Gradio, judging by the fact that @abidlabs recommended me to write a custom component, my immediate judgement is that this would be a tad more complicated to do in Gradio. I think this can in general be attributed to the fact, that Gradio does not expose html and css as much as Dash does (in Dash, you are literally using html components as the default). Example 3:I want a double-ended slider.
While I don't have any doubts that Again, these are not unfixable problems, but for a new user, like me, they add up quite quickly. |
Beta Was this translation helpful? Give feedback.
-
That being said, I can feel that most of the team is leaning towards sticking with Gradio, and I see reasons for why this would be a good idea. |
Beta Was this translation helpful? Give feedback.
-
Hey guys! I have been working on the new leaderboard for MMTEB for the last bit, and I have a couple of considerations that I want to put out here so that we can take an informed decision together, as I expect that some of these things might affect some of you just as much as me.
I started working on the leaderboard in the Gradio framework, which is thee one that was used for the original leaderboard too.
I must say, that I find it quite limiting and I wanted to ask you if it would be okay with you to base the new leaderboard on Dash instead.
Here are a couple of advantages of switching to Dash:
On the other hand there are also quite a few disadvantages to switching to Dash, namely:
I'm curious to hear your opinions about this. I don't have terribly strong feelings about the issue, and I'm sure that I could still push out a decent leaderboard in Gradio, but I feel like it would make my job easier if I was allowed to use Dash.
Beta Was this translation helpful? Give feedback.
All reactions