You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/04/28 08:08:31 UTC
[GitHub] [tvm] zxybazh opened a new pull request, #11157: [MetaSchedule] Logging Interface Unification
zxybazh opened a new pull request, #11157:
URL: https://github.com/apache/tvm/pull/11157
This PR introduces a new interface to unify meta schedule logging from both c++ and python side. It will be easier to control logging level and format content. From now on, only task scheduler level will be printed to screen by default, and task level information will be logged to a file in given folder. We still support any logging configuration from outside, and use `tvm.meta_schedule` as the main logger.
Recomended setup of logger is as follows:
```
logging.basicConfig(
format="%(asctime)s.%(msecs)03d %(levelname)s %(message)s", datefmt="%Y-%m-%d %H:%M:%S"
)
logging.getLogger("tvm.meta_schedule").setLevel(logging.INFO)
```
And further configuration of child loggers can be set in the `TuneConfig` for features like whether to stream to screen, whether to propagate to main logger, patterns, etc, by passing a Dict to `TuneConfig` as follows:
```
TuneConfig(
...,
logger_config = {
"task_stream": False,
"propagate": False,
"task_level": logging.INFO,
"formatter": ...
}
)
```
Default setting is to output to files in `log_dir` folder and the logging structure looks like the following directory:
```
tvm.meta_schedule.task_00_fused_nn_conv2d_add.log
tvm.meta_schedule.task_01_fused_nn_conv2d_add_1.log
tvm.meta_schedule.task_02_fused_nn_conv2d_add_2.log
tvm.meta_schedule.task_03_fused_layout_transform.log
tvm.meta_schedule.task_04_fused_nn_conv2d_add_nn_relu.log
tvm.meta_schedule.task_05_fused_nn_max_pool2d.log
tvm.meta_schedule.task_06_fused_nn_conv2d_add_nn_relu_1.log
tvm.meta_schedule.task_07_fused_nn_conv2d_add_add_nn_relu.log
tvm.meta_schedule.task_08_fused_nn_conv2d_add_nn_relu_2.log
tvm.meta_schedule.task_09_fused_nn_contrib_conv2d_winograd_without_weight_transform_add_nn_relu.log
tvm.meta_schedule.task_10_fused_nn_contrib_conv2d_winograd_without_weight_transform_add_add_nn_relu.log
tvm.meta_schedule.task_11_fused_nn_conv2d_add_nn_relu_3.log
tvm.meta_schedule.task_12_fused_nn_contrib_conv2d_winograd_without_weight_transform_add_nn_relu_1.log
tvm.meta_schedule.task_13_fused_nn_contrib_conv2d_winograd_without_weight_transform_add_add_nn_relu_1.log
tvm.meta_schedule.task_14_fused_nn_conv2d_add_nn_relu_4.log
tvm.meta_schedule.task_15_fused_nn_conv2d_add_nn_relu_5.log
tvm.meta_schedule.task_16_fused_nn_conv2d_add_add_nn_relu_1.log
tvm.meta_schedule.task_17_fused_nn_adaptive_avg_pool2d.log
tvm.meta_schedule.task_18_fused_layout_transform_reshape_squeeze.log
tvm.meta_schedule.task_19_fused_nn_dense_add.log
tvm.meta_schedule.task_scheduler.log
```
Suggestions are welcome!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] junrushao1994 commented on a diff in pull request #11157: [MetaSchedule] Logging Interface Unification
Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on code in PR #11157:
URL: https://github.com/apache/tvm/pull/11157#discussion_r861408352
##########
python/tvm/meta_schedule/tune.py:
##########
@@ -17,7 +17,8 @@
"""User-facing Tuning API"""
# pylint: disable=import-outside-toplevel
import logging
-import os.path
+from pathlib import Path
Review Comment:
Pathlib is definitely a good library, but perhaps it's less plausible if we mix `os.path` and `Pathlib`. In our particular case, shall we just do:
```python
os.makedirs(path, exist_ok=False)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] junrushao1994 commented on a diff in pull request #11157: [MetaSchedule] Logging Interface Unification
Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on code in PR #11157:
URL: https://github.com/apache/tvm/pull/11157#discussion_r861221239
##########
python/tvm/meta_schedule/runner/local_runner.py:
##########
@@ -33,7 +33,8 @@
run_evaluator_common,
)
-logger = logging.getLogger(__name__) # pylint: disable=invalid-name
+
+logger = logging.getLogger("tvm.meta_schedule") # pylint: disable=invalid-name
Review Comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] zxybazh commented on pull request #11157: [MetaSchedule] Logging Interface Unification
Posted by GitBox <gi...@apache.org>.
zxybazh commented on PR #11157:
URL: https://github.com/apache/tvm/pull/11157#issuecomment-1112775466
Thanks for the careful review, I've fixed all the logger usage and made sure it follows the current recommended practice. Ready for review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] junrushao1994 commented on a diff in pull request #11157: [MetaSchedule] Logging Interface Unification
Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on code in PR #11157:
URL: https://github.com/apache/tvm/pull/11157#discussion_r861416997
##########
python/tvm/meta_schedule/tune.py:
##########
@@ -493,6 +544,11 @@ def tune_extracted_tasks(
postprocs=Parse._postproc(postprocs, task.target),
mutator_probs=Parse._mutator_probs(mutator_probs, task.target),
task_name=task.task_name,
+ logger=Parse._logger(
+ name="tvm.meta_schedule."
Review Comment:
```suggestion
name=__name__ + "."
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] junrushao1994 commented on a diff in pull request #11157: [MetaSchedule] Logging Interface Unification
Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on code in PR #11157:
URL: https://github.com/apache/tvm/pull/11157#discussion_r861222208
##########
python/tvm/meta_schedule/task_scheduler/gradient_based.py:
##########
@@ -15,9 +15,11 @@
# specific language governing permissions and limitations
# under the License.
"""Gradient Based Task Scheduler"""
+import logging
from typing import TYPE_CHECKING, List, Optional
from tvm._ffi import register_object
+from tvm.meta_schedule.utils import make_logging_func
Review Comment:
use relative import:
```suggestion
from ..utils import import make_logging_func
```
##########
python/tvm/meta_schedule/task_scheduler/round_robin.py:
##########
@@ -16,10 +16,12 @@
# under the License.
"""Round Robin Task Scheduler"""
+import logging
from typing import TYPE_CHECKING, List, Optional
from tvm._ffi import register_object
from tvm.meta_schedule.measure_callback.measure_callback import MeasureCallback
+from tvm.meta_schedule.utils import make_logging_func
Review Comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] junrushao1994 commented on a diff in pull request #11157: [MetaSchedule] Logging Interface Unification
Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on code in PR #11157:
URL: https://github.com/apache/tvm/pull/11157#discussion_r861220269
##########
python/tvm/meta_schedule/apply_history_best.py:
##########
@@ -25,6 +26,8 @@
from . import _ffi_api
from .database import Database
+logger = logging.getLogger("tvm.meta_schedule") # pylint: disable=invalid-name
Review Comment:
```suggestion
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] junrushao1994 commented on a diff in pull request #11157: [MetaSchedule] Logging Interface Unification
Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on code in PR #11157:
URL: https://github.com/apache/tvm/pull/11157#discussion_r862216341
##########
src/meta_schedule/utils.h:
##########
@@ -355,6 +403,8 @@ struct ThreadedTraceApply {
int n_;
/*! \brief The pointer to the list of postprocessor items. */
Item* items_;
+ /*! \brief The logging function to use. */
+ PackedFunc logging_func;
Review Comment:
We don't need this field in this class :-)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] junrushao1994 commented on pull request #11157: [MetaSchedule] Logging Interface Unification
Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on PR #11157:
URL: https://github.com/apache/tvm/pull/11157#issuecomment-1115742696
Any updates?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] zxybazh merged pull request #11157: [MetaSchedule] Logging Interface Unification
Posted by GitBox <gi...@apache.org>.
zxybazh merged PR #11157:
URL: https://github.com/apache/tvm/pull/11157
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] junrushao1994 commented on a diff in pull request #11157: [MetaSchedule] Logging Interface Unification
Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on code in PR #11157:
URL: https://github.com/apache/tvm/pull/11157#discussion_r861223425
##########
python/tvm/meta_schedule/testing/relay_workload.py:
##########
@@ -54,6 +54,8 @@ def _get_network(
"resnet3d_18",
"vgg_16",
]:
+ # pylint: disable=import-outside-toplevel
Review Comment:
no need to tweak this
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] junrushao1994 commented on a diff in pull request #11157: [MetaSchedule] Logging Interface Unification
Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on code in PR #11157:
URL: https://github.com/apache/tvm/pull/11157#discussion_r861402599
##########
python/tvm/meta_schedule/task_scheduler/task_scheduler.py:
##########
@@ -16,9 +16,11 @@
# under the License.
"""Auto-tuning Task Scheduler"""
+import logging
from typing import Callable, List, Optional
from tvm._ffi import register_object
+from tvm.meta_schedule.utils import make_logging_func
Review Comment:
use relative import inside a subpackage
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] junrushao1994 commented on a diff in pull request #11157: [MetaSchedule] Logging Interface Unification
Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on code in PR #11157:
URL: https://github.com/apache/tvm/pull/11157#discussion_r862214712
##########
src/meta_schedule/schedule_rule/cross_thread_reduction.cc:
##########
@@ -32,12 +32,14 @@ class CrossThreadReductionNode : public ScheduleRuleNode {
Optional<Integer> opt_warp_size = target->GetAttr<Integer>("thread_warp_size");
if (!opt_max_threads_per_block.defined()) {
- LOG(WARNING) << "Target does not have attribute \"max_threads_per_block\", therefore the "
- "rule CrossThreadReduction will not be applied";
+ TVM_PY_LOG(WARNING, context->logging_func)
Review Comment:
I was thinking if it's better to make it a LOG(FATAL) instead, but it's do that in a separate PR
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] junrushao1994 commented on a diff in pull request #11157: [MetaSchedule] Logging Interface Unification
Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on code in PR #11157:
URL: https://github.com/apache/tvm/pull/11157#discussion_r861403407
##########
python/tvm/meta_schedule/utils.py:
##########
@@ -368,3 +372,30 @@ def autotvm_silencer():
yield
finally:
autotvm.GLOBAL_SCOPE.silent = silent
+
+
+def make_logging_func(logger: logging.Logger):
Review Comment:
```suggestion
def make_logging_func(logger: logging.Logger) -> Optional[Callable]:
```
##########
python/tvm/meta_schedule/utils.py:
##########
@@ -368,3 +372,30 @@ def autotvm_silencer():
yield
finally:
autotvm.GLOBAL_SCOPE.silent = silent
+
+
+def make_logging_func(logger: logging.Logger):
+ """Get the logging function.
+ Parameters
+ ----------
+ logger : logging.Logger
+ The logger instance.
+ Returns
+ -------
+ result : Callable
Review Comment:
```suggestion
result : Optional[Callable]
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] junrushao1994 commented on a diff in pull request #11157: [MetaSchedule] Logging Interface Unification
Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on code in PR #11157:
URL: https://github.com/apache/tvm/pull/11157#discussion_r861222820
##########
python/tvm/meta_schedule/task_scheduler/gradient_based.py:
##########
@@ -87,6 +92,7 @@ def __init__(
max_trials,
cost_model,
measure_callbacks,
+ make_logging_func(logger),
Review Comment:
to be clear, the logger on this file should be configured as
```
logger = logging.getLogger(__name__)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] zxybazh commented on a diff in pull request #11157: [MetaSchedule] Logging Interface Unification
Posted by GitBox <gi...@apache.org>.
zxybazh commented on code in PR #11157:
URL: https://github.com/apache/tvm/pull/11157#discussion_r862047345
##########
python/tvm/meta_schedule/tune.py:
##########
@@ -17,7 +17,8 @@
"""User-facing Tuning API"""
# pylint: disable=import-outside-toplevel
import logging
-import os.path
+from pathlib import Path
Review Comment:
I think it might be acceptable to use `exist_ok = True` in this case cause the logs folder could be reused.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] junrushao1994 commented on a diff in pull request #11157: [MetaSchedule] Logging Interface Unification
Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on code in PR #11157:
URL: https://github.com/apache/tvm/pull/11157#discussion_r861219983
##########
include/tvm/meta_schedule/task_scheduler.h:
##########
@@ -96,6 +98,7 @@ class TaskSchedulerNode : public runtime::Object {
v->Visit("cost_model", &cost_model);
v->Visit("measure_callbacks", &measure_callbacks);
v->Visit("num_trials_already", &num_trials_already);
+ // v->Visit("logging_func", &logging_func);
Review Comment:
explicitly say it's skipped
```suggestion
// `logging_func` is not visited
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] junrushao1994 commented on a diff in pull request #11157: [MetaSchedule] Logging Interface Unification
Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on code in PR #11157:
URL: https://github.com/apache/tvm/pull/11157#discussion_r861221698
##########
python/tvm/meta_schedule/runner/rpc_runner.py:
##########
@@ -39,8 +39,8 @@
run_evaluator_common,
)
-logger = logging.getLogger(__name__) # pylint: disable=invalid-name
+logger = logging.getLogger("tvm.meta_schedule") # pylint: disable=invalid-name
Review Comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] zxybazh commented on pull request #11157: [MetaSchedule] Logging Interface Unification
Posted by GitBox <gi...@apache.org>.
zxybazh commented on PR #11157:
URL: https://github.com/apache/tvm/pull/11157#issuecomment-1116969286
Thanks @junrushao1994 @Hzfengsy for reviewing!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] junrushao1994 commented on a diff in pull request #11157: [MetaSchedule] Logging Interface Unification
Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on code in PR #11157:
URL: https://github.com/apache/tvm/pull/11157#discussion_r861402889
##########
src/meta_schedule/utils.h:
##########
@@ -53,7 +53,49 @@
#include "../tir/schedule/primitive.h"
#include "../tir/schedule/utils.h"
+#define TVM_PY_LOG(logging_level, logging_func) \
+ PyLogMessage(__FILE__, __LINE__, logging_func, PyLogMessage::Level::logging_level).stream()
namespace tvm {
+
+/*!
+ * \brief Class to accumulate an log message on the python side. Do not use directly, instead use
+ * TVM_PY_LOG(INFO), TVM_PY_LOG(WARNING), TVM_PY_ERROR(INFO).
+ */
+class PyLogMessage {
Review Comment:
Move this class into tvm::meta_schedule
##########
src/meta_schedule/utils.h:
##########
@@ -53,7 +53,49 @@
#include "../tir/schedule/primitive.h"
#include "../tir/schedule/utils.h"
+#define TVM_PY_LOG(logging_level, logging_func) \
+ PyLogMessage(__FILE__, __LINE__, logging_func, PyLogMessage::Level::logging_level).stream()
Review Comment:
```suggestion
::tvm::meta_schedule::PyLogMessage(__FILE__, __LINE__, logging_func, PyLogMessage::Level::logging_level).stream()
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] junrushao1994 commented on a diff in pull request #11157: [MetaSchedule] Logging Interface Unification
Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on code in PR #11157:
URL: https://github.com/apache/tvm/pull/11157#discussion_r861221016
##########
python/tvm/meta_schedule/builder/local_builder.py:
##########
@@ -26,10 +26,14 @@
from tvm.target import Target
from ...contrib.popen_pool import MapResult, PopenPoolExecutor, StatusKind
-from ..utils import cpu_count, derived_object, get_global_func_with_default_on_worker
+from ..utils import (
+ cpu_count,
+ derived_object,
+ get_global_func_with_default_on_worker,
+)
from .builder import BuilderInput, BuilderResult, PyBuilder
-logger = logging.getLogger(__name__) # pylint: disable=invalid-name
+logger = logging.getLogger("tvm.meta_schedule") # pylint: disable=invalid-name
Review Comment:
revert this change. see: https://discuss.tvm.apache.org/t/rfc-generic-logger-names-in-python/12611
##########
python/tvm/meta_schedule/cost_model/xgb_model.py:
##########
@@ -41,7 +41,7 @@
from ..tune_context import TuneContext
-logger = logging.getLogger(__name__) # pylint: disable=invalid-name
+logger = logging.getLogger("tvm.meta_schedule") # pylint: disable=invalid-name
Review Comment:
revert this
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] junrushao1994 commented on a diff in pull request #11157: [MetaSchedule] Logging Interface Unification
Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on code in PR #11157:
URL: https://github.com/apache/tvm/pull/11157#discussion_r861220561
##########
python/tvm/meta_schedule/apply_history_best.py:
##########
@@ -34,15 +37,17 @@ class ApplyHistoryBest(Object):
----------
database : Database
The database to be queried from
+ logger : logging.Logger
+ The logger to be used
"""
database: Database
+ logger: logging.Logger
Review Comment:
remove this given it's not used
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] junrushao1994 commented on pull request #11157: [MetaSchedule] Logging Interface Unification
Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on PR #11157:
URL: https://github.com/apache/tvm/pull/11157#issuecomment-1112555561
Thanks for massively enhancing the current logging system!
However, on the implementation, we do need to follow the standard best practice in python, namely, using:
```python
logger = logging.getLogger(__name__)
```
to get a logger for this file.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] junrushao1994 commented on a diff in pull request #11157: [MetaSchedule] Logging Interface Unification
Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on code in PR #11157:
URL: https://github.com/apache/tvm/pull/11157#discussion_r862210076
##########
python/tvm/meta_schedule/testing/tune_relay_meta_schedule.py:
##########
@@ -90,8 +90,10 @@ def _parse_args():
return parsed
-logging.basicConfig()
-logging.getLogger("tvm.meta_schedule").setLevel(logging.DEBUG)
+logging.basicConfig(
+ format="%(asctime)s.%(msecs)03d %(levelname)s %(message)s", datefmt="%Y-%m-%d %H:%M:%S"
+)
+logging.getLogger("tvm.meta_schedule").setLevel(logging.INFO)
Review Comment:
Shall we also use this in `tune_te_meta_schedule.py`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org