deriva-ml 1.8.4__tar.gz → 1.8.10__tar.gz
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.
- deriva_ml-1.8.10/.github/workflows/publish-docs.yml +29 -0
- deriva_ml-1.8.10/.gitignore +160 -0
- {deriva_ml-1.8.4/src/deriva_ml.egg-info → deriva_ml-1.8.10}/PKG-INFO +5 -3
- deriva_ml-1.8.10/docs/.DS_Store +0 -0
- deriva_ml-1.8.10/docs/Notebooks/DerivaML Create Notes.ipynb +248 -0
- deriva_ml-1.8.10/docs/Notebooks/DerivaML Dataset.ipynb +463 -0
- deriva_ml-1.8.10/docs/Notebooks/DerivaML Execution.ipynb +338 -0
- deriva_ml-1.8.10/docs/Notebooks/DerivaML Features.ipynb +435 -0
- deriva_ml-1.8.10/docs/Notebooks/DerivaML Vocabulary.ipynb +243 -0
- deriva_ml-1.8.10/docs/assets/ERD.png +0 -0
- deriva_ml-1.8.10/docs/assets/Launcher.png +0 -0
- deriva_ml-1.8.10/docs/assets/copy_minid.png +0 -0
- deriva_ml-1.8.10/docs/assets/deriva-logo.png +0 -0
- deriva_ml-1.8.10/docs/assets/deriva-ml.pdf +0 -0
- deriva_ml-1.8.10/docs/assets/sharing-at-home.pdf +0 -0
- deriva_ml-1.8.10/docs/code-docs/dataset.md +2 -0
- deriva_ml-1.8.10/docs/code-docs/dataset_aux_classes.md +4 -0
- deriva_ml-1.8.10/docs/code-docs/dataset_bag.md +4 -0
- deriva_ml-1.8.10/docs/code-docs/deriva_ml_base.md +22 -0
- deriva_ml-1.8.10/docs/code-docs/deriva_model.md +2 -0
- deriva_ml-1.8.10/docs/code-docs/execution.md +7 -0
- deriva_ml-1.8.10/docs/code-docs/execution_configuration.md +4 -0
- deriva_ml-1.8.10/docs/code-docs/feature.md +2 -0
- deriva_ml-1.8.10/docs/code-docs/upload.md +2 -0
- deriva_ml-1.8.10/docs/deriva_ml_structure.md +28 -0
- deriva_ml-1.8.10/docs/index.md +22 -0
- deriva_ml-1.8.10/docs/release-notes.md +20 -0
- deriva_ml-1.8.10/docs/user-guide/datasets.md +112 -0
- deriva_ml-1.8.10/docs/user-guide/execution-configuration.md +14 -0
- deriva_ml-1.8.10/docs/user-guide/identifiers.md +19 -0
- deriva_ml-1.8.10/docs/user-guide/install.md +30 -0
- deriva_ml-1.8.10/docs/user-guide/ml_workflow_instruction.md +188 -0
- deriva_ml-1.8.10/mkdocs.yml +64 -0
- deriva_ml-1.8.10/pyproject.toml +59 -0
- deriva_ml-1.8.10/release.sh +36 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/__init__.py +10 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/deriva_ml_base.py +107 -68
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/execution.py +1 -1
- {deriva_ml-1.8.4 → deriva_ml-1.8.10/src/deriva_ml.egg-info}/PKG-INFO +5 -3
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml.egg-info/SOURCES.txt +36 -2
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml.egg-info/requires.txt +2 -1
- deriva_ml-1.8.10/tests/__init__.py +0 -0
- deriva_ml-1.8.10/tests/derivaml_test.py +68 -0
- deriva_ml-1.8.10/tests/runner.py +35 -0
- deriva_ml-1.8.4/pyproject.toml +0 -38
- deriva_ml-1.8.4/src/deriva_ml/VERSION.py +0 -1
- deriva_ml-1.8.4/src/deriva_ml/deriva_ml_execute.py +0 -104
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/LICENSE +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/README.md +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/setup.cfg +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/build/lib/schema_setup/__init__.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/build/lib/schema_setup/alter_annotation.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/build/lib/schema_setup/annotation_temp.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/build/lib/schema_setup/create_schema.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/build/lib/schema_setup/table_comments_utils.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/database_model.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/dataset.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/dataset_aux_classes.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/dataset_bag.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/demo_catalog.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/deriva_definitions.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/deriva_model.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/execution_configuration.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/execution_environment.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/feature.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/history.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/schema_setup/__init__.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/schema_setup/alter_annotation.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/schema_setup/annotations.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/schema_setup/create_schema.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/schema_setup/policy.json +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/schema_setup/table_comments_utils.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/test_functions.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml/upload.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml.egg-info/dependency_links.txt +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml.egg-info/entry_points.txt +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/src/deriva_ml.egg-info/top_level.txt +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/tests/test_basic_tables.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/tests/test_dataset.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/tests/test_download.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/tests/test_execution.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/tests/test_features.py +0 -0
- {deriva_ml-1.8.4 → deriva_ml-1.8.10}/tests/test_upload.py +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: DerivaML
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- master
|
|
6
|
+
- main
|
|
7
|
+
permissions:
|
|
8
|
+
contents: write
|
|
9
|
+
jobs:
|
|
10
|
+
deploy:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- name: Configure Git Credentials
|
|
15
|
+
run: |
|
|
16
|
+
git config user.name github-actions[bot]
|
|
17
|
+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: 3.x
|
|
21
|
+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
|
|
22
|
+
- uses: actions/cache@v4
|
|
23
|
+
with:
|
|
24
|
+
key: mkdocs-material-${{ env.cache_id }}
|
|
25
|
+
path: .cache
|
|
26
|
+
restore-keys: |
|
|
27
|
+
mkdocs-material-
|
|
28
|
+
- run: pip install mkdocs-material mkdocstrings[python] mkdocs-jupyter ruff semver
|
|
29
|
+
- run: mkdocs gh-deploy --force
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# poetry
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
102
|
+
#poetry.lock
|
|
103
|
+
|
|
104
|
+
# pdm
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
106
|
+
#pdm.lock
|
|
107
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
108
|
+
# in version control.
|
|
109
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
110
|
+
.pdm.toml
|
|
111
|
+
|
|
112
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
113
|
+
__pypackages__/
|
|
114
|
+
|
|
115
|
+
# Celery stuff
|
|
116
|
+
celerybeat-schedule
|
|
117
|
+
celerybeat.pid
|
|
118
|
+
|
|
119
|
+
# SageMath parsed files
|
|
120
|
+
*.sage.py
|
|
121
|
+
|
|
122
|
+
# Environments
|
|
123
|
+
.env
|
|
124
|
+
.venv
|
|
125
|
+
env/
|
|
126
|
+
venv/
|
|
127
|
+
ENV/
|
|
128
|
+
env.bak/
|
|
129
|
+
venv.bak/
|
|
130
|
+
|
|
131
|
+
# Spyder project settings
|
|
132
|
+
.spyderproject
|
|
133
|
+
.spyproject
|
|
134
|
+
|
|
135
|
+
# Rope project settings
|
|
136
|
+
.ropeproject
|
|
137
|
+
|
|
138
|
+
# mkdocs documentation
|
|
139
|
+
/site
|
|
140
|
+
|
|
141
|
+
# mypy
|
|
142
|
+
.mypy_cache/
|
|
143
|
+
.dmypy.json
|
|
144
|
+
dmypy.json
|
|
145
|
+
|
|
146
|
+
# Pyre type checker
|
|
147
|
+
.pyre/
|
|
148
|
+
|
|
149
|
+
# pytype static type analyzer
|
|
150
|
+
.pytype/
|
|
151
|
+
|
|
152
|
+
# Cython debug symbols
|
|
153
|
+
cython_debug/
|
|
154
|
+
|
|
155
|
+
# PyCharm
|
|
156
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
157
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
158
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
159
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
160
|
+
.idea/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: deriva-ml
|
|
3
|
-
Version: 1.8.
|
|
3
|
+
Version: 1.8.10
|
|
4
4
|
Summary: Utilities to simplify use of Dervia and Pandas to create reproducable ML pipelines
|
|
5
5
|
Author-email: ISRD <isrd-dev@isi.edu>
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -11,8 +11,10 @@ Requires-Dist: pandas
|
|
|
11
11
|
Requires-Dist: regex~=2024.7.24
|
|
12
12
|
Requires-Dist: pydantic>=2.10.6
|
|
13
13
|
Requires-Dist: semver>3.0.0
|
|
14
|
-
Requires-Dist: setuptools
|
|
14
|
+
Requires-Dist: setuptools>=64
|
|
15
|
+
Requires-Dist: setuptools-scm<=6.0
|
|
15
16
|
Requires-Dist: nbstripout
|
|
17
|
+
Dynamic: license-file
|
|
16
18
|
|
|
17
19
|
Deriva-ML is a python libary to simplify the process of creating and executing reproducible machine learning workflows
|
|
18
20
|
using a deriva catalog.
|
|
Binary file
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cells": [
|
|
3
|
+
{
|
|
4
|
+
"cell_type": "markdown",
|
|
5
|
+
"id": "94ffee41-4986-4196-b35d-b38b6e10490a",
|
|
6
|
+
"metadata": {},
|
|
7
|
+
"source": [
|
|
8
|
+
"DerivaML is a class library built on the Deriva Scientific Asset management system that is designed to help simplify a number of the basic operations associated with building and testing ML libraries based on common toolkits such as TensorFlow. This notebook reviews the basic features of the DerivaML library."
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"cell_type": "code",
|
|
13
|
+
"id": "ff605747-195b-40a1-b915-0e799f8d0748",
|
|
14
|
+
"metadata": {
|
|
15
|
+
"ExecuteTime": {
|
|
16
|
+
"end_time": "2025-02-25T21:48:28.351714Z",
|
|
17
|
+
"start_time": "2025-02-25T21:48:28.337684Z"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"source": [
|
|
21
|
+
"%load_ext autoreload\n",
|
|
22
|
+
"%autoreload 2"
|
|
23
|
+
],
|
|
24
|
+
"outputs": [],
|
|
25
|
+
"execution_count": 1
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"cell_type": "code",
|
|
29
|
+
"id": "9493a5ef-86b9-490b-a1d5-f461fdcd68ef",
|
|
30
|
+
"metadata": {
|
|
31
|
+
"ExecuteTime": {
|
|
32
|
+
"end_time": "2025-02-25T21:48:34.419914Z",
|
|
33
|
+
"start_time": "2025-02-25T21:48:33.686305Z"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"source": [
|
|
37
|
+
"import builtins\n",
|
|
38
|
+
"from demo_catalog import create_demo_catalog, DemoML\n",
|
|
39
|
+
"from deriva.core.utils.globus_auth_utils import GlobusNativeLogin\n",
|
|
40
|
+
"from IPython.display import display, Markdown, HTML, IFrame\n"
|
|
41
|
+
],
|
|
42
|
+
"outputs": [],
|
|
43
|
+
"execution_count": 2
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"cell_type": "markdown",
|
|
47
|
+
"id": "ba06990f-6dc5-4805-9e82-0881a524bfef",
|
|
48
|
+
"metadata": {},
|
|
49
|
+
"source": [
|
|
50
|
+
"Set the details for the catalog we want and authenticate to the server if needed."
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"cell_type": "code",
|
|
55
|
+
"id": "9ee79ab7-a3f7-4c69-9c80-336871c13ec2",
|
|
56
|
+
"metadata": {
|
|
57
|
+
"ExecuteTime": {
|
|
58
|
+
"end_time": "2024-11-29T21:26:58.015044Z",
|
|
59
|
+
"start_time": "2024-11-29T21:26:57.868191Z"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"source": [
|
|
63
|
+
"hostname = 'dev.eye-ai.org'\n",
|
|
64
|
+
"domain_schema = 'demo-schema'\n",
|
|
65
|
+
"\n",
|
|
66
|
+
"gnl = GlobusNativeLogin(host=hostname)\n",
|
|
67
|
+
"if gnl.is_logged_in([hostname]):\n",
|
|
68
|
+
" print(\"You are already logged in.\")\n",
|
|
69
|
+
"else:\n",
|
|
70
|
+
" gnl.login([hostname], no_local_server=True, no_browser=True, refresh_tokens=True, update_bdbag_keychain=True)\n",
|
|
71
|
+
" print(\"Login Successful\")\n"
|
|
72
|
+
],
|
|
73
|
+
"outputs": [
|
|
74
|
+
{
|
|
75
|
+
"name": "stdout",
|
|
76
|
+
"output_type": "stream",
|
|
77
|
+
"text": [
|
|
78
|
+
"You are already logged in.\n"
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"execution_count": 6
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"metadata": {
|
|
86
|
+
"ExecuteTime": {
|
|
87
|
+
"end_time": "2025-02-25T21:55:24.227032Z",
|
|
88
|
+
"start_time": "2025-02-25T21:55:24.201465Z"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"cell_type": "code",
|
|
92
|
+
"source": [
|
|
93
|
+
"import json\n",
|
|
94
|
+
"import os\n",
|
|
95
|
+
"import ipykernel\n",
|
|
96
|
+
"import requests\n",
|
|
97
|
+
"\n",
|
|
98
|
+
"def get_notebook_filename():\n",
|
|
99
|
+
" \"\"\"Returns the current Jupyter Notebook filename.\"\"\"\n",
|
|
100
|
+
" try:\n",
|
|
101
|
+
" # Get the kernel ID\n",
|
|
102
|
+
" kernel_id = ipykernel.connect.get_connection_file().split('-')[1].split('.')[0]\n",
|
|
103
|
+
" print(kernel_id)\n",
|
|
104
|
+
" # Get running notebook servers\n",
|
|
105
|
+
" response = requests.get('http://127.0.0.1:8888/api/sessions', headers={'Authorization': ''})\n",
|
|
106
|
+
" sessions = json.loads(response.text)\n",
|
|
107
|
+
" print(sessions)\n",
|
|
108
|
+
" # Match the kernel ID to find the notebook name\n",
|
|
109
|
+
" for session in sessions:\n",
|
|
110
|
+
" print(session)\n",
|
|
111
|
+
" if session['kernel']['id'] == kernel_id:\n",
|
|
112
|
+
" return session['name'] # Returns the filename\n",
|
|
113
|
+
" except Exception as e:\n",
|
|
114
|
+
" return f\"Error: {e}\"\n",
|
|
115
|
+
"\n",
|
|
116
|
+
"# Usage\n",
|
|
117
|
+
"notebook_file = get_notebook_filename()\n",
|
|
118
|
+
"print(f\"Current Notebook: {notebook_file}\")"
|
|
119
|
+
],
|
|
120
|
+
"id": "94d9b590bc04d3fa",
|
|
121
|
+
"outputs": [
|
|
122
|
+
{
|
|
123
|
+
"name": "stdout",
|
|
124
|
+
"output_type": "stream",
|
|
125
|
+
"text": [
|
|
126
|
+
"23f783f8\n",
|
|
127
|
+
"{'message': 'Forbidden', 'reason': None}\n",
|
|
128
|
+
"message\n",
|
|
129
|
+
"Current Notebook: Error: string indices must be integers\n"
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
"execution_count": 8
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"cell_type": "code",
|
|
137
|
+
"id": "e9bddcf0-27ea-40b3-a388-b77635586fad",
|
|
138
|
+
"metadata": {
|
|
139
|
+
"ExecuteTime": {
|
|
140
|
+
"end_time": "2024-11-29T21:27:24.811146Z",
|
|
141
|
+
"start_time": "2024-11-29T21:27:01.353095Z"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"source": [
|
|
145
|
+
"test_catalog = create_demo_catalog(hostname, domain_schema)\n",
|
|
146
|
+
"ml_instance = DemoML(hostname, test_catalog.catalog_id)"
|
|
147
|
+
],
|
|
148
|
+
"outputs": [],
|
|
149
|
+
"execution_count": 7
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"cell_type": "markdown",
|
|
153
|
+
"id": "92416df1-e3f9-4097-bc19-b24712dc7242",
|
|
154
|
+
"metadata": {},
|
|
155
|
+
"source": [
|
|
156
|
+
"Now using TestFeatureClass, we can create some instances of the feature and add it. We must have a exeuction_rid in order to define the feature."
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"metadata": {
|
|
161
|
+
"ExecuteTime": {
|
|
162
|
+
"end_time": "2024-11-29T21:44:32.359769Z",
|
|
163
|
+
"start_time": "2024-11-29T21:44:32.301145Z"
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"cell_type": "code",
|
|
167
|
+
"source": "display(IFrame(ml_instance.chaise_url('Page'), 500, 500))\n",
|
|
168
|
+
"id": "4a7c313481859e78",
|
|
169
|
+
"outputs": [
|
|
170
|
+
{
|
|
171
|
+
"data": {
|
|
172
|
+
"text/plain": [
|
|
173
|
+
"<IPython.lib.display.IFrame at 0x17b5d6b10>"
|
|
174
|
+
],
|
|
175
|
+
"text/html": [
|
|
176
|
+
"\n",
|
|
177
|
+
" <iframe\n",
|
|
178
|
+
" width=\"500\"\n",
|
|
179
|
+
" height=\"500\"\n",
|
|
180
|
+
" src=\"https://dev.eye-ai.org/chaise/recordset/#631/www%3APage\"\n",
|
|
181
|
+
" frameborder=\"0\"\n",
|
|
182
|
+
" allowfullscreen\n",
|
|
183
|
+
" \n",
|
|
184
|
+
" ></iframe>\n",
|
|
185
|
+
" "
|
|
186
|
+
]
|
|
187
|
+
},
|
|
188
|
+
"metadata": {},
|
|
189
|
+
"output_type": "display_data"
|
|
190
|
+
}
|
|
191
|
+
],
|
|
192
|
+
"execution_count": 21
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"metadata": {
|
|
196
|
+
"ExecuteTime": {
|
|
197
|
+
"end_time": "2024-11-29T21:49:30.725063Z",
|
|
198
|
+
"start_time": "2024-11-29T21:49:29.753350Z"
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"cell_type": "code",
|
|
202
|
+
"source": "ml_instance.chaise_url('Page')",
|
|
203
|
+
"id": "ea200c3f5ff4d39f",
|
|
204
|
+
"outputs": [
|
|
205
|
+
{
|
|
206
|
+
"data": {
|
|
207
|
+
"text/plain": [
|
|
208
|
+
"'https://dev.eye-ai.org/chaise/recordset/#631/www:Page'"
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
"execution_count": 23,
|
|
212
|
+
"metadata": {},
|
|
213
|
+
"output_type": "execute_result"
|
|
214
|
+
}
|
|
215
|
+
],
|
|
216
|
+
"execution_count": 23
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"metadata": {},
|
|
220
|
+
"cell_type": "code",
|
|
221
|
+
"source": "test_catalog.delete_ermrest_catalog(really=True)",
|
|
222
|
+
"id": "79aa46cf32c2db00",
|
|
223
|
+
"outputs": [],
|
|
224
|
+
"execution_count": null
|
|
225
|
+
}
|
|
226
|
+
],
|
|
227
|
+
"metadata": {
|
|
228
|
+
"kernelspec": {
|
|
229
|
+
"display_name": "Python 3 (ipykernel)",
|
|
230
|
+
"language": "python",
|
|
231
|
+
"name": "python3"
|
|
232
|
+
},
|
|
233
|
+
"language_info": {
|
|
234
|
+
"codemirror_mode": {
|
|
235
|
+
"name": "ipython",
|
|
236
|
+
"version": 3
|
|
237
|
+
},
|
|
238
|
+
"file_extension": ".py",
|
|
239
|
+
"mimetype": "text/x-python",
|
|
240
|
+
"name": "python",
|
|
241
|
+
"nbconvert_exporter": "python",
|
|
242
|
+
"pygments_lexer": "ipython3",
|
|
243
|
+
"version": "3.12.2"
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
"nbformat": 4,
|
|
247
|
+
"nbformat_minor": 5
|
|
248
|
+
}
|