cloudpss 4.0.9__tar.gz → 4.0.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.
- {cloudpss-4.0.9 → cloudpss-4.0.10}/PKG-INFO +1 -1
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/runner/runner.py +44 -34
- cloudpss-4.0.10/cloudpss/version.py +1 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss.egg-info/PKG-INFO +1 -1
- cloudpss-4.0.9/cloudpss/version.py +0 -1
- {cloudpss-4.0.9 → cloudpss-4.0.10}/README.md +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/__init__.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/function/__init__.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/function/function.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/function/functionExecution.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/function/job.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/ieslab/DataManageModel.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/ieslab/EvaluationModel.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/ieslab/IESLabPlan.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/ieslab/IESLabSimulation.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/ieslab/PlanModel.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/ieslab/__init__.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/model/__init__.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/model/implements/__init__.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/model/implements/component.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/model/implements/diagram.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/model/implements/implement.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/model/jobDefinitions.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/model/model.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/model/revision.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/model/topology.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/project/__init__.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/project/project.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/runner/IESLabEvaluationResult.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/runner/IESLabPlanResult.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/runner/IESLabTypicalDayResult.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/runner/MessageStreamReceiver.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/runner/__init__.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/runner/receiver.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/runner/result.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/runner/storage.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/runner/transform.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/utils/IO.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/utils/__init__.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/utils/dataEncoder.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/utils/graphqlUtil.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/utils/httprequests.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/utils/matlab.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/utils/yamlLoader.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss/verify.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss.egg-info/SOURCES.txt +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss.egg-info/dependency_links.txt +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss.egg-info/requires.txt +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/cloudpss.egg-info/top_level.txt +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/setup.cfg +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/setup.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/test/test-async.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/test/test-async2.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/test/test-async3.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/test/test-plot.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/test/test-sdk.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/test/test-sdk1.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/test/test-snapshot.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/test/test-topology.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/test/test.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/test/test7950.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/test/testAsync.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/test/testEvent.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/test/testRt.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/test/testRt2.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/test/testSend.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/test/test_in_new_web_1.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/test/test_ws.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/test/test_ws2.py +0 -0
- {cloudpss-4.0.9 → cloudpss-4.0.10}/test/testb.py +0 -0
@@ -117,6 +117,49 @@ class Runner(Generic[T]):
|
|
117
117
|
graphql_request(query, variables)
|
118
118
|
|
119
119
|
|
120
|
+
@staticmethod
|
121
|
+
def __createJobVariables(job, config, revisionHash, rid, policy, **kwargs):
|
122
|
+
# 处理policy字段
|
123
|
+
if policy is None:
|
124
|
+
policy = {}
|
125
|
+
if policy.get("tres", None) is None:
|
126
|
+
policy["tres"] = {}
|
127
|
+
policy["queue"] = job["args"].get("@queue", 1)
|
128
|
+
policy["priority"] = job["args"].get("@priority", 0)
|
129
|
+
tres = {"cpu": 1, "ecpu": 0, "mem": 0}
|
130
|
+
tresStr = job["args"].get("@tres", "")
|
131
|
+
for t in re.split("\s+", tresStr):
|
132
|
+
if t == "":
|
133
|
+
continue
|
134
|
+
k, v = t.split("=")
|
135
|
+
tres[k] = float(v) # type: ignore
|
136
|
+
policy["tres"] = tres
|
137
|
+
function = job["rid"].replace("job-definition/cloudpss/", "function/CloudPSS/")
|
138
|
+
implement = kwargs.get("implement", None)
|
139
|
+
debug = job["args"].get("@debug", None )
|
140
|
+
debugargs={}
|
141
|
+
if debug is not None:
|
142
|
+
t= [ i.split('=') for i in re.split(r'\s+',debug) if i.find('=')>0]
|
143
|
+
for i in t:
|
144
|
+
debugargs[i[0]]=i[1]
|
145
|
+
variables = {
|
146
|
+
"input": {
|
147
|
+
"args": {
|
148
|
+
**job["args"],
|
149
|
+
"_ModelRevision": revisionHash,
|
150
|
+
"_ModelArgs": config["args"],
|
151
|
+
"implement":implement
|
152
|
+
},
|
153
|
+
"context": [
|
154
|
+
function,
|
155
|
+
rid,
|
156
|
+
f"model/@sdk/{str(int(time.time() * random.random()))}",
|
157
|
+
],
|
158
|
+
"policy": policy,
|
159
|
+
"debug":debugargs
|
160
|
+
}
|
161
|
+
}
|
162
|
+
return variables
|
120
163
|
@staticmethod
|
121
164
|
def create(revisionHash,
|
122
165
|
job,
|
@@ -139,42 +182,9 @@ class Runner(Generic[T]):
|
|
139
182
|
>>> runner = Runner.runRevision(revision,job,config,'')
|
140
183
|
'''
|
141
184
|
|
142
|
-
#处理policy字段
|
143
|
-
if policy is None:
|
144
|
-
policy = {}
|
145
|
-
if policy.get('tres', None) is None:
|
146
|
-
policy['tres'] = {}
|
147
|
-
policy['queue'] = job['args'].get('@queue', 1)
|
148
|
-
policy['priority'] = job['args'].get('@priority', 0)
|
149
|
-
tres = {'cpu': 1, 'ecpu': 0, 'mem': 0}
|
150
|
-
tresStr = job['args'].get('@tres', '')
|
151
|
-
for t in re.split('\s+', tresStr):
|
152
|
-
if t == '':
|
153
|
-
continue
|
154
|
-
k, v = t.split('=')
|
155
|
-
tres[k] = float(v) #type: ignore
|
156
|
-
policy['tres'] = tres
|
157
185
|
|
158
186
|
query = '''mutation($input:CreateJobInput!){job:createJob(input:$input){id input output status position}}'''
|
159
|
-
|
160
|
-
'function/CloudPSS/')
|
161
|
-
variables = {
|
162
|
-
'input': {
|
163
|
-
"args":
|
164
|
-
{
|
165
|
-
**job['args'],
|
166
|
-
'_ModelRevision' : revisionHash,
|
167
|
-
'_ModelArgs' : config['args']
|
168
|
-
},
|
169
|
-
"context": [
|
170
|
-
function,
|
171
|
-
f"model/@sdk/{str(int(time.time() * random.random()))}",
|
172
|
-
rid
|
173
|
-
],
|
174
|
-
"policy":
|
175
|
-
policy,
|
176
|
-
}
|
177
|
-
}
|
187
|
+
variables = Runner.__createJobVariables(job, config, revisionHash, rid,policy)
|
178
188
|
r = graphql_request(query, variables)
|
179
189
|
if 'errors' in r:
|
180
190
|
raise Exception(r['errors'])
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = '4.0.10'
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = '4.0.9'
|
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
|
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
|
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
|
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
|
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
|