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

[Q] How to import runs from MLflow #7491

Closed
dkajtoch opened this issue Apr 26, 2024 · 4 comments
Closed

[Q] How to import runs from MLflow #7491

dkajtoch opened this issue Apr 26, 2024 · 4 comments

Comments

@dkajtoch
Copy link

Hi, I am using the following piece of code from documentation to import runs from mlflow. I do not know what should be the argument dst_base_url and dst_api_key. I am not hosting my own server just web version.

import mlflow
from wandb.apis.importers.mlflow import MlflowRun
from wandb.apis.importers.mlflow import MlflowImporter
from tqdm.auto import tqdm
from wandb.apis.importers import Namespace

client = mlflow.tracking.MlflowClient("http://localhost:6100")

project = "my_project"
runs = []
for run in tqdm(get_runs(client, experiment_name=project)):
    runs.append(MlflowRun(run, client))

importer = MlflowImporter(
    dst_base_url="",
    dst_api_key="my_api_key",
    mlflow_tracking_uri="http://localhost:6100"
)

for run in tqdm(runs):
    importer._import_run(run, namespace=Namespace(entity, project), artifacts=True)
@fmamberti-wandb
Copy link

Hi @dkajtoch, thank you for reaching out.
If you are using W&B cloud platform the dst_base_url should be https://api.wandb.ai (you can see this running the wandb status command via terminal) while dst_api_key should be your api key for the platform that you can find at https://wandb.ai/authorize.

Please let me know if you have any further questions.

@fmamberti-wandb
Copy link

Hi @dkajtoch I wanted to follow up on this request. Please let us know if we can be of further assistance or if your issue has been resolved.

@fmamberti-wandb
Copy link

Hi @dkajtoch , since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!

@dkajtoch
Copy link
Author

dkajtoch commented May 6, 2024

thanks it worked!

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

3 participants