Skip to content

Commit b6f325d

Browse files
authored
Assuming jupyter lab on Windows and bump to 0.0.4 (microsoft#13)
* Assuming jupyter lab on Windows and bump to 0.0.4 * update README * Fix lint
1 parent 10dd98b commit b6f325d

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Then we have provided several commands to assist your journey with interactive c
3939

4040
**Limitations:**
4141

42-
* Currently, CoML only supports Jupyter Lab and classical Jupyter notebook (nbclassic). We are still working on supports of newer Jupyter notebook, Jupyter-vscode and Google Colab.
42+
* Currently, CoML only supports Jupyter Lab and classical Jupyter notebook (nbclassic, and only on Linux platforms). We are still working on supports of newer Jupyter notebook, Jupyter-vscode and Google Colab.
4343
* CoML uses gpt-3.5-turbo-16k model in its implementation. There is no way to change the model for now. The cost of using this model is around $0.04 per request. Please be aware of this cost.
4444

4545
## CoML Config Agent

coml/ipython_utils.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import base64
44
import json
55
import re
6+
import sys
67
from typing import Any
78

89
from IPython.core.display import Javascript
@@ -11,11 +12,15 @@
1112

1213

1314
def is_jupyter_lab_environ() -> bool:
14-
# https://stackoverflow.com/q/57173235/6837658
15-
import psutil
15+
if sys.platform == "win32":
16+
# FIXME: Assuming jupyter-lab on Windows
17+
return True
18+
else:
19+
# https://stackoverflow.com/q/57173235/6837658
20+
import psutil
1621

17-
parent = psutil.Process().parent()
18-
return "jupyter-lab" in parent.name()
22+
parent = psutil.Process().parent()
23+
return "jupyter-lab" in parent.name()
1924

2025

2126
def insert_cell_below(code: str, metadata: Any = None) -> None:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "coml",
3-
"version": "0.0.3",
3+
"version": "0.0.4",
44
"description": "JupyterLab extension for CoML.",
55
"keywords": [
66
"jupyter",

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "mlcopilot"
7-
version = "0.0.3"
7+
version = "0.0.4"
88
dependencies = [
99
"click",
1010
"colorama",

0 commit comments

Comments
 (0)