clouditia 1.2.0__tar.gz → 1.2.2__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.
- {clouditia-1.2.0 → clouditia-1.2.2}/LICENSE +1 -1
- {clouditia-1.2.0/clouditia.egg-info → clouditia-1.2.2}/PKG-INFO +91 -16
- {clouditia-1.2.0 → clouditia-1.2.2}/README.md +89 -11
- {clouditia-1.2.0 → clouditia-1.2.2}/clouditia/__init__.py +1 -1
- {clouditia-1.2.0 → clouditia-1.2.2/clouditia.egg-info}/PKG-INFO +91 -16
- {clouditia-1.2.0 → clouditia-1.2.2}/pyproject.toml +2 -5
- {clouditia-1.2.0 → clouditia-1.2.2}/CHANGELOG.md +0 -0
- {clouditia-1.2.0 → clouditia-1.2.2}/MANIFEST.in +0 -0
- {clouditia-1.2.0 → clouditia-1.2.2}/clouditia/client.py +0 -0
- {clouditia-1.2.0 → clouditia-1.2.2}/clouditia/exceptions.py +0 -0
- {clouditia-1.2.0 → clouditia-1.2.2}/clouditia/jobs.py +0 -0
- {clouditia-1.2.0 → clouditia-1.2.2}/clouditia/magic.py +0 -0
- {clouditia-1.2.0 → clouditia-1.2.2}/clouditia/py.typed +0 -0
- {clouditia-1.2.0 → clouditia-1.2.2}/clouditia/results.py +0 -0
- {clouditia-1.2.0 → clouditia-1.2.2}/clouditia.egg-info/SOURCES.txt +0 -0
- {clouditia-1.2.0 → clouditia-1.2.2}/clouditia.egg-info/dependency_links.txt +0 -0
- {clouditia-1.2.0 → clouditia-1.2.2}/clouditia.egg-info/requires.txt +0 -0
- {clouditia-1.2.0 → clouditia-1.2.2}/clouditia.egg-info/top_level.txt +0 -0
- {clouditia-1.2.0 → clouditia-1.2.2}/setup.cfg +0 -0
- {clouditia-1.2.0 → clouditia-1.2.2}/setup.py +0 -0
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: clouditia
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.2
|
|
4
4
|
Summary: Execute Python and Shell code on remote GPU sessions
|
|
5
5
|
Author-email: Clouditia Team <support@clouditia.com>
|
|
6
6
|
Maintainer-email: Clouditia Team <support@clouditia.com>
|
|
7
7
|
License: MIT
|
|
8
8
|
Project-URL: Homepage, https://clouditia.com
|
|
9
|
-
Project-URL: Documentation, https://clouditia.com/
|
|
10
|
-
Project-URL: Repository, https://github.com/clouditia/clouditia-sdk
|
|
11
|
-
Project-URL: Issues, https://github.com/clouditia/clouditia-sdk/issues
|
|
12
|
-
Project-URL: Changelog, https://github.com/clouditia/clouditia-sdk/blob/main/CHANGELOG.md
|
|
9
|
+
Project-URL: Documentation, https://clouditia.com/docsapisession
|
|
13
10
|
Keywords: gpu,cloud,remote-execution,machine-learning,deep-learning,pytorch,tensorflow,cuda,jupyter,api
|
|
14
11
|
Classifier: Development Status :: 5 - Production/Stable
|
|
15
12
|
Classifier: Intended Audience :: Developers
|
|
@@ -82,6 +79,7 @@ print(result.output)
|
|
|
82
79
|
|
|
83
80
|
- **Python Execution**: Run Python code on remote GPUs
|
|
84
81
|
- **Shell Commands**: Execute shell commands on the GPU pod
|
|
82
|
+
- **Persistent Sessions**: Keep variables between executions with `start()`/`stop()`
|
|
85
83
|
- **Variable Transfer**: Send and retrieve variables between local and remote
|
|
86
84
|
- **Async Jobs**: Submit long-running tasks with real-time log monitoring
|
|
87
85
|
- **Jupyter Magic**: Use `%%clouditia` magic in notebooks
|
|
@@ -93,14 +91,15 @@ print(result.output)
|
|
|
93
91
|
|
|
94
92
|
1. [Getting Your API Key](#getting-your-api-key)
|
|
95
93
|
2. [Basic Usage](#basic-usage)
|
|
96
|
-
3. [
|
|
97
|
-
4. [
|
|
98
|
-
5. [
|
|
99
|
-
6. [
|
|
100
|
-
7. [
|
|
101
|
-
8. [
|
|
102
|
-
9. [
|
|
103
|
-
10. [
|
|
94
|
+
3. [Persistent Sessions](#persistent-sessions)
|
|
95
|
+
4. [Executing Python Code](#executing-python-code)
|
|
96
|
+
5. [Shell Commands](#shell-commands)
|
|
97
|
+
6. [Variable Transfer](#variable-transfer)
|
|
98
|
+
7. [Remote Functions (Decorator)](#remote-functions-decorator)
|
|
99
|
+
8. [Async Jobs (Long-Running Tasks)](#async-jobs-long-running-tasks)
|
|
100
|
+
9. [Jupyter Magic](#jupyter-magic)
|
|
101
|
+
10. [Error Handling](#error-handling)
|
|
102
|
+
11. [API Reference](#api-reference)
|
|
104
103
|
|
|
105
104
|
---
|
|
106
105
|
|
|
@@ -141,6 +140,75 @@ result = session.run("print('Hello from GPU!')")
|
|
|
141
140
|
|
|
142
141
|
---
|
|
143
142
|
|
|
143
|
+
## Persistent Sessions
|
|
144
|
+
|
|
145
|
+
By default, each `run()` call executes in an isolated environment - variables don't persist between calls. Use `start()` and `stop()` to enable persistent sessions where variables are preserved.
|
|
146
|
+
|
|
147
|
+
### Isolated Mode (Default)
|
|
148
|
+
|
|
149
|
+
```python
|
|
150
|
+
# Without start(), variables are NOT persistent
|
|
151
|
+
session.run("x = 10")
|
|
152
|
+
session.run("print(x)") # Error: x is not defined
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Persistent Mode
|
|
156
|
+
|
|
157
|
+
```python
|
|
158
|
+
# Start a persistent session
|
|
159
|
+
session.start()
|
|
160
|
+
print(f"Session active: {session.is_persistent}") # True
|
|
161
|
+
|
|
162
|
+
# Variables now persist between run() calls
|
|
163
|
+
session.run("x = 10")
|
|
164
|
+
session.run("y = 20")
|
|
165
|
+
session.run("z = x + y")
|
|
166
|
+
result = session.run("print(f'Result: {z}')")
|
|
167
|
+
# Output: Result: 30
|
|
168
|
+
|
|
169
|
+
# Stop the session when done
|
|
170
|
+
session.stop()
|
|
171
|
+
print(f"Session active: {session.is_persistent}") # False
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Full Example
|
|
175
|
+
|
|
176
|
+
```python
|
|
177
|
+
from clouditia import GPUSession
|
|
178
|
+
|
|
179
|
+
session = GPUSession("ck_your_api_key")
|
|
180
|
+
|
|
181
|
+
# Start persistent session
|
|
182
|
+
session.start()
|
|
183
|
+
|
|
184
|
+
# Build up state across multiple calls
|
|
185
|
+
session.run("import torch")
|
|
186
|
+
session.run("model = torch.nn.Linear(10, 5).cuda()")
|
|
187
|
+
session.run("data = torch.randn(32, 10).cuda()")
|
|
188
|
+
|
|
189
|
+
# Use the accumulated state
|
|
190
|
+
result = session.run("""
|
|
191
|
+
output = model(data)
|
|
192
|
+
print(f"Input shape: {data.shape}")
|
|
193
|
+
print(f"Output shape: {output.shape}")
|
|
194
|
+
""")
|
|
195
|
+
|
|
196
|
+
# Clean up
|
|
197
|
+
session.stop()
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Checking Session State
|
|
201
|
+
|
|
202
|
+
```python
|
|
203
|
+
# Check if a persistent session is active
|
|
204
|
+
if session.is_persistent:
|
|
205
|
+
print("Persistent session is running")
|
|
206
|
+
else:
|
|
207
|
+
print("Running in isolated mode")
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
144
212
|
## Executing Python Code
|
|
145
213
|
|
|
146
214
|
### Simple Execution
|
|
@@ -632,9 +700,11 @@ GPUSession(
|
|
|
632
700
|
| Method | Description |
|
|
633
701
|
|--------|-------------|
|
|
634
702
|
| `verify()` | Verify API key and get session info |
|
|
635
|
-
| `run(code, timeout=None)` | Execute Python code |
|
|
703
|
+
| `run(code, timeout=None, stream=True)` | Execute Python code |
|
|
636
704
|
| `exec(code, timeout=None)` | Execute without return value |
|
|
637
705
|
| `shell(command, timeout=None)` | Execute shell command |
|
|
706
|
+
| `start()` | Start a persistent session |
|
|
707
|
+
| `stop()` | Stop the persistent session |
|
|
638
708
|
| `set(name, value)` | Send variable to remote |
|
|
639
709
|
| `get(name)` | Retrieve variable from remote |
|
|
640
710
|
| `submit(code, name=None, job_type="python")` | Submit async job |
|
|
@@ -642,6 +712,12 @@ GPUSession(
|
|
|
642
712
|
| `gpu_info()` | Get GPU information |
|
|
643
713
|
| `remote(func)` | Decorator for remote functions |
|
|
644
714
|
|
|
715
|
+
**Properties:**
|
|
716
|
+
|
|
717
|
+
| Property | Description |
|
|
718
|
+
|----------|-------------|
|
|
719
|
+
| `is_persistent` | `True` if a persistent session is active |
|
|
720
|
+
|
|
645
721
|
### ExecutionResult
|
|
646
722
|
|
|
647
723
|
```python
|
|
@@ -802,8 +878,7 @@ print(result.output)
|
|
|
802
878
|
|
|
803
879
|
## Support
|
|
804
880
|
|
|
805
|
-
- **Documentation**: [https://clouditia.com/
|
|
806
|
-
- **Issues**: [https://github.com/clouditia/clouditia-sdk/issues](https://github.com/clouditia/clouditia-sdk/issues)
|
|
881
|
+
- **Documentation**: [https://clouditia.com/docsapisession](https://clouditia.com/docsapisession)
|
|
807
882
|
- **Email**: support@clouditia.com
|
|
808
883
|
|
|
809
884
|
---
|
|
@@ -36,6 +36,7 @@ print(result.output)
|
|
|
36
36
|
|
|
37
37
|
- **Python Execution**: Run Python code on remote GPUs
|
|
38
38
|
- **Shell Commands**: Execute shell commands on the GPU pod
|
|
39
|
+
- **Persistent Sessions**: Keep variables between executions with `start()`/`stop()`
|
|
39
40
|
- **Variable Transfer**: Send and retrieve variables between local and remote
|
|
40
41
|
- **Async Jobs**: Submit long-running tasks with real-time log monitoring
|
|
41
42
|
- **Jupyter Magic**: Use `%%clouditia` magic in notebooks
|
|
@@ -47,14 +48,15 @@ print(result.output)
|
|
|
47
48
|
|
|
48
49
|
1. [Getting Your API Key](#getting-your-api-key)
|
|
49
50
|
2. [Basic Usage](#basic-usage)
|
|
50
|
-
3. [
|
|
51
|
-
4. [
|
|
52
|
-
5. [
|
|
53
|
-
6. [
|
|
54
|
-
7. [
|
|
55
|
-
8. [
|
|
56
|
-
9. [
|
|
57
|
-
10. [
|
|
51
|
+
3. [Persistent Sessions](#persistent-sessions)
|
|
52
|
+
4. [Executing Python Code](#executing-python-code)
|
|
53
|
+
5. [Shell Commands](#shell-commands)
|
|
54
|
+
6. [Variable Transfer](#variable-transfer)
|
|
55
|
+
7. [Remote Functions (Decorator)](#remote-functions-decorator)
|
|
56
|
+
8. [Async Jobs (Long-Running Tasks)](#async-jobs-long-running-tasks)
|
|
57
|
+
9. [Jupyter Magic](#jupyter-magic)
|
|
58
|
+
10. [Error Handling](#error-handling)
|
|
59
|
+
11. [API Reference](#api-reference)
|
|
58
60
|
|
|
59
61
|
---
|
|
60
62
|
|
|
@@ -95,6 +97,75 @@ result = session.run("print('Hello from GPU!')")
|
|
|
95
97
|
|
|
96
98
|
---
|
|
97
99
|
|
|
100
|
+
## Persistent Sessions
|
|
101
|
+
|
|
102
|
+
By default, each `run()` call executes in an isolated environment - variables don't persist between calls. Use `start()` and `stop()` to enable persistent sessions where variables are preserved.
|
|
103
|
+
|
|
104
|
+
### Isolated Mode (Default)
|
|
105
|
+
|
|
106
|
+
```python
|
|
107
|
+
# Without start(), variables are NOT persistent
|
|
108
|
+
session.run("x = 10")
|
|
109
|
+
session.run("print(x)") # Error: x is not defined
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Persistent Mode
|
|
113
|
+
|
|
114
|
+
```python
|
|
115
|
+
# Start a persistent session
|
|
116
|
+
session.start()
|
|
117
|
+
print(f"Session active: {session.is_persistent}") # True
|
|
118
|
+
|
|
119
|
+
# Variables now persist between run() calls
|
|
120
|
+
session.run("x = 10")
|
|
121
|
+
session.run("y = 20")
|
|
122
|
+
session.run("z = x + y")
|
|
123
|
+
result = session.run("print(f'Result: {z}')")
|
|
124
|
+
# Output: Result: 30
|
|
125
|
+
|
|
126
|
+
# Stop the session when done
|
|
127
|
+
session.stop()
|
|
128
|
+
print(f"Session active: {session.is_persistent}") # False
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Full Example
|
|
132
|
+
|
|
133
|
+
```python
|
|
134
|
+
from clouditia import GPUSession
|
|
135
|
+
|
|
136
|
+
session = GPUSession("ck_your_api_key")
|
|
137
|
+
|
|
138
|
+
# Start persistent session
|
|
139
|
+
session.start()
|
|
140
|
+
|
|
141
|
+
# Build up state across multiple calls
|
|
142
|
+
session.run("import torch")
|
|
143
|
+
session.run("model = torch.nn.Linear(10, 5).cuda()")
|
|
144
|
+
session.run("data = torch.randn(32, 10).cuda()")
|
|
145
|
+
|
|
146
|
+
# Use the accumulated state
|
|
147
|
+
result = session.run("""
|
|
148
|
+
output = model(data)
|
|
149
|
+
print(f"Input shape: {data.shape}")
|
|
150
|
+
print(f"Output shape: {output.shape}")
|
|
151
|
+
""")
|
|
152
|
+
|
|
153
|
+
# Clean up
|
|
154
|
+
session.stop()
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Checking Session State
|
|
158
|
+
|
|
159
|
+
```python
|
|
160
|
+
# Check if a persistent session is active
|
|
161
|
+
if session.is_persistent:
|
|
162
|
+
print("Persistent session is running")
|
|
163
|
+
else:
|
|
164
|
+
print("Running in isolated mode")
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
98
169
|
## Executing Python Code
|
|
99
170
|
|
|
100
171
|
### Simple Execution
|
|
@@ -586,9 +657,11 @@ GPUSession(
|
|
|
586
657
|
| Method | Description |
|
|
587
658
|
|--------|-------------|
|
|
588
659
|
| `verify()` | Verify API key and get session info |
|
|
589
|
-
| `run(code, timeout=None)` | Execute Python code |
|
|
660
|
+
| `run(code, timeout=None, stream=True)` | Execute Python code |
|
|
590
661
|
| `exec(code, timeout=None)` | Execute without return value |
|
|
591
662
|
| `shell(command, timeout=None)` | Execute shell command |
|
|
663
|
+
| `start()` | Start a persistent session |
|
|
664
|
+
| `stop()` | Stop the persistent session |
|
|
592
665
|
| `set(name, value)` | Send variable to remote |
|
|
593
666
|
| `get(name)` | Retrieve variable from remote |
|
|
594
667
|
| `submit(code, name=None, job_type="python")` | Submit async job |
|
|
@@ -596,6 +669,12 @@ GPUSession(
|
|
|
596
669
|
| `gpu_info()` | Get GPU information |
|
|
597
670
|
| `remote(func)` | Decorator for remote functions |
|
|
598
671
|
|
|
672
|
+
**Properties:**
|
|
673
|
+
|
|
674
|
+
| Property | Description |
|
|
675
|
+
|----------|-------------|
|
|
676
|
+
| `is_persistent` | `True` if a persistent session is active |
|
|
677
|
+
|
|
599
678
|
### ExecutionResult
|
|
600
679
|
|
|
601
680
|
```python
|
|
@@ -756,8 +835,7 @@ print(result.output)
|
|
|
756
835
|
|
|
757
836
|
## Support
|
|
758
837
|
|
|
759
|
-
- **Documentation**: [https://clouditia.com/
|
|
760
|
-
- **Issues**: [https://github.com/clouditia/clouditia-sdk/issues](https://github.com/clouditia/clouditia-sdk/issues)
|
|
838
|
+
- **Documentation**: [https://clouditia.com/docsapisession](https://clouditia.com/docsapisession)
|
|
761
839
|
- **Email**: support@clouditia.com
|
|
762
840
|
|
|
763
841
|
---
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: clouditia
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.2
|
|
4
4
|
Summary: Execute Python and Shell code on remote GPU sessions
|
|
5
5
|
Author-email: Clouditia Team <support@clouditia.com>
|
|
6
6
|
Maintainer-email: Clouditia Team <support@clouditia.com>
|
|
7
7
|
License: MIT
|
|
8
8
|
Project-URL: Homepage, https://clouditia.com
|
|
9
|
-
Project-URL: Documentation, https://clouditia.com/
|
|
10
|
-
Project-URL: Repository, https://github.com/clouditia/clouditia-sdk
|
|
11
|
-
Project-URL: Issues, https://github.com/clouditia/clouditia-sdk/issues
|
|
12
|
-
Project-URL: Changelog, https://github.com/clouditia/clouditia-sdk/blob/main/CHANGELOG.md
|
|
9
|
+
Project-URL: Documentation, https://clouditia.com/docsapisession
|
|
13
10
|
Keywords: gpu,cloud,remote-execution,machine-learning,deep-learning,pytorch,tensorflow,cuda,jupyter,api
|
|
14
11
|
Classifier: Development Status :: 5 - Production/Stable
|
|
15
12
|
Classifier: Intended Audience :: Developers
|
|
@@ -82,6 +79,7 @@ print(result.output)
|
|
|
82
79
|
|
|
83
80
|
- **Python Execution**: Run Python code on remote GPUs
|
|
84
81
|
- **Shell Commands**: Execute shell commands on the GPU pod
|
|
82
|
+
- **Persistent Sessions**: Keep variables between executions with `start()`/`stop()`
|
|
85
83
|
- **Variable Transfer**: Send and retrieve variables between local and remote
|
|
86
84
|
- **Async Jobs**: Submit long-running tasks with real-time log monitoring
|
|
87
85
|
- **Jupyter Magic**: Use `%%clouditia` magic in notebooks
|
|
@@ -93,14 +91,15 @@ print(result.output)
|
|
|
93
91
|
|
|
94
92
|
1. [Getting Your API Key](#getting-your-api-key)
|
|
95
93
|
2. [Basic Usage](#basic-usage)
|
|
96
|
-
3. [
|
|
97
|
-
4. [
|
|
98
|
-
5. [
|
|
99
|
-
6. [
|
|
100
|
-
7. [
|
|
101
|
-
8. [
|
|
102
|
-
9. [
|
|
103
|
-
10. [
|
|
94
|
+
3. [Persistent Sessions](#persistent-sessions)
|
|
95
|
+
4. [Executing Python Code](#executing-python-code)
|
|
96
|
+
5. [Shell Commands](#shell-commands)
|
|
97
|
+
6. [Variable Transfer](#variable-transfer)
|
|
98
|
+
7. [Remote Functions (Decorator)](#remote-functions-decorator)
|
|
99
|
+
8. [Async Jobs (Long-Running Tasks)](#async-jobs-long-running-tasks)
|
|
100
|
+
9. [Jupyter Magic](#jupyter-magic)
|
|
101
|
+
10. [Error Handling](#error-handling)
|
|
102
|
+
11. [API Reference](#api-reference)
|
|
104
103
|
|
|
105
104
|
---
|
|
106
105
|
|
|
@@ -141,6 +140,75 @@ result = session.run("print('Hello from GPU!')")
|
|
|
141
140
|
|
|
142
141
|
---
|
|
143
142
|
|
|
143
|
+
## Persistent Sessions
|
|
144
|
+
|
|
145
|
+
By default, each `run()` call executes in an isolated environment - variables don't persist between calls. Use `start()` and `stop()` to enable persistent sessions where variables are preserved.
|
|
146
|
+
|
|
147
|
+
### Isolated Mode (Default)
|
|
148
|
+
|
|
149
|
+
```python
|
|
150
|
+
# Without start(), variables are NOT persistent
|
|
151
|
+
session.run("x = 10")
|
|
152
|
+
session.run("print(x)") # Error: x is not defined
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Persistent Mode
|
|
156
|
+
|
|
157
|
+
```python
|
|
158
|
+
# Start a persistent session
|
|
159
|
+
session.start()
|
|
160
|
+
print(f"Session active: {session.is_persistent}") # True
|
|
161
|
+
|
|
162
|
+
# Variables now persist between run() calls
|
|
163
|
+
session.run("x = 10")
|
|
164
|
+
session.run("y = 20")
|
|
165
|
+
session.run("z = x + y")
|
|
166
|
+
result = session.run("print(f'Result: {z}')")
|
|
167
|
+
# Output: Result: 30
|
|
168
|
+
|
|
169
|
+
# Stop the session when done
|
|
170
|
+
session.stop()
|
|
171
|
+
print(f"Session active: {session.is_persistent}") # False
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Full Example
|
|
175
|
+
|
|
176
|
+
```python
|
|
177
|
+
from clouditia import GPUSession
|
|
178
|
+
|
|
179
|
+
session = GPUSession("ck_your_api_key")
|
|
180
|
+
|
|
181
|
+
# Start persistent session
|
|
182
|
+
session.start()
|
|
183
|
+
|
|
184
|
+
# Build up state across multiple calls
|
|
185
|
+
session.run("import torch")
|
|
186
|
+
session.run("model = torch.nn.Linear(10, 5).cuda()")
|
|
187
|
+
session.run("data = torch.randn(32, 10).cuda()")
|
|
188
|
+
|
|
189
|
+
# Use the accumulated state
|
|
190
|
+
result = session.run("""
|
|
191
|
+
output = model(data)
|
|
192
|
+
print(f"Input shape: {data.shape}")
|
|
193
|
+
print(f"Output shape: {output.shape}")
|
|
194
|
+
""")
|
|
195
|
+
|
|
196
|
+
# Clean up
|
|
197
|
+
session.stop()
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Checking Session State
|
|
201
|
+
|
|
202
|
+
```python
|
|
203
|
+
# Check if a persistent session is active
|
|
204
|
+
if session.is_persistent:
|
|
205
|
+
print("Persistent session is running")
|
|
206
|
+
else:
|
|
207
|
+
print("Running in isolated mode")
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
144
212
|
## Executing Python Code
|
|
145
213
|
|
|
146
214
|
### Simple Execution
|
|
@@ -632,9 +700,11 @@ GPUSession(
|
|
|
632
700
|
| Method | Description |
|
|
633
701
|
|--------|-------------|
|
|
634
702
|
| `verify()` | Verify API key and get session info |
|
|
635
|
-
| `run(code, timeout=None)` | Execute Python code |
|
|
703
|
+
| `run(code, timeout=None, stream=True)` | Execute Python code |
|
|
636
704
|
| `exec(code, timeout=None)` | Execute without return value |
|
|
637
705
|
| `shell(command, timeout=None)` | Execute shell command |
|
|
706
|
+
| `start()` | Start a persistent session |
|
|
707
|
+
| `stop()` | Stop the persistent session |
|
|
638
708
|
| `set(name, value)` | Send variable to remote |
|
|
639
709
|
| `get(name)` | Retrieve variable from remote |
|
|
640
710
|
| `submit(code, name=None, job_type="python")` | Submit async job |
|
|
@@ -642,6 +712,12 @@ GPUSession(
|
|
|
642
712
|
| `gpu_info()` | Get GPU information |
|
|
643
713
|
| `remote(func)` | Decorator for remote functions |
|
|
644
714
|
|
|
715
|
+
**Properties:**
|
|
716
|
+
|
|
717
|
+
| Property | Description |
|
|
718
|
+
|----------|-------------|
|
|
719
|
+
| `is_persistent` | `True` if a persistent session is active |
|
|
720
|
+
|
|
645
721
|
### ExecutionResult
|
|
646
722
|
|
|
647
723
|
```python
|
|
@@ -802,8 +878,7 @@ print(result.output)
|
|
|
802
878
|
|
|
803
879
|
## Support
|
|
804
880
|
|
|
805
|
-
- **Documentation**: [https://clouditia.com/
|
|
806
|
-
- **Issues**: [https://github.com/clouditia/clouditia-sdk/issues](https://github.com/clouditia/clouditia-sdk/issues)
|
|
881
|
+
- **Documentation**: [https://clouditia.com/docsapisession](https://clouditia.com/docsapisession)
|
|
807
882
|
- **Email**: support@clouditia.com
|
|
808
883
|
|
|
809
884
|
---
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "clouditia"
|
|
7
|
-
version = "1.2.
|
|
7
|
+
version = "1.2.2"
|
|
8
8
|
description = "Execute Python and Shell code on remote GPU sessions"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "MIT"}
|
|
@@ -66,10 +66,7 @@ jupyter = [
|
|
|
66
66
|
|
|
67
67
|
[project.urls]
|
|
68
68
|
Homepage = "https://clouditia.com"
|
|
69
|
-
Documentation = "https://clouditia.com/
|
|
70
|
-
Repository = "https://github.com/clouditia/clouditia-sdk"
|
|
71
|
-
Issues = "https://github.com/clouditia/clouditia-sdk/issues"
|
|
72
|
-
Changelog = "https://github.com/clouditia/clouditia-sdk/blob/main/CHANGELOG.md"
|
|
69
|
+
Documentation = "https://clouditia.com/docsapisession"
|
|
73
70
|
|
|
74
71
|
[tool.setuptools]
|
|
75
72
|
packages = ["clouditia"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|