Skip to content

Commit 6fd6627

Browse files
authored
Update README.md - usage example code
1 parent 7e5069d commit 6fd6627

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,10 @@ import Mlflow from 'mlflow-js';
107107
// Initialize the MLflow client
108108
const mlflow = new Mlflow('http://127.0.0.1:5000');
109109

110-
// Get the experiment client
111-
const experimentClient = mlflow.getExperimentClient();
112-
113110
// Create a new experiment
114111
async function createExperiment(){
115-
try {
116-
await experimentClient.createExperiment('My Experiment');
112+
await mlflow.createExperiment('My Experiment');
117113
console.log('Experiment created successfully');
118-
} catch (error) {
119-
console.error('Error creating experiment:', error);
120-
}
121114
}
122115

123116
createExperiment();

0 commit comments

Comments
 (0)