Skip to content

Commit d7f9fed

Browse files
authored
Merge pull request #108 from oslabs-beta/kyler/finalDocker
feat: Modified README.md and CONTRIBUTING.md
2 parents 8bb325a + 23f6a65 commit d7f9fed

18 files changed

+196
-117
lines changed

CONTRIBUTING.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,27 @@ We are always open to accepting any potential contributions. Here is how you can
99
git clone https://github.com/your-username/repository-name.git
1010
```
1111

12-
3. Install dependencies for both mlflow and mlflow-site directories
12+
3. Create your feature branch
1313

1414
```bash
15-
cd mlflow && npm install
16-
cd ../mlflow-site && npm install
15+
git checkout -b feature/AmazingFeature
1716
```
1817

19-
4. Create your feature branch
18+
4. Install dependencies for both mlflow and mlflow-site directories
2019

2120
```bash
22-
git checkout -b feature/AmazingFeature
21+
cd /mlflow && npm install
22+
cd ../mlflow-site && npm install
2323
```
2424

25-
5. Run MLflow Tracking Server container with Docker
25+
5. Start the MLflow Tracking Server
2626

2727
```bash
28-
cd mlflow
29-
npm run docker
28+
cd ../mlflow && npm run docker
3029
```
3130

31+
This will launch the MLflow UI on your local machine at `http://localhost:5001`.
32+
3233
6. Make your changes
3334

3435
7. Run ESLint to check code style
@@ -42,13 +43,18 @@ npm run lint
4243
(Make sure you have mlflow UI server running on port 5002. We set 5002 as our default port for testing.)
4344

4445
```bash
45-
mlflow ui --port 5002 # Run this in a separate terminal
46+
cd /mlflow && npm run dockerTest # Run this in a separate terminal
4647
npm run test
4748
```
4849

49-
9. Commit your changes
50+
This will launch the MLflow UI on your local machine at `http://localhost:5002`, and run the Jest tests.
51+
52+
9. Add and commit your changes
53+
54+
If the tests all pass:
5055

5156
```bash
57+
git add .
5258
git commit -m 'Add AmazingFeature'
5359
```
5460

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,23 @@ pip install mlflow
6060
To start the MLflow tracking server locally, use the following command:
6161

6262
```bash
63-
mlflow ui --port 5000
63+
mlflow ui --port 5001
6464
```
6565

