Skip to content

Commit

Permalink
Assuming jupyter lab on Windows and bump to 0.0.4 (#13)
Browse files Browse the repository at this point in the history
* Assuming jupyter lab on Windows and bump to 0.0.4

* update README

* Fix lint
  • Loading branch information
ultmaster authored Nov 3, 2023
1 parent 10dd98b commit b6f325d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Then we have provided several commands to assist your journey with interactive c

**Limitations:**

* 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.
* 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.
* 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.

## CoML Config Agent
Expand Down
13 changes: 9 additions & 4 deletions coml/ipython_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import base64
import json
import re
import sys
from typing import Any

from IPython.core.display import Javascript
Expand All @@ -11,11 +12,15 @@


def is_jupyter_lab_environ() -> bool:
# https://stackoverflow.com/q/57173235/6837658
import psutil
if sys.platform == "win32":
# FIXME: Assuming jupyter-lab on Windows
return True
else:
# https://stackoverflow.com/q/57173235/6837658
import psutil

parent = psutil.Process().parent()
return "jupyter-lab" in parent.name()
parent = psutil.Process().parent()
return "jupyter-lab" in parent.name()


def insert_cell_below(code: str, metadata: Any = None) -> None:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "coml",
"version": "0.0.3",
"version": "0.0.4",
"description": "JupyterLab extension for CoML.",
"keywords": [
"jupyter",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "mlcopilot"
version = "0.0.3"
version = "0.0.4"
dependencies = [
"click",
"colorama",
Expand Down

0 comments on commit b6f325d

Please sign in to comment.