I am following a documentation and executing some commands in Windows 10 command prompt:
export OPENAI_LOG_FORMAT='stdout,log,csv,tensorboard'
export OPENAI_LOGDIR=path/to/tensorboard/data
tensorboard --logdir=$OPENAI_LOGDIR
I have figured that export
is a Unix command and the equivalent in Windows is setx
. I have executed the first two commands and when I tried the third command, $OPENAI_LOGDIR
is not properly detected. Can someone help with the equivalent of these in Windows?
Best Answer
setx
is not the counterpart of Linuxexport
in Windows.export
just makes the variable available temporarily to the current shell and its children processes whereassetx
stores the variable permanently to every user or system process in the future.You didn't show all the real commands you used so based on the comments I guess you ran these
which is absolutely wrong
First
setx
is supposed to be run only once, thus if you want to set the environment for the current session then you must useset
instead ofsetx
. If you do want to set the variable permanently then you'll still need to restart the shell so the changes apply, and never run the command againBesides single quote isn't a quoting character in cmd so you'll need to remove
''
and usestdout,log,csv,tensorboard
, or"stdout,log,csv,tensorboard"
if your program does quote removal by itselfAnd lastly, variables in cmd are accessed with
%%
instead of$
like bash, hence you must change the last line totensorboard --logdir=%OPENAI_LOGDIR%
This is still a guess until you provide enough information in the question