cancel
Showing results for 
Search instead for 
Did you mean: 
Machine Learning
cancel
Showing results for 
Search instead for 
Did you mean: 

How to read artifact file (CSV) programmatically?

Giorgi
New Contributor III

Hello, 

can I programmatically access artifact file (csv), via artifact_uri and read it?

Tried the following, but didn't work, says no such file or directory:

mlflow.pyfunc.pandas.read_csv(artifact_uri+'/xgb-classifier-test-8/dataset_statistics.csv')

pandas.read_csv(artifact_uri+'/xgb-classifier-test-8/dataset_statistics.csv')

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

Giorgi
New Contributor III

Maybe there are better solutions, here is what I've found:

from mlflow.tracking import MlflowClient
 
client = MlflowClient()
pd.read_csv(client.download_artifacts(run_id, "xgb-classifier-test-8/dataset_statistics.csv"))

View solution in original post

2 REPLIES 2

Giorgi
New Contributor III

Maybe there are better solutions, here is what I've found:

from mlflow.tracking import MlflowClient
 
client = MlflowClient()
pd.read_csv(client.download_artifacts(run_id, "xgb-classifier-test-8/dataset_statistics.csv"))

Kaniz
Community Manager
Community Manager

Hi @Giorgi ARABIDZE​ , Thank you so much for sharing the solution with the community. Would you mind marking your answer as the best?

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.