ep-sdk-4pd 1.1.3.dev0__tar.gz → 1.2.0__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.
- {ep_sdk_4pd-1.1.3.dev0 → ep_sdk_4pd-1.2.0}/PKG-INFO +1 -1
- ep_sdk_4pd-1.2.0/ep_sdk_4pd/__init__.py +1 -0
- {ep_sdk_4pd-1.1.3.dev0 → ep_sdk_4pd-1.2.0}/ep_sdk_4pd/ep_data.py +2 -2
- {ep_sdk_4pd-1.1.3.dev0 → ep_sdk_4pd-1.2.0}/ep_sdk_4pd/ep_system.py +28 -18
- {ep_sdk_4pd-1.1.3.dev0 → ep_sdk_4pd-1.2.0}/ep_sdk_4pd.egg-info/PKG-INFO +1 -1
- {ep_sdk_4pd-1.1.3.dev0 → ep_sdk_4pd-1.2.0}/setup.py +1 -1
- ep_sdk_4pd-1.1.3.dev0/ep_sdk_4pd/__init__.py +0 -1
- {ep_sdk_4pd-1.1.3.dev0 → ep_sdk_4pd-1.2.0}/README.md +0 -0
- {ep_sdk_4pd-1.1.3.dev0 → ep_sdk_4pd-1.2.0}/ep_sdk_4pd/models.py +0 -0
- {ep_sdk_4pd-1.1.3.dev0 → ep_sdk_4pd-1.2.0}/ep_sdk_4pd.egg-info/SOURCES.txt +0 -0
- {ep_sdk_4pd-1.1.3.dev0 → ep_sdk_4pd-1.2.0}/ep_sdk_4pd.egg-info/dependency_links.txt +0 -0
- {ep_sdk_4pd-1.1.3.dev0 → ep_sdk_4pd-1.2.0}/ep_sdk_4pd.egg-info/requires.txt +0 -0
- {ep_sdk_4pd-1.1.3.dev0 → ep_sdk_4pd-1.2.0}/ep_sdk_4pd.egg-info/top_level.txt +0 -0
- {ep_sdk_4pd-1.1.3.dev0 → ep_sdk_4pd-1.2.0}/setup.cfg +0 -0
- {ep_sdk_4pd-1.1.3.dev0 → ep_sdk_4pd-1.2.0}/tests/test_call_train_done.py +0 -0
- {ep_sdk_4pd-1.1.3.dev0 → ep_sdk_4pd-1.2.0}/tests/test_get_run_strategy.py +0 -0
- {ep_sdk_4pd-1.1.3.dev0 → ep_sdk_4pd-1.2.0}/tests/test_get_system_date.py +0 -0
- {ep_sdk_4pd-1.1.3.dev0 → ep_sdk_4pd-1.2.0}/tests/test_history_data.py +0 -0
- {ep_sdk_4pd-1.1.3.dev0 → ep_sdk_4pd-1.2.0}/tests/test_model_output_dir.py +0 -0
- {ep_sdk_4pd-1.1.3.dev0 → ep_sdk_4pd-1.2.0}/tests/test_predict_data.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ep_sdk_4pd
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.2.0
|
4
4
|
Summary: 4paradigm Electricity Platform Service SDK Library for Python
|
5
5
|
Home-page: https://gitlab.4pd.io/electricityproject/electricity-platform-sdk
|
6
6
|
Author: 4paradigm Electricity Platform SDK
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = '1.2.0'
|
@@ -8,13 +8,13 @@ from ep_sdk_4pd.ep_system import EpSystem
|
|
8
8
|
from ep_sdk_4pd.models import HistoryDataRequest, PredictDataRequest
|
9
9
|
|
10
10
|
# test 地址
|
11
|
-
endpoint = 'http://172.27.88.56:6001'
|
11
|
+
# endpoint = 'http://172.27.88.56:6001'
|
12
12
|
|
13
13
|
# prod 地址
|
14
14
|
# endpoint = 'http://172.27.88.56:6601'
|
15
15
|
|
16
16
|
# 外网 地址
|
17
|
-
|
17
|
+
endpoint = 'http://82.157.231.254:6001'
|
18
18
|
|
19
19
|
Authorization = 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJlbGVjdHJpY2l0eS1wbGF0Zm9ybSIsInN1YiI6IjEyMyIsImlhdCI6MTc0NjYwNjQ4NSwianRpIjoiMTIzXzE3NDY1Nzc2ODUxNDYiLCJ0eXBlIjoiYWNjZXNzIn0.Clrz_8j3aJlXTWPX-4DS0NxXN9idTcUIc0AtXOMIjd8'
|
20
20
|
|
@@ -12,13 +12,13 @@ from ep_sdk_4pd import models as ep_sdk_4pd_models
|
|
12
12
|
from ep_sdk_4pd.models import RunStrategyRequest, CallTrainDoneRequest, RsaKeyRequest
|
13
13
|
|
14
14
|
# test 地址
|
15
|
-
endpoint = 'http://172.27.88.56:6001'
|
15
|
+
# endpoint = 'http://172.27.88.56:6001'
|
16
16
|
|
17
17
|
# prod 地址
|
18
18
|
# endpoint = 'http://172.27.88.56:6601'
|
19
19
|
|
20
20
|
# 外网 地址
|
21
|
-
|
21
|
+
endpoint = 'http://82.157.231.254:6001'
|
22
22
|
|
23
23
|
Authorization = 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJlbGVjdHJpY2l0eS1wbGF0Zm9ybSIsInN1YiI6IjEyMyIsImlhdCI6MTc0NjYwNjQ4NSwianRpIjoiMTIzXzE3NDY1Nzc2ODUxNDYiLCJ0eXBlIjoiYWNjZXNzIn0.Clrz_8j3aJlXTWPX-4DS0NxXN9idTcUIc0AtXOMIjd8'
|
24
24
|
|
@@ -29,24 +29,34 @@ def rsa_decrypt(privkey, ciphertext):
|
|
29
29
|
class EpSystem:
|
30
30
|
|
31
31
|
@staticmethod
|
32
|
-
def model_output_dir(
|
33
|
-
|
32
|
+
def model_output_dir(
|
33
|
+
# is_online: bool = True
|
34
|
+
):
|
35
|
+
user_home = os.path.expanduser('root')
|
34
36
|
base_dir = os.path.join(user_home, "modelResult")
|
35
37
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
38
|
+
# 从环境变量中获取策略id
|
39
|
+
strategy_id = os.getenv('STRATEGY_ID')
|
40
|
+
logging.info(f'strategy_id: {strategy_id}')
|
41
|
+
|
42
|
+
if strategy_id is None:
|
43
|
+
raise Exception('STRATEGY_ID is not set')
|
44
|
+
|
45
|
+
target_dir = os.path.join(base_dir, f"{strategy_id}")
|
46
|
+
# if is_online:
|
47
|
+
# # 从环境变量中获取策略id
|
48
|
+
# strategy_id = os.getenv('STRATEGY_ID')
|
49
|
+
# logging.info(f'strategy_id: {strategy_id}')
|
50
|
+
#
|
51
|
+
# if strategy_id is None:
|
52
|
+
# raise Exception('STRATEGY_ID is not set')
|
53
|
+
#
|
54
|
+
# target_dir = os.path.join(base_dir, f"{strategy_id}")
|
55
|
+
# else:
|
56
|
+
# # 线下环境
|
57
|
+
# target_dir = os.path.join(base_dir, "test")
|
58
|
+
#
|
59
|
+
# Path(target_dir).mkdir(parents=True, exist_ok=True)
|
50
60
|
|
51
61
|
abs_path = os.path.abspath(target_dir)
|
52
62
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ep_sdk_4pd
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.2.0
|
4
4
|
Summary: 4paradigm Electricity Platform Service SDK Library for Python
|
5
5
|
Home-page: https://gitlab.4pd.io/electricityproject/electricity-platform-sdk
|
6
6
|
Author: 4paradigm Electricity Platform SDK
|
@@ -8,7 +8,7 @@ DESCRIPTION = '4paradigm Electricity Platform Service SDK Library for Python'
|
|
8
8
|
AUTHOR = '4paradigm Electricity Platform SDK'
|
9
9
|
AUTHOR_EMAIL = ''
|
10
10
|
URL = 'https://gitlab.4pd.io/electricityproject/electricity-platform-sdk'
|
11
|
-
VERSION = '1.
|
11
|
+
VERSION = '1.2.0'
|
12
12
|
REQUIRES = ['requests']
|
13
13
|
|
14
14
|
LONG_DESCRIPTION = ''
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = '1.1.3.dev0'
|
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
|