66-
This will launch the MLflow UI on your local machine at `http://localhost:5000`.
66+
This will launch the MLflow UI on your local machine at `http://localhost:5001`.
67+
68+
### Alternative Docker approach to the MLflow Tracking Server
69+
70+
Install [Docker Desktop](https://www.docker.com/).
71+
72+
To start the MLflow tracking server locally, use the following commands:
73+
74+
```bash
75+
docker pull ghcr.io/mlflow/mlflow
76+
docker run -p 5001:5001 ghcr.io/mlflow/mlflow:latest mlflow server --host 0.0.0.0 --port 5001
77+
```
78+
79+
This will launch the MLflow UI on your local machine at `http://localhost:5001`.
6780

6881
### Development Setup
6982

mlflow/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ RUN apt-get update && apt-get install -y \
77
curl \
88
git \
99
&& rm -rf /var/lib/apt/lists/*
10-
# RUN apt-get update
11-
# RUN apt-get install -y gcc
12-
# RUN apt-get install -y curl
1310
# Copy package files
1411
# Uses package-lock.json for exact versions
1512
COPY package*.json ./

mlflow/docker-compose-test.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# docker-compose.yml
2+
name: mlflowtest
3+
services:
4+
# MLflow server for testing
5+
mlflowtest:
6+
# The latest mlflow docker image
7+
image: ghcr.io/mlflow/mlflow
8+
ports:
9+
- "5002:5002"
10+
command: mlflow server --host 0.0.0.0 --port 5002
11+
healthcheck:
12+
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:5002/health')"]
13+
interval: 30s
14+
timeout: 10s
15+
retries: 3
16+
# Development environment to ensure consistency across contributors
17+
devtest:
18+
build:
19+
context: .
20+
dockerfile: Dockerfile
21+
volumes:
22+
- .:/mlflow # Mount code for live development
23+
- /mlflow/node_modules # Keep node_modules in container
24+
command: /bin/sh -c "while sleep 1000; do :; done" # Keep container running
25+
depends_on:
26+
mlflowtest:
27+
condition: service_healthy

mlflow/lib/tracking/ExperimentClient.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ declare class ExperimentClient {
5151
* Mark an experiment for deletion.
5252
*
5353
* @param {string} experiment_id ID of the associated experiment. (required)
54-
* @returns {void}
54+
* @returns {Promise<void>}
5555
* @throws {ApiError} If the API request fails
5656
*/
5757
deleteExperiment(experiment_id: string): Promise<void>;
5858
/**
5959
* Restore an experiment marked for deletion.
6060
*
6161
* @param {string} experiment_id ID of the associated experiment. (required)
62-
* @returns {void}
62+
* @returns {Promise<void>}
6363
* @throws {ApiError} If the API request fails
6464
*/
6565
restoreExperiment(experiment_id: string): Promise<void>;
@@ -68,7 +68,7 @@ declare class ExperimentClient {
6868
*
6969
* @param {string} experiment_id ID of the associated experiment. (required)
7070
* @param {string} new_name The experiment’s name is changed to the new name. The new name must be unique. (required)
71-
* @returns {void}
71+
* @returns {Promise<void>}
7272
* @throws {ApiError} If the API request fails
7373
*/
7474
updateExperiment(experiment_id: string, new_name: string): Promise<void>;
@@ -78,7 +78,7 @@ declare class ExperimentClient {
7878
* @param {string} experiment_id ID of the experiment under which to log the tag. (required)
7979
* @param {string} key Name of the tag. (required)
8080
* @param {string} value String value of the tag being logged. (required)
81-
* @returns {void}
81+
* @returns {Promise<void>}
8282
* @throws {ApiError} If the API request fails
8383
*/
8484
setExperimentTag(experiment_id: string, key: string, value: string): Promise<void>;

mlflow/lib/tracking/ExperimentClient.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mlflow/lib/tracking/RunClient.d.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { MetricHistoryResponse } from '../utils/interface.js';
12
declare class RunClient {
23
private baseUrl;
34
constructor(trackingUri: string);
@@ -172,7 +173,7 @@ declare class RunClient {
172173
* @returns {Promise<MetricHistory>} A promise that resolves with the values for the specified metric.
173174
* @throws {ApiError} If the API request fails.
174175
*/
175-
getMetricHistory(run_id: string, metric_key: string, page_token?: string, max_results?: number): Promise<object>;
176+
getMetricHistory(run_id: string, metric_key: string, page_token?: string, max_results?: number): Promise<MetricHistoryResponse>;
176177
/**
177178
* Search for runs that satisfy expressions. Search expressions can use Metric and Param keys.
178179
*
@@ -197,7 +198,7 @@ declare class RunClient {
197198
* @returns {Promise<SearchedRuns>} A promise that resovles with the runs that match the search criteria.
198199
* @throws {ApiError} If the API request fails.
199200
*/
200-
searchRuns(experiment_ids: Array<string>, filter: string, run_view_type?: 'ACTIVE_ONLY' | 'DELETED_ONLY' | 'ALL', max_results?: number, order_by?: Array<string>, page_token?: string): Promise<object>;
201+
searchRuns(experiment_ids: Array<string>, filter?: string, run_view_type?: 'ACTIVE_ONLY' | 'DELETED_ONLY' | 'ALL', max_results?: number, order_by?: Array<string>, page_token?: string): Promise<object>;
201202
/**
202203
* List artifacts for a run. Takes an optional artifact_path prefix which if specified, the response contains only
203204
* artifacts with the specified prefix.

0 commit comments

Comments
 (0)