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

Workspace related functions on Databricks #196

Closed
JLSMforPYR opened this issue Nov 13, 2019 · 4 comments
Closed

Workspace related functions on Databricks #196

JLSMforPYR opened this issue Nov 13, 2019 · 4 comments
Assignees

Comments

@JLSMforPYR
Copy link

Describe the bug
I am trying to use this library in Databricks and I encounter a problem in the operation of this function (it hangs).

To Reproduce

  • install the azureml sdk in this way so that databricks work on this enviroment
    azuremlsdk::install_azureml(envname = "databricks-standard")

  • Then I run 'get_current_run()' to check that it went well, and return:
    <azureml.core.run._OfflineRun>

  • None of the Azure Workspace related commands work

@ninghu
Copy link
Collaborator

ninghu commented Nov 13, 2019

Thanks for reporting this issue.

It seems to get stuck at workspace interactive login step. Interactive login requires to open a web browser to finish the authentication but somehow it's not available. We had a similar issue with RStudio server before.

There is one workaround you can give a try which forces to use device code login. Run below code before calling any workspace related functions. See it helps.

webbrowser <- reticulate::import("webbrowser")
# this will force to use device code login
webbrowser$"_tryorder" <- list()

@JLSMforPYR
Copy link
Author

Your approach does not work, but thanks anyway.
In case it may be helpful to you, currently I'm using the runtime 5.5 Conda Beta.

@ninghu ninghu self-assigned this Nov 14, 2019
@ninghu
Copy link
Collaborator

ninghu commented Nov 14, 2019

Thanks for trying. I was able to repro your issue in a databricks R notebook.

The problem is databricks doesn't support real-time log streaming during the code execution when you are in the notebook. I found a workaround though.

  1. Load workspace
existing_ws <- get_workspace(name = <workspace_name>, 
			     subscription_id = <subscription_id>, 
			     resource_group = <resource_group_name>)
  1. Go to your cluster -> "Driver Logs" -> you should see some message like below. Follow the instructions to complete authenticate

Performing interactive authentication. Please follow the instructions on the terminal.
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code BUR8WUX9Z to authenticate.

  1. Open your notebook and run below code to verify other workspace operation is working
get_workspace_details(existing_ws)

@JLSMforPYR
Copy link
Author

Works.
Thanks!

@ninghu ninghu closed this as completed Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants