cancel
Showing results for 
Search instead for 
Did you mean: 
Machine Learning
Dive into the world of machine learning on the Databricks platform. Explore discussions on algorithms, model training, deployment, and more. Connect with ML enthusiasts and experts.
cancel
Showing results for 
Search instead for 
Did you mean: 

Forum Posts

Kaizen
by Valued Contributor
  • 5773 Views
  • 5 replies
  • 1 kudos

Resolved! Endpoint performance questions

Hi! Had really interesting results from some endpoint performance tests I did. I set up the non-optimized endpoint with zero-cluster scaling and optimized had this feature disabled.1) Why does the non-optimized endpoint have variable response time fo...

Kaizen_1-1710196442817.png Kaizen_0-1710196408535.png Kaizen_2-1710196880601.png
  • 5773 Views
  • 5 replies
  • 1 kudos
Latest Reply
Kaizen
Valued Contributor
  • 1 kudos

Answering Q1: 1) The variable response time is due to the first endpoint response time requiring ~180 seconds to scale to 1 cluster from 02) Can i change zero scale time from the preset 30 min?

  • 1 kudos
4 More Replies
Nishat
by Databricks Partner
  • 1741 Views
  • 0 replies
  • 0 kudos

Serving a custom transformer class via a pyfunc wrapper for a pyspark recommendation model

I am trying to serve an ALS pyspark model with a custom transformer(for generating user-specific recommendations) via a pyfunc wrapper. Although I can successfully score the logged model, the serving endpoint is throwing the following error.URI '/mod...

  • 1741 Views
  • 0 replies
  • 0 kudos
marcelo2108
by Contributor
  • 43136 Views
  • 25 replies
  • 0 kudos

Problem when serving a langchain model on Databricks

I´m trying to model serving a LLM LangChain Model and every time it fails with this messsage:[6b6448zjll] [2024-02-06 14:09:55 +0000] [1146] [INFO] Booting worker with pid: 1146[6b6448zjll] An error occurred while loading the model. You haven't confi...

  • 43136 Views
  • 25 replies
  • 0 kudos
Latest Reply
marcelo2108
Contributor
  • 0 kudos

Hi @DataWrangler and Team.I got to solve the initial problem from some tips you gave. I used your code as base and did some modifications adapted to what I have, I mean , No UC enabled and not able to use DatabricksEmbeddings, DatabricksVectorSearch ...

  • 0 kudos
24 More Replies
mbejarano89
by Databricks Partner
  • 10690 Views
  • 2 replies
  • 2 kudos

Resolved! Running multiple linear regressions in parallel (speeding up for loop)

Hi, I am running several linear regressions on my dataframe, in which I run a regression for every unique value in the column "item" , apply the model to a new dataset (vector_new), and at the end union the results as the loop runs. The problem is th...

  • 10690 Views
  • 2 replies
  • 2 kudos
Latest Reply
Anonymous
Not applicable
  • 2 kudos

@Marcela Bejarano​ :One approach to speed up the process is to avoid using a loop and instead use Spark's groupBy and map functions. Here is an example:from pyspark.ml import Pipeline from pyspark.ml.feature import VectorAssembler from pyspark.ml.reg...

  • 2 kudos
1 More Replies
DataInsight
by Databricks Partner
  • 1951 Views
  • 1 replies
  • 0 kudos

Copy Into command to copy into delta table with predefined schema and csv file has no headers

How do i use copy into command to load 200+ tables with 50+ columns into a delta lake table with predefined schema. I am looking for a more generic approach to be handled in pyspark code.I am aware that we can pass the column expression into the sele...

  • 1951 Views
  • 1 replies
  • 0 kudos
Latest Reply
Lakshay
Databricks Employee
  • 0 kudos

