Skip to content

Commit ea66fa4

Browse files
committed
fixes
1 parent 72791f2 commit ea66fa4

File tree

9 files changed

+45
-33
lines changed

9 files changed

+45
-33
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ web-sys = "0.3"
111111
winapi = "0.3"
112112
zip = "0.6"
113113

114+
modelfox = { path = "languages/rust" }
114115
modelfox_app = { path = "crates/app" }
115116
modelfox_app_core = { path = "crates/app/core" }
116117
modelfox_charts = { path = "crates/charts" }

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
</p>
44

55
<h1 align="center">
6-
ModelFox is the all-in-one machine learning toolkit for programmers.
6+
ModelFox makes it easy to train, deploy, and monitor machine learning models.
77
</h1>
88

99
<p align="center">

crates/app/core/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ path = "lib.rs"
1616

1717
[dev-dependencies]
1818
insta = { workspace = true }
19+
modelfox = { workspace = true }
1920
modelfox_serve = { workspace = true }
2021
tracing-test = { workspace = true }
2122

crates/app/core/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,14 @@ struct CreateDatabasePoolOptions {
131131
async fn create_database_pool(options: CreateDatabasePoolOptions) -> Result<sqlx::AnyPool> {
132132
let database_url = options.database_url.to_string();
133133
let (pool_options, pool_max_connections) = if database_url.starts_with("sqlite:") {
134+
// Workaround for issue with `zig cc -target x86_64-linux-gnu` not working with create_if_missing.
135+
if database_url != "sqlite::memory:"
136+
&& tokio::fs::metadata(options.database_url.path())
137+
.await
138+
.is_err()
139+
{
140+
tokio::fs::File::create(options.database_url.path()).await?;
141+
}
134142
let pool_options = database_url
135143
.parse::<sqlx::sqlite::SqliteConnectOptions>()?
136144
.create_if_missing(true)

crates/app/core/test_common.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ enum Diagnosis {
233233
#[modelfox(value = "Positive")]
234234
Positive,
235235
}
236+
236237
/// Returns the ID of the prediction as well as the predicted value
237238
pub async fn seed_single_prediction_event(app: &App, model_id: Id) -> Result<(Id, String)> {
238239
let data_path = workspace_root().join("heart_disease.csv");

crates/cli/serve.rs

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ mod test {
157157
{
158158
"class_name": "Positive",
159159
"feature_contributions": null,
160-
"probability": 0.5603724,
160+
"probability": 0.56037986,
161161
"type": "binary_classification"
162162
}
163163
]
@@ -208,11 +208,11 @@ mod test {
208208
{
209209
"class_name": "Positive",
210210
"feature_contributions": {
211-
"baseline_value": 0.20125619,
211+
"baseline_value": 0.20130166,
212212
"entries": [
213213
{
214214
"column_name": "age",
215-
"feature_contribution_value": 0.12281423,
215+
"feature_contribution_value": 0.12281105,
216216
"feature_value": 0.9329086,
217217
"type": "normalized"
218218
},
@@ -225,14 +225,14 @@ mod test {
225225
},
226226
{
227227
"column_name": "gender",
228-
"feature_contribution_value": 0.12701331,
228+
"feature_contribution_value": 0.12702154,
229229
"feature_value": false,
230230
"type": "one_hot_encoded",
231231
"variant": "female"
232232
},
233233
{
234234
"column_name": "gender",
235-
"feature_contribution_value": 0.11925187,
235+
"feature_contribution_value": 0.11926158,
236236
"feature_value": true,
237237
"type": "one_hot_encoded",
238238
"variant": "male"
@@ -246,41 +246,41 @@ mod test {
246246
},
247247
{
248248
"column_name": "chest_pain",
249-
"feature_contribution_value": -0.37381193,
249+
"feature_contribution_value": -0.37382412,
250250
"feature_value": false,
251251
"type": "one_hot_encoded",
252252
"variant": "asymptomatic"
253253
},
254254
{
255255
"column_name": "chest_pain",
256-
"feature_contribution_value": 0.0072756815,
256+
"feature_contribution_value": 0.0072760214,
257257
"feature_value": false,
258258
"type": "one_hot_encoded",
259259
"variant": "atypical angina"
260260
},
261261
{
262262
"column_name": "chest_pain",
263-
"feature_contribution_value": 0.10764625,
263+
"feature_contribution_value": 0.10765556,
264264
"feature_value": false,
265265
"type": "one_hot_encoded",
266266
"variant": "non-angina pain"
267267
},
268268
{
269269
"column_name": "chest_pain",
270-
"feature_contribution_value": -0.19596988,
270+
"feature_contribution_value": -0.19594735,
271271
"feature_value": true,
272272
"type": "one_hot_encoded",
273273
"variant": "typical angina"
274274
},
275275
{
276276
"column_name": "resting_blood_pressure",
277-
"feature_contribution_value": 0.11539073,
277+
"feature_contribution_value": 0.11539532,
278278
"feature_value": 0.82200927,
279279
"type": "normalized"
280280
},
281281
{
282282
"column_name": "cholesterol",
283-
"feature_contribution_value": -0.035095416,
283+
"feature_contribution_value": -0.035099946,
284284
"feature_value": -0.23350535,
285285
"type": "normalized"
286286
},
@@ -293,14 +293,14 @@ mod test {
293293
},
294294
{
295295
"column_name": "fasting_blood_sugar_greater_than_120",
296-
"feature_contribution_value": -0.052783936,
296+
"feature_contribution_value": -0.052793734,
297297
"feature_value": false,
298298
"type": "one_hot_encoded",
299299
"variant": "false"
300300
},
301301
{
302302
"column_name": "fasting_blood_sugar_greater_than_120",
303-
"feature_contribution_value": -0.07468275,
303+
"feature_contribution_value": -0.07468745,
304304
"feature_value": true,
305305
"type": "one_hot_encoded",
306306
"variant": "true"
@@ -314,28 +314,28 @@ mod test {
314314
},
315315
{
316316
"column_name": "resting_ecg_result",
317-
"feature_contribution_value": -0.00006990314,
317+
"feature_contribution_value": -0.000069902,
318318
"feature_value": false,
319319
"type": "one_hot_encoded",
320320
"variant": "ST-T wave abnormality"
321321
},
322322
{
323323
"column_name": "resting_ecg_result",
324-
"feature_contribution_value": 0.07311806,
324+
"feature_contribution_value": 0.073114455,
325325
"feature_value": false,
326326
"type": "one_hot_encoded",
327327
"variant": "normal"
328328
},
329329
{
330330
"column_name": "resting_ecg_result",
331-
"feature_contribution_value": 0.053654764,
331+
"feature_contribution_value": 0.053654622,
332332
"feature_value": true,
333333
"type": "one_hot_encoded",
334334
"variant": "probable or definite left ventricular hypertrophy"
335335
},
336336
{
337337
"column_name": "exercise_max_heart_rate",
338-
"feature_contribution_value": -0.017210105,
338+
"feature_contribution_value": -0.017210854,
339339
"feature_value": 0.03279825,
340340
"type": "normalized"
341341
},
@@ -348,21 +348,21 @@ mod test {
348348
},
349349
{
350350
"column_name": "exercise_induced_angina",
351-
"feature_contribution_value": -0.07957997,
351+
"feature_contribution_value": -0.07958502,
352352
"feature_value": true,
353353
"type": "one_hot_encoded",
354354
"variant": "no"
355355
},
356356
{
357357
"column_name": "exercise_induced_angina",
358-
"feature_contribution_value": -0.07015497,
358+
"feature_contribution_value": -0.0701625,
359359
"feature_value": false,
360360
"type": "one_hot_encoded",
361361
"variant": "yes"
362362
},
363363
{
364364
"column_name": "exercise_st_depression",
365-
"feature_contribution_value": 0.5418354,
365+
"feature_contribution_value": 0.5418571,
366366
"feature_value": 1.1320461,
367367
"type": "normalized"
368368
},
@@ -375,63 +375,63 @@ mod test {
375375
},
376376
{
377377
"column_name": "exercise_st_slope",
378-
"feature_contribution_value": 0.060970727,
378+
"feature_contribution_value": 0.06096074,
379379
"feature_value": true,
380380
"type": "one_hot_encoded",
381381
"variant": "downsloping"
382382
},
383383
{
384384
"column_name": "exercise_st_slope",
385-
"feature_contribution_value": -0.109167024,
385+
"feature_contribution_value": -0.109167404,
386386
"feature_value": false,
387387
"type": "one_hot_encoded",
388388
"variant": "flat"
389389
},
390390
{
391391
"column_name": "exercise_st_slope",
392-
"feature_contribution_value": 0.13944851,
392+
"feature_contribution_value": 0.1394413,
393393
"feature_value": false,
394394
"type": "one_hot_encoded",
395395
"variant": "upsloping"
396396
},
397397
{
398398
"column_name": "fluoroscopy_vessels_colored",
399-
"feature_contribution_value": -0.566962,
399+
"feature_contribution_value": -0.5669827,
400400
"feature_value": -0.7464805,
401401
"type": "normalized"
402402
},
403403
{
404404
"column_name": "thallium_stress_test",
405-
"feature_contribution_value": -0.00017654974,
405+
"feature_contribution_value": -0.00017653707,
406406
"feature_value": false,
407407
"type": "one_hot_encoded",
408408
"variant": null
409409
},
410410
{
411411
"column_name": "thallium_stress_test",
412-
"feature_contribution_value": 0.051504944,
412+
"feature_contribution_value": 0.05150451,
413413
"feature_value": true,
414414
"type": "one_hot_encoded",
415415
"variant": "fixed defect"
416416
},
417417
{
418418
"column_name": "thallium_stress_test",
419-
"feature_contribution_value": 0.34775603,
419+
"feature_contribution_value": 0.34777343,
420420
"feature_value": false,
421421
"type": "one_hot_encoded",
422422
"variant": "normal"
423423
},
424424
{
425425
"column_name": "thallium_stress_test",
426-
"feature_contribution_value": -0.25059882,
426+
"feature_contribution_value": -0.2506175,
427427
"feature_value": false,
428428
"type": "one_hot_encoded",
429429
"variant": "reversible defect"
430430
}
431431
],
432-
"output_value": 0.24267349
432+
"output_value": 0.24270391
433433
},
434-
"probability": 0.5603724,
434+
"probability": 0.56037986,
435435
"type": "binary_classification"
436436
}
437437
]

crates/www/content/blog/what_machine_learning_can_learn_from_ruby_on_rails/post.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ In the Rails Doctrine, there is a section on “Value Integrated Systems”. DHH
3737
3838
One sentence in that section really stuck out to me: "Its [Rails'] purpose is not to segregate specialists into small niches and then require whole teams of such in order to build anything of enduring value". Today, this is exactly what companies are doing to get machine learning into production. They are required to assemble a team of specialists including Data Scientists, Machine Learning Engineers, Backend Engineers and Ops teams.
3939

40-
It would be great if we had something like Ruby on Rails for machine learning: a single system that provides the tools you need to go from data to a deployed machine learning model. Just as DHH says "rails specifically seeks to equip generalist individuals to make these full system", we need tools to equip generalist programmers, like front-end javascript programmers or back-end ruby programmers, to build full machine learning systems.
40+
It would be great if we had something like Ruby on Rails for machine learning: a single system that provides the tools you need to go from data to a deployed machine learning model. Just as DHH says "rails specifically seeks to equip generalist individuals to make these full system", we need tools to equip generalist programmers, like front-end javascript programmers or back-end ruby programmers, to build full machine learning systems.
4141

4242
## Introducing ModelFox
4343

44-
ModelFox is an all-in-one automated machine learning framework that makes it easy to add machine learning to your applications. Predictions happens directly in your existing applications so there are no network requests and there is no need to set up a separate service to serve your models.
44+
ModelFox makes it easy to train, deploy, and monitor machine learning models.
4545

4646
- Run `modelfox train` to train a model from a CSV file on the command line.
4747
- Make predictions with bindings for [Ruby](https://rubygems.org/gems/modelfox), [Python](https://pypi.org/project/modelfox), [Golang](https://pkg.go.dev/github.com/modelfoxdotdev/modelfox-go), [Elixir](https://hex.pm/packages/modelfox), [Javascript](https://www.npmjs.com/package/@modelfoxdotdev/modelfox), [PHP](https://packagist.org/packages/modelfox/modelfox), or [Rust](https://lib.rs/modelfox).

heart_disease.modelfox

-1 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)