mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-27 02:16:18 +00:00
GitBook: [#117] add env to one-time ingestion for MLFlow
This commit is contained in:
parent
4f158708ec
commit
43af412308
@ -315,14 +315,69 @@ python3 --version
|
||||
|
||||
Here’s an overview of the steps in this procedure. Please follow the steps relevant to your use case.
|
||||
|
||||
1. Create a configuration file using template JSON
|
||||
2. Configure service settings
|
||||
3. Confirm sink settings
|
||||
4. Confirm metadata\_server settings
|
||||
5. Install the OpenMetadata MLflow Python module
|
||||
6. Run the ingestion workflow
|
||||
1. Prepare a Python virtual environment
|
||||
2. Install the Python module for this connector
|
||||
3. Create a configuration file using template JSON
|
||||
4. Configure service settings
|
||||
5. Confirm sink settings
|
||||
6. Confirm metadata\_server settings
|
||||
7. Run the ingestion workflow
|
||||
|
||||
### 1**. Create a configuration file using template JSON**
|
||||
|
||||
|
||||
### **1. Prepare a Python virtual environment**
|
||||
|
||||
In this step, we’ll create a Python virtual environment. Using a virtual environment enables us to avoid conflicts with other Python installations and packages on your host system.
|
||||
|
||||
In a later step, you will install the Python module for this connector and its dependencies in this virtual environment.
|
||||
|
||||
#### **1.1 Create a directory for openmetadata**
|
||||
|
||||
Throughout the docs, we use a consistent directory structure for OpenMetadata services and connector installation. If you have not already done so by following another guide, please create an openmetadata directory now and change into that directory in your command line environment.
|
||||
|
||||
```
|
||||
mkdir openmetadata; cd openmetadata
|
||||
```
|
||||
|
||||
#### **1.2 Create a virtual environment**
|
||||
|
||||
Run the following command to create a Python virtual environment called, `env`. You can try multiple connectors in the same virtual environment.
|
||||
|
||||
```
|
||||
python3 -m venv env
|
||||
```
|
||||
|
||||
#### **1.3 Activate the virtual environment**
|
||||
|
||||
Run the following command to activate the virtual environment.
|
||||
|
||||
```
|
||||
source env/bin/activate
|
||||
```
|
||||
|
||||
Once activated, you should see your command prompt change to indicate that your commands will now be executed in the environment named `env`.
|
||||
|
||||
#### **1.4 Upgrade pip and setuptools to the latest versions**
|
||||
|
||||
Ensure that you have the latest version of pip by running the following command. If you have followed the steps above, this will upgrade pip in your virtual environment.
|
||||
|
||||
```javascript
|
||||
pip3 install --upgrade pip setuptools
|
||||
```
|
||||
|
||||
****
|
||||
|
||||
### **2. Install the Python module for this connector**
|
||||
|
||||
Once the virtual environment is set up and activated as described in Step 1, run the following command to install the Python module for this connector.
|
||||
|
||||
```javascript
|
||||
pip3 install 'openmetadata-ingestion[mlflow]'
|
||||
```
|
||||
|
||||
|
||||
|
||||
### **3. Create a configuration file using template JSON**
|
||||
|
||||
Create a new file called `mlflow.json` in the current directory. Note that the current directory should be the `openmetadata` directory.
|
||||
|
||||
@ -359,7 +414,7 @@ Note: The `source.config` field in the configuration JSON will include the major
|
||||
|
||||
### ****
|
||||
|
||||
### **2. Configure service settings**
|
||||
### **4. Configure service settings**
|
||||
|
||||
In this step we will configure the MLflow service settings required for this connector. Please follow the instructions below to ensure that you’ve configured the connector to read from your MLflow service as desired.
|
||||
|
||||
@ -385,9 +440,9 @@ Backend store where the Tracking Server stores experiment and run metadata ([doc
|
||||
|
||||
### ****
|
||||
|
||||
### **3. Confirm `sink` settings**
|
||||
### **5. Confirm `sink` settings**
|
||||
|
||||
You need not make any changes to the fields defined for `sink` in the template code you copied into `bigquery.json` in Step 1. This part of your configuration file should be as follows.
|
||||
You need not make any changes to the fields defined for `sink` in the template code you copied into `bigquery.json` in Step 3. This part of your configuration file should be as follows.
|
||||
|
||||
```javascript
|
||||
"sink": {
|
||||
@ -398,9 +453,9 @@ You need not make any changes to the fields defined for `sink` in the template c
|
||||
|
||||
|
||||
|
||||
### **4. Confirm `metadata_server` settings**
|
||||
### **6. Confirm `metadata_server` settings**
|
||||
|
||||
You need not make any changes to the fields defined for `metadata_server` in the template code you copied into `bigquery.json` in Step 1. This part of your configuration file should be as follows.
|
||||
You need not make any changes to the fields defined for `metadata_server` in the template code you copied into `bigquery.json` in Step 3. This part of your configuration file should be as follows.
|
||||
|
||||
```javascript
|
||||
"metadata_server": {
|
||||
@ -414,17 +469,7 @@ You need not make any changes to the fields defined for `metadata_server` in the
|
||||
|
||||
|
||||
|
||||
### 5. Install the OpenMetadata MLflow Python module
|
||||
|
||||
Install the OpenMetadata Airflow Python module by running the following command.
|
||||
|
||||
```bash
|
||||
pip3 install --upgrade 'openmetadata-ingestion[mlflow]'
|
||||
```
|
||||
|
||||
|
||||
|
||||
### **6. Run ingestion workflow**
|
||||
### **7. Run ingestion workflow**
|
||||
|
||||
Your `mlflow.json` configuration file should now be fully configured and ready to use in an ingestion workflow.
|
||||
|
||||
@ -438,7 +483,7 @@ metadata ingest -c ./mlflow.json
|
||||
|
||||
### **requests.exceptions.ConnectionError**
|
||||
|
||||
If you encounter the following error when attempting to run the ingestion workflow in Step 9, this is probably because there is no OpenMetadata server running at http://localhost:8585.
|
||||
If you encounter the following error when attempting to run the ingestion workflow in Step 7, this is probably because there is no OpenMetadata server running at http://localhost:8585.
|
||||
|
||||
```
|
||||
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8585):
|
||||
@ -449,6 +494,6 @@ Failed to establish a new connection: [Errno 61] Connection refused'))
|
||||
|
||||
To correct this problem, please follow the steps in the [Run OpenMetadata](https://docs.open-metadata.org/v/main/try-openmetadata/run-openmetadata) guide to deploy OpenMetadata in Docker on your local machine.
|
||||
|
||||
Then re-run the metadata ingestion workflow in Step 6.
|
||||
Then re-run the metadata ingestion workflow in Step 7.
|
||||
{% endtab %}
|
||||
{% endtabs %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user