-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changed to use logger instead of print
- Loading branch information
Showing
3 changed files
with
153 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ papermill | |
aiohttp | ||
aiojobs | ||
aiohttp-swagger | ||
ipykernel | ||
ipykernel | ||
logging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
[loggers] | ||
keys=root,th2_common,aiopika | ||
|
||
[handlers] | ||
keys=consoleHandler,fileHandler,metricsHandler | ||
|
||
[formatters] | ||
keys=formatter | ||
|
||
[logger_root] | ||
level=INFO | ||
handlers=consoleHandler,fileHandler | ||
propagate=0 | ||
|
||
[logger_th2_common] | ||
level=INFO | ||
qualname=th2_common | ||
handlers=consoleHandler,fileHandler | ||
propagate=0 | ||
|
||
[logger_aiopika] | ||
level=WARNING | ||
qualname=aio_pika | ||
handlers=consoleHandler,fileHandler | ||
propagate=0 | ||
|
||
[handler_consoleHandler] | ||
class=StreamHandler | ||
formatter=formatter | ||
args=(sys.stdout,) | ||
|
||
[handler_fileHandler] | ||
class=FileHandler | ||
formatter=formatter | ||
args=('../all.log',) | ||
|
||
[formatter_formatter] | ||
format=%(asctime)s - %(name)s - %(levelname)s - %(message)sINFO:th2_common:asfg | ||
DEBUG:th2_common:notebooksDir=F:/ExactWork/th2-json-stream-provider-py/notebooks/ | ||
DEBUG:th2_common:resultsDir=F:/ExactWork/th2-json-stream-provider-py/results/ | ||
DEBUG:th2_common:logDir=F:/ExactWork/th2-json-stream-provider-py/logs/ | ||
DEBUG:asyncio:Using proactor: IocpProactor | ||
INFO:th2_common:notebooksDir=F:/ExactWork/th2-json-stream-provider-py/notebooks/ | ||
INFO:th2_common:resultsDir=F:/ExactWork/th2-json-stream-provider-py/results/ | ||
INFO:th2_common:logDir=F:/ExactWork/th2-json-stream-provider-py/logs/ | ||
INFO:th2_common:starting server | ||
DEBUG:asyncio:Using proactor: IocpProactor | ||
INFO:th2_common:notebooksDir=F:/ExactWork/th2-json-stream-provider-py/notebooks/ | ||
INFO:th2_common:resultsDir=F:/ExactWork/th2-json-stream-provider-py/results/ | ||
INFO:th2_common:logDir=F:/ExactWork/th2-json-stream-provider-py/logs/ | ||
INFO:th2_common:starting server | ||
DEBUG:asyncio:Using proactor: IocpProactor | ||
INFO:th2_common:/files?path=F:/ExactWork/th2-json-stream-provider-py/notebooks/test_files.ipynb | ||
INFO:papermill:Input Notebook: F:/ExactWork/th2-json-stream-provider-py/notebooks/test_files.ipynb | ||
INFO:aiohttp.access:127.0.0.1 [25/Jun/2024:15:03:30 +0400] "GET /files?path=F:/ExactWork/th2-json-stream-provider-py/notebooks/test_files.ipynb HTTP/1.1" 200 377 "http://localhost:9001/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36" | ||
INFO:th2_common:/execute?path=F:/ExactWork/th2-json-stream-provider-py/notebooks/test_files.ipynb | ||
INFO:aiohttp.access:127.0.0.1 [25/Jun/2024:15:03:46 +0400] "POST /execute?path=F:/ExactWork/th2-json-stream-provider-py/notebooks/test_files.ipynb HTTP/1.1" 200 295 "http://localhost:9001/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36" | ||
INFO:th2_common:launching notebook F:/ExactWork/th2-json-stream-provider-py/notebooks/test_files.ipynb with {'test': '20240531-21:50:15.08000000', 'output_path': 'F:/ExactWork/th2-json-stream-provider-py/results//test_files_2024-06-25T11-03-46-991535.jsonl'} | ||
INFO:papermill:Input Notebook: test_files.ipynb | ||
INFO:papermill:Output Notebook: F:/ExactWork/th2-json-stream-provider-py/logs//test_files_2024-06-25T11-03-46-991535.log.ipynb | ||
DEBUG:papermill.translators:Black is not installed, parameters won't be formatted | ||
DEBUG:asyncio:Using selector: SelectSelector | ||
DEBUG:traitlets:Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner | ||
DEBUG:traitlets:Starting kernel: ['C:\\Program Files\\Python310\\python.exe', '-m', 'ipykernel_launcher', '-f', 'C:\\Users\\molotgor\\AppData\\Local\\Temp\\tmppk0_9qto.json', '--HistoryManager.hist_file=:memory:'] | ||
DEBUG:traitlets:Connecting to: tcp://127.0.0.1:63424 | ||
DEBUG:traitlets:connecting iopub channel to tcp://127.0.0.1:63421 | ||
DEBUG:traitlets:Connecting to: tcp://127.0.0.1:63421 | ||
DEBUG:traitlets:connecting shell channel to tcp://127.0.0.1:63420 | ||
DEBUG:traitlets:Connecting to: tcp://127.0.0.1:63420 | ||
DEBUG:traitlets:connecting stdin channel to tcp://127.0.0.1:63422 | ||
DEBUG:traitlets:Connecting to: tcp://127.0.0.1:63422 | ||
DEBUG:traitlets:connecting heartbeat channel to tcp://127.0.0.1:63423 | ||
DEBUG:asyncio:Using selector: SelectSelector | ||
DEBUG:traitlets:connecting control channel to tcp://127.0.0.1:63424 | ||
DEBUG:traitlets:Connecting to: tcp://127.0.0.1:63424 | ||
INFO:papermill:Executing notebook with kernel: python3 | ||
DEBUG:papermill:Executing cell: | ||
output_path='test_file.jsonl' | ||
test = '' | ||
DEBUG:papermill:msg_type: status | ||
DEBUG:papermill:content: {'execution_state': 'busy'} | ||
DEBUG:papermill:msg_type: execute_input | ||
DEBUG:papermill:content: {'code': "output_path='test_file.jsonl'\ntest = ''", 'execution_count': 1} | ||
DEBUG:papermill:msg_type: status | ||
DEBUG:papermill:content: {'execution_state': 'idle'} | ||
DEBUG:papermill:Executing cell: | ||
# Parameters | ||
test = "20240531-21:50:15.08000000" | ||
output_path = "F:/ExactWork/th2-json-stream-provider-py/results//test_files_2024-06-25T11-03-46-991535.jsonl" | ||
|
||
DEBUG:papermill:msg_type: status | ||
DEBUG:papermill:content: {'execution_state': 'busy'} | ||
DEBUG:papermill:msg_type: execute_input | ||
DEBUG:papermill:content: {'code': '# Parameters\ntest = "20240531-21:50:15.08000000"\noutput_path = "F:/ExactWork/th2-json-stream-provider-py/results//test_files_2024-06-25T11-03-46-991535.jsonl"\n', 'execution_count': 2} | ||
DEBUG:papermill:msg_type: status | ||
DEBUG:papermill:content: {'execution_state': 'idle'} | ||
DEBUG:papermill:Executing cell: | ||
input_path='filetoinput.jsonl' | ||
DEBUG:papermill:msg_type: status | ||
DEBUG:papermill:content: {'execution_state': 'busy'} | ||
DEBUG:papermill:msg_type: execute_input | ||
DEBUG:papermill:content: {'code': "input_path='filetoinput.jsonl'", 'execution_count': 3} | ||
DEBUG:papermill:msg_type: status | ||
DEBUG:papermill:content: {'execution_state': 'idle'} | ||
DEBUG:papermill:Executing cell: | ||
import json | ||
import asyncio | ||
|
||
with open(output_path, "w") as out_file: | ||
with open(input_path, "r") as in_file: | ||
for i in range(6000): | ||
json.dump({'a':i}, out_file) | ||
out_file.write("\n") | ||
DEBUG:papermill:msg_type: status | ||
DEBUG:papermill:content: {'execution_state': 'busy'} | ||
DEBUG:papermill:msg_type: execute_input | ||
DEBUG:papermill:content: {'code': 'import json\nimport asyncio\n\nwith open(output_path, "w") as out_file:\n with open(input_path, "r") as in_file:\n for i in range(6000):\n json.dump({\'a\':i}, out_file)\n out_file.write("\\n")', 'execution_count': 4} | ||
DEBUG:papermill:msg_type: status | ||
DEBUG:papermill:content: {'execution_state': 'idle'} | ||
DEBUG:traitlets:Destroying zmq context for <jupyter_client.asynchronous.client.AsyncKernelClient object at 0x000001A043C1AB90> | ||
DEBUG:th2_common:successfully launched notebook test_files.ipynb | ||
INFO:th2_common:ended launch notebook test_files.ipynb with {'test': '20240531-21:50:15.08000000', 'output_path': 'F:/ExactWork/th2-json-stream-provider-py/results//test_files_2024-06-25T11-03-46-991535.jsonl'} | ||
INFO:th2_common:/result?id=9d716019-40f0-4faa-8216-aa6ecdffa277 | ||
INFO:aiohttp.access:127.0.0.1 [25/Jun/2024:15:03:52 +0400] "GET /result?id=9d716019-40f0-4faa-8216-aa6ecdffa277 HTTP/1.1" 200 89105 "http://localhost:9001/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36" |