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

feat: 5108 feature add method to deploy on spaces through huggingface hub #5547

Conversation

davidberenstein1957
Copy link
Member

@davidberenstein1957 davidberenstein1957 commented Sep 27, 2024

Description

Closes #5108

  • sets USERNAME to hf_token["username"]
  • sets no PASSWORD and delegates this to the quickstart image
  • sets no WORKSPACE to argilla
  • sets API_KEY needs to be provided manually
  • setsorg_name to hf_token["username"]
  • setsrepo_name to "argilla"
  • default spaces and hardware, i.e. cpu basic and no persistant storage
  • if private, sets the correct connection headers.
import argilla as rg

client = rg.Argilla.deploy_on_spaces(api_key="12345678")
import argilla as rg

client = rg.Argilla.deploy_on_spaces(
    repo_name="my-example",
    org_name=None,
    token=None,
    space_storage=None,
    space_hardware=None,
    private=False,
)

image

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested

Checklist

  • I added relevant documentation
  • I followed the style guidelines of this project
  • I did a self-review of my code
  • I made corresponding changes to the documentation
  • I confirm My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/)

@davidberenstein1957 davidberenstein1957 marked this pull request as ready for review September 30, 2024 14:02
@davidberenstein1957 davidberenstein1957 added this to the v2.4.0 milestone Oct 1, 2024
secrets = [
{"key": "API_KEY", "value": api_key, "description": "The API key of the owner user."},
{"key": "USERNAME", "value": token_username, "description": "The username of the owner user."},
{"key": "PASSWORD", "value": api_key, "description": "The password of the owner user."},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@frascuchon WDYT of using the api_key as password? I think it would make it easier to simplify the flow given that we support OAuth. An alternative would be just creating a random uuid

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the api_key==password is ok. The hf_key vs api_key is already complex enough for some users.

argilla/src/argilla/_helpers/_deploy.py Outdated Show resolved Hide resolved
argilla/src/argilla/_helpers/_deploy.py Show resolved Hide resolved
argilla/src/argilla/_helpers/_deploy.py Outdated Show resolved Hide resolved
argilla/src/argilla/_helpers/_deploy.py Outdated Show resolved Hide resolved
argilla/src/argilla/_helpers/_deploy.py Outdated Show resolved Hide resolved
argilla/src/argilla/_helpers/_deploy.py Outdated Show resolved Hide resolved
argilla/src/argilla/_helpers/_deploy.py Outdated Show resolved Hide resolved
argilla/src/argilla/_helpers/_deploy.py Outdated Show resolved Hide resolved
secrets = [
{"key": "API_KEY", "value": api_key, "description": "The API key of the owner user."},
{"key": "USERNAME", "value": token_username, "description": "The username of the owner user."},
{"key": "PASSWORD", "value": api_key, "description": "The password of the owner user."},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the api_key==password is ok. The hf_key vs api_key is already complex enough for some users.

@davidberenstein1957 davidberenstein1957 merged commit dad8700 into develop Oct 17, 2024
6 of 7 checks passed
@davidberenstein1957 davidberenstein1957 deleted the feat/5108-feature-add-method-to-deploy-on-spaces-through-huggingface_hub branch October 17, 2024 07:33
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.

[FEATURE] add method to deploy on spaces through huggingface_hub
4 participants