-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arrow writers refactor #153
Changes from 7 commits
2629784
f624bac
a403517
2229405
bca342e
5526415
04b6952
df0ea11
a018d6a
50f1c7d
d9488eb
dc5530f
228c746
9e8d9bc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,25 +58,30 @@ int main (int argc, char** argv) | |
// Current time stamp #1 | ||
auto startTS = getTimeStr(); | ||
VERBOSLVL1(std::cout << "\n>>> STARTING >>> " << startTS << "\n";) | ||
|
||
|
||
bool use_arrow = false; | ||
|
||
#ifdef USE_ARROW | ||
use_arrow = theEnvironment.arrow_output_type == "ARROW" || theEnvironment.arrow_output_type == "PARQUET"; | ||
#endif | ||
|
||
// Process the image data | ||
int min_online_roi_size = 0; | ||
|
||
SaveOption saveOption = [](){ | ||
if (theEnvironment.use_apache_writers) { | ||
if (Nyxus::toupper(theEnvironment.arrow_output_type) == "ARROW") { | ||
return SaveOption::saveArrowIPC; | ||
} else { | ||
return SaveOption::saveParquet; | ||
} | ||
} | ||
else if (theEnvironment.useCsv) {return SaveOption::saveCSV;} | ||
else {return SaveOption::saveBuffer;} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in CLI mode, I don't this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, both "ARROW" and "ARROWIPC" should set saveOption to saveArrowIPC. Or may be get rid of "ARROW" option all together and be more precise. |
||
}(); | ||
|
||
errorCode = processDataset ( | ||
intensFiles, | ||
labelFiles, | ||
theEnvironment.n_loader_threads, | ||
theEnvironment.n_pixel_scan_threads, | ||
theEnvironment.n_reduce_threads, | ||
min_online_roi_size, | ||
use_arrow, | ||
theEnvironment.useCsv, | ||
saveOption, | ||
theEnvironment.output_dir); | ||
|
||
// Report feature extraction error, if any | ||
|
@@ -93,6 +98,8 @@ int main (int argc, char** argv) | |
case 3: // Memory error | ||
std::cout << std::endl << "Memory error" << std::endl; | ||
break; | ||
case 4: | ||
std::cout << std::endl << "Apache Arrow functionality is not available. Please install Nyxus with Arrow enabled to use this functionality." << std::endl; | ||
default: // Any other error | ||
std::cout << std::endl << "Error #" << errorCode << std::endl; | ||
break; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why we need this here.