Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assuming jupyter lab on Windows and bump to 0.0.4 #13

Merged
merged 3 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading