Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds app url for mesop app maker. #842

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

richard-to
Copy link
Collaborator

I added Mesop App Maker to to Hugging Face. It's not ideal, since users need to create their own runner in Hugging Face Spaces. It's prettty easy to do. Just need to duplicate the Mesop App Runner space and set a "runner token". The runner token is just a basic way to block people from randomly using other people's runner instances.

Also added a link to the Hugging Face Jeopardy Mesop app.

I added Mesop App Maker to to Hugging Face. It's not ideal, since
users need to create their own runner in Hugging Face Spaces. It's
prettty easy to do. Just need to duplicate the Mesop App Runner space
and set a "runner token". The runner token is just a basic way to
block people from randomly using other people's runner instances.

Also added a link to the Hugging Face Jeopardy Mesop app.
@wwwillchen
Copy link
Collaborator

Just opened #849 which I'll try to do soon.

I think this is a good improvement, but it still feels a bit cumbersome.

Just to put an idea out there, what if we executed arbitrary user code in the same HF space and used something like https://github.com/zopefoundation/RestrictedPython to execute the user code with a restricted subset (e.g. you can call me.* and not much else).

Assuming the HF space doesn't have sensitive content (the only thing sensitive might be the API keys), but I could see this being useful even outside of LLM generation (e.g. user can give a URL like TypeScript playground: https://www.typescriptlang.org/play/?#code/G4QwTgBCC8EMwCgQVgJgQoA, to reproduce an issue or simply for sharing an example). WDYT?

@richard-to
Copy link
Collaborator Author

Yes. Agreed not ideal. But figured it was better than nothing at the moment.

Ah, nice find. Yes, that could be useful, especially if each execution is itself sandboxed.

Definitely agree about the Mesop playground thing. That did cross my mind when I was trying to get viewer to work in a cheap and secure way.

Originally what I had wanted to do was use Docker in Docker. Then we could have an endpoint that could spawn docker containers and execute the code within a single container. But Hugging Face containers are more restricted in usage since Docker in Docker does require a bit more privileges to run.

@richard-to richard-to merged commit 99c411a into google:main Aug 26, 2024
4 checks passed
@richard-to
Copy link
Collaborator Author

richard-to commented Aug 27, 2024

I looked into restricted python. I was able to use it fine. But it has a big blocker for now (can't handle type annotations yet...) zopefoundation/RestrictedPython#219

EDIT: Although in the comments, looks like there is a workaround.

@wwwillchen
Copy link
Collaborator

yeah, the workaround in the comment looks pretty promising

@richard-to
Copy link
Collaborator Author

yeah, the workaround in the comment looks pretty promising

Yeah, I tried it out and it worked. Actually their code was very helpful in getting things set up. Still running into some errors, but I think I'm fairly close to getting it to work.

@richard-to richard-to deleted the app-urls-showcase branch September 28, 2024 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants