You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we use gflags in flags.cpp . Gflags when used in a library is somewhat problematic since it requires that flags be loaded only once.
However with velox being used in python libraries (like torcharrow) and also for upcoming future libraries (like pyvelox) will need the ability to be loaded multiple times.
For example consider scenario below:
library A -> velox_memory -> flags.cpp .
library B -> velox_type -> flags.cpp
The flags defined in flags.cpp, no matter what the names we have in flags, A and B when loaded will crash due to gflags complaining.
so when you do following in python :
import A
import B // CRASH.
Due to this , I think its best we remove gflags as a dependency. Currently gflags is only used in Memory and Exception tracing. These uses can be refactored out and instead of providing command line options directly we can have an api init (const GlobalOptions&) and have clients take care of parsing them as useful for them. This would be a better approach to have in places where command line options will not be available (like say in python)..
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Currently we use gflags in flags.cpp . Gflags when used in a library is somewhat problematic since it requires that flags be loaded only once.
However with velox being used in python libraries (like torcharrow) and also for upcoming future libraries (like pyvelox) will need the ability to be loaded multiple times.
For example consider scenario below:
This crash happens due to code here in gflags.
Due to this , I think its best we remove gflags as a dependency. Currently gflags is only used in Memory and Exception tracing. These uses can be refactored out and instead of providing command line options directly we can have an api
init (const GlobalOptions&)
and have clients take care of parsing them as useful for them. This would be a better approach to have in places where command line options will not be available (like say in python)..Beta Was this translation helpful? Give feedback.
All reactions