Poweshell syntax error for calling module with file path

I am quite new to python, but I would still like to try and run a tensorflow model. I was stucked at the inference part, the instruction given seems like not supporting the powershell syntax interpretation.

# run from `models/`
python3 -m official.projects.unified_detector.run_inference \
--gin_file=official/projects/unified_detector/configs/gin_files/unified_detector_model.gin \
--ckpt_path=<path-of-the-ckpt> \
--img_file=<some-image> \
--output_path=<some-directory>/demo.jsonl \
--vis_dir=<some-directory>

But I am getting the error below:

at Line:2 Characters:3

--gin_file=official/projects/unified_detector/configs/gin_files/unifi ...
~
'--' The operator is missing after the unary operator.
at Line:2 Characters:3
--gin_file=official/projects/unified_detector/configs/gin_files/unifi ...
Unexpected 'gin_file=official/projects/unified_detector/configs/gin_files/unified_detector_model.gin' vocabulary primitive in operation or statement.

I tried to open up the run.inference.py to change the related directory, but I am getting the error below:

from official.projects.unified_detector import external_configurables # pylint: disable=unused-import
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'official'

I had tried to change the newline to backtick as follow:

# run from `models/`
python3 -m official.projects.unified_detector.run_inference `
--gin_file=official/projects/unified_detector/configs/gin_files/unified_detector_model.gin `
--ckpt_path=<path-of-the-ckpt> `
--img_file=<some-image> `
--output_path=<some-directory>/demo.jsonl `
--vis_dir=<some-directory>

with the path in the format of 'C:\Users\xx\Desktop\xx\ckpt' and C:\Users\xx\Desktop\xx\ckpt as well as forward slash variant.

I am expecting to get a powershell syntax for me to run the module with external file path input, either single line or multiple line command is ok, as long as it works.

Any help is much appreciated !!

I’m not sure, and probably this will require a lot of “fixes”, but maybe it’s time to try using relative imports?