aimet
aimet copied to clipboard
hard-coded `WORKING_DIR` in `adaround_weight.py` and `quantsim.py`
There is a module-level variable named WORKING_DIR
in different Python modules. That variable is hard-coded to some path in /tmp
, e.g. WORKING_DIR = '/tmp/quantsim/'
(1, 2).
Hard-coding the temp directory can break some workflows where the temporary directory is located somewhere else. If you just use Python's tempfile
module, we could use common environment variables to configure the location.
Also you might want to consider if aimet_onnx.QuantizationSimModel.save_model_graph()
could just get a Path
instance and store the model there.
btw: this might be flagged as a security issue by infra when we deploy aimet (insecure tempfile creation).
@FelixSchwarz Thanks for your suggestions! We will pick this up soon but feel free to raise a PR. Thank you.