logging
logging copied to clipboard
package import problem
The current import code:
from ..compliance_checker import mlp_compliance
If we don't install the package and execute the python scripts directly, there will be an import error.
I think we shoud import like this:
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), "../compliance_checker"))
import mlp_compliance
It should not be a problem, even if the package is not installed.
Just follow the instructions from the readme, for example, package checker: https://github.com/mlperf/logging/tree/master/mlperf_logging/package_checker#usage
If you run python3 -m mlperf_logging.package_checker
from the root of the logging repo, Python will find mlp_compliance
without modifying the sys.path
.