Browse Source

fix: 🐛 correct SQL query parameter name in get_model_by_id_and_version function

master
CJL6015 1 month ago
parent
commit
017fbf14b4
  1. 61
      .idea/workspace.xml
  2. 2
      PCA_Test.py

61
.idea/workspace.xml

@ -5,14 +5,8 @@
</component>
<component name="ChangeListManager">
<list default="true" id="01f2c793-fd4e-48a4-8a46-398afce1d721" name="Default" comment="">
<change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/FlaskWebApi.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/FlaskWebApi.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/PCA_Test.py" beforeDir="false" afterPath="$PROJECT_DIR$/PCA_Test.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/PCA_Train.py" beforeDir="false" afterPath="$PROJECT_DIR$/PCA_Train.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/environment.yml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/requirements.txt" beforeDir="false" afterPath="$PROJECT_DIR$/requirements.txt" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -29,9 +23,9 @@
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectColorInfo"><![CDATA[{
"associatedIndex": 2
}]]></component>
<component name="ProjectColorInfo">{
&quot;associatedIndex&quot;: 2
}</component>
<component name="ProjectId" id="1b5BbYSWUA3yaU618uWBsmgh0DZ" />
<component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default">
@ -53,23 +47,23 @@
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"Python.app.executor": "Debug",
"RunOnceActivity.ShowReadmeOnStart": "true",
"RunOnceActivity.git.unshallow": "true",
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
"git-widget-placeholder": "master",
"last_opened_file_path": "C:/Users/cjl60/Documents/work/alert/model-lab",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "npm",
"settings.editor.selected.configurable": "com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable",
"vue.rearranger.settings.migration": "true"
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;Python.app.executor&quot;: &quot;Debug&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.git.unshallow&quot;: &quot;true&quot;,
&quot;SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
&quot;git-widget-placeholder&quot;: &quot;master&quot;,
&quot;last_opened_file_path&quot;: &quot;C:/Users/cjl60/Documents/work/alert/model-lab&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
}
}]]></component>
}</component>
<component name="PyConsoleOptionsProvider">
<option name="myPythonConsoleState">
<console-settings module-name="FlaskWebApi" is-module-sdk="true">
@ -122,7 +116,8 @@
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1568983181226</updated>
<workItem from="1764383006335" duration="3894000" />
<workItem from="1764383006335" duration="4596000" />
<workItem from="1764495636622" duration="173000" />
</task>
<servers />
</component>
@ -870,18 +865,18 @@
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/PCA_Test.py</url>
<line>196</line>
<option name="timeStamp" value="1596" />
<line>270</line>
<option name="timeStamp" value="1599" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/PCA_Test.py</url>
<line>270</line>
<option name="timeStamp" value="1599" />
<line>290</line>
<option name="timeStamp" value="1601" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/PCA_Test.py</url>
<line>268</line>
<option name="timeStamp" value="1600" />
<line>198</line>
<option name="timeStamp" value="1602" />
</line-breakpoint>
</breakpoints>
<default-breakpoints>
@ -894,6 +889,6 @@
</breakpoint-manager>
</component>
<component name="com.intellij.coverage.CoverageDataManagerImpl">
<SUITE FILE_PATH="coverage/model_lab$app.coverage" NAME="app Coverage Results" MODIFIED="1764386712559" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/model_lab$app.coverage" NAME="app Coverage Results" MODIFIED="1764495685697" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
</component>
</project>

2
PCA_Test.py

@ -195,7 +195,7 @@ def get_model_by_ID(model_id, version="v-test"):
def get_model_by_id_and_version(model_id, version):
ms = MySQL(host=config._SQL_IP, user="root", pwd="powerSIS#123", database="alert")
resList = ms.ExecQuery(f"SELECT Model_info FROM model_version where id={model_id} and version='{version}'")
resList = ms.ExecQuery(f"SELECT Model_info FROM model_version where model_id={model_id} and version='{version}'")
return json.loads(resList[0][0])
def pca(model, Data_origin):

Loading…
Cancel
Save