Does your source data have same number of columns as your target Delta tables? In that case, you can do it this way:COPY INTO my_pipe_dataFROM 's3://my-bucket/pipeData'FILEFORMAT = CSVFORMAT_OPTIONS ('mergeSchema' = 'true','delimiter' = '|','header' ...

  • 0 kudos
aladda
by Databricks Employee
  • 5682 Views
  • 2 replies
  • 1 kudos

Resolved! How do I use the Copy Into command to copy data into a Delta Table? Looking for examples where you want to have a pre-defined schema

I've reviewed the COPY INTO docs here - https://docs.databricks.com/spark/latest/spark-sql/language-manual/delta-copy-into.html#examples but there's only one simple example. Looking for some additional examples that show loading data from CSV - with ...

  • 5682 Views
  • 2 replies
  • 1 kudos
Latest Reply
aladda
Databricks Employee
  • 1 kudos

Here's an example for predefined schemaUsing COPY INTO with a predefined table schema – Trick here is to CAST the CSV dataset into your desired schema in the select statement of COPY INTO. Example below%sql CREATE OR REPLACE TABLE copy_into_bronze_te...

  • 1 kudos
1 More Replies
Abdurrahman
by New Contributor II
  • 6730 Views
  • 1 replies
  • 0 kudos

How to download a pytorch model created via notebook and saved in a folder ?

I have created a pytorch model using databricks notebooks and saved it in a folder in workspace. MLFlow is not used.When I try to download the files from the folder it exceeds the download limit. Is there a way to download the model locally into my s...

  • 6730 Views
  • 1 replies
  • 0 kudos
BogdanV
by New Contributor III
  • 4004 Views
  • 1 replies
  • 0 kudos

Resolved! Query ML Endpoint with R and Curl

I am trying to get a prediction by querying the ML Endpoint on Azure Databricks with R. I'm not sure what is the format of the expected data. Is there any other problem with this code? Thanks!!! 

R Code.png
  • 4004 Views
  • 1 replies
  • 0 kudos
Latest Reply
BogdanV
New Contributor III
  • 0 kudos

Hi Kaniz, I was able to find the solution. You should post this in the examples when you click "Query Endpoint"You only have code for Browser, Curl, Python, SQL. You should add a tab for RHere is the solution:library(httr)url <- "https://adb-********...

  • 0 kudos
larsr
by New Contributor II
  • 1961 Views
  • 0 replies
  • 0 kudos

DBR CLI v0.216.0 failed to pass bundle variable for notebook task

After installing the new version of the CLI (v0.216.0) the bundle variable for the notebook task is not parsed correctly, see code below:tasks:        - task_key: notebook_task          job_cluster_key: job_cluster          notebook_task:            ...

Machine Learning
asset bundles
  • 1961 Views
  • 0 replies
  • 0 kudos
G-M
by Databricks Partner
  • 2961 Views
  • 0 replies
  • 1 kudos

MLflow Experiments in Unity Catalog

Will MLflow Experiments be incorporated into Unity Catalog similar to models and feature tables? I feel like this is the final piece missing in a comprehensive Unity Catalog backed MLOps workflow. Currently it seems they can only be stored in a dbfs ...

  • 2961 Views
  • 0 replies
  • 1 kudos
johnp
by New Contributor III
  • 5943 Views
  • 1 replies
  • 0 kudos

pdb debugger on databricks

I am new to databricks. and trying to debug my python application with variable-explore by following the instruction from: https://www.databricks.com/blog/new-debugging-features-databricks-notebooks-variable-explorerI added the "import pdb" in the fi...

  • 5943 Views
  • 1 replies
  • 0 kudos
Latest Reply
johnp
New Contributor III
  • 0 kudos

I test with some simple applications, it works as you described.  However, the application I am debugging uses the pyspark structured streaming, which runs continuously. After inserting pdb.set_trace(), the application paused at the breakpoint, but t...

  • 0 kudos
Mesh
by New Contributor II
  • 8223 Views
  • 1 replies
  • 0 kudos

Optimizing for Recall in Azure AutoML UI

Hi all, I've been using Azure AutoML and noticed that I can choose 'recall' as my optimization metric in the notebook but not in the Azure AutoML UI. The Databricks documentation also doesn't list 'recall' as an optimization metric.Is there a reason ...

  • 8223 Views
  • 1 replies
  • 0 kudos
Latest Reply
Mesh
New Contributor II
  • 0 kudos

On the databricks notebook itself, I can see that databricks.automl supports using recall as a primary metric Help on function classify in module databricks.automl: :param primary_metric: primary metric to select the best model. Each trial will...

  • 0 kudos
kng88
by New Contributor II
  • 8365 Views
  • 6 replies
  • 7 kudos

How to save model produce by distributed training?

I am trying to save model after distributed training via the following codeimport sys   from spark_tensorflow_distributor import MirroredStrategyRunner   import mlflow.keras   mlflow.keras.autolog()   mlflow.log_param("learning_rate", 0.001)   import...

  • 8365 Views
  • 6 replies
  • 7 kudos
Latest Reply
Xiaowei
Databricks Partner
  • 7 kudos

I think I finally worked this out.Here is the extra code to save out the model only once and from the 1st node:context = pyspark.BarrierTaskContext.get() if context.partitionId() == 0: mlflow.keras.log_model(model, "mymodel")

  • 7 kudos
5 More Replies
yorabhir
by New Contributor III
  • 3169 Views
  • 0 replies
  • 0 kudos

'error_code': 'INVALID_PARAMETER_VALUE', 'message': 'Too many sources. It cannot be more than 100'

I am getting the following error while saving a delta table in the feature storeWARNING databricks.feature_store._catalog_client_helper: Failed to record data sources in the catalog. Exception: {'error_code': 'INVALID_PARAMETER_VALUE', 'message': 'To...

  • 3169 Views
  • 0 replies
  • 0 kudos
Labels