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

[FR] Consider detecting current running context is databricks notebook or not; if it is, install Feathr library #932

Open
4 tasks
xiaoyongzhu opened this issue Dec 24, 2022 · 0 comments
Labels
feature New feature or request

Comments

@xiaoyongzhu
Copy link
Member

Willingness to contribute

No. I cannot contribute a bug fix at this time.

Feature Request Proposal

Some sample code:

! pip install databricks_cli

ctx = dbutils.notebook.entry_point.getDbutils().notebook().getContext()
token_value=ctx.apiToken().get()
workspace_instance_url=f"https://{ctx.tags().get('browserHostName').get()}"
cluster_id = ctx.tags().get('clusterId').get()

from databricks_cli.dbfs.api import DbfsApi
from databricks_cli.runs.api import RunsApi
from databricks_cli.dbfs.dbfs_path import DbfsPath
from databricks_cli.sdk.api_client import ApiClient
from databricks_cli.libraries.api import LibrariesApi
api_client = ApiClient(host=workspace_instance_url, token=token_value)

LibrariesApi(api_client=api_client).install_libraries(cluster_id, libraries = [{
      "maven": {
        "coordinates": "com.linkedin.feathr:feathr_2.12:0.9.0"
      }
    }])

res = LibrariesApi(api_client=api_client).cluster_status(cluster_id)
if 'feathr' in res['library_statuses'][0]['library']['maven']['coordinates']:
    print("feathr is registered successfully")

Motivation

What is the use case for this feature?

In this case, we don't have to start a new cluster everytime; we can reuse the existing cluster if necessary

Details

No response

What component(s) does this feature request affect?

  • Python Client: This is the client users use to interact with most of our API. Mostly written in Python.
  • Computation Engine: The computation engine that execute the actual feature join and generation work. Mostly in Scala and Spark.
  • Feature Registry API: The frontend API layer supports SQL, Purview(Atlas) as storage. The API layer is in Python(FAST API)
  • Feature Registry Web UI: The Web UI for feature registry. Written in React
@xiaoyongzhu xiaoyongzhu added the feature New feature or request label Dec 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant