drift-ml 0.2.7 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -1
- package/bin/drift.js +7 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ That's it. On first run, drift downloads and starts the engine automatically. No
|
|
|
38
38
|
|
|
39
39
|
---
|
|
40
40
|
|
|
41
|
-
## Example
|
|
41
|
+
## Example (CLI)
|
|
42
42
|
|
|
43
43
|
```text
|
|
44
44
|
drift › load iris.csv
|
|
@@ -49,6 +49,24 @@ drift › quit
|
|
|
49
49
|
|
|
50
50
|
---
|
|
51
51
|
|
|
52
|
+
## Use as library
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
pip install drift-ml
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
```python
|
|
59
|
+
from drift import Drift
|
|
60
|
+
|
|
61
|
+
d = Drift()
|
|
62
|
+
d.load("iris.csv")
|
|
63
|
+
d.chat("predict sepal length")
|
|
64
|
+
result = d.train()
|
|
65
|
+
print(result["metrics"])
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
52
70
|
## Philosophy
|
|
53
71
|
|
|
54
72
|
drift should feel like `git`, `docker`, `brew` — a tool you trust immediately. Zero friction. Open source.
|
package/bin/drift.js
CHANGED
|
@@ -13,7 +13,7 @@ const http = require("http");
|
|
|
13
13
|
const isWindows = process.platform === "win32";
|
|
14
14
|
const ENGINE_PORT = process.env.DRIFT_ENGINE_PORT || "8000";
|
|
15
15
|
const GITHUB_REPO = "lakshitsachdeva/intent2model"; // Engine binaries (same repo)
|
|
16
|
-
const ENGINE_TAG = "v0.2.
|
|
16
|
+
const ENGINE_TAG = "v0.2.9"; // Pinned — direct URL, no API, no rate limits
|
|
17
17
|
const ENGINE_BASE_URL = `https://github.com/${GITHUB_REPO}/releases/download/${ENGINE_TAG}`;
|
|
18
18
|
const HEALTH_URL = `http://127.0.0.1:${ENGINE_PORT}/health`;
|
|
19
19
|
const HEALTH_TIMEOUT_MS = 2000;
|
|
@@ -301,10 +301,12 @@ async function main() {
|
|
|
301
301
|
}
|
|
302
302
|
const enginePath = getEnginePath();
|
|
303
303
|
if (isWindows && enginePath) {
|
|
304
|
-
console.error("drift:
|
|
305
|
-
console.error(" cd
|
|
306
|
-
console.error("
|
|
307
|
-
console.error("
|
|
304
|
+
console.error("drift: Engine failed on Windows. Try running the backend manually:");
|
|
305
|
+
console.error(" cd backend");
|
|
306
|
+
console.error(" python -m uvicorn main:app --host 0.0.0.0 --port 8000");
|
|
307
|
+
console.error(" (Create .env in project root with GEMINI_API_KEY=... for LLM)");
|
|
308
|
+
console.error("Then: set DRIFT_BACKEND_URL=http://localhost:8000");
|
|
309
|
+
console.error("Or run the engine manually: cd %USERPROFILE%\\.drift\\bin && drift-engine-windows-x64.exe");
|
|
308
310
|
}
|
|
309
311
|
}
|
|
310
312
|
process.exit(1);
|