Skip to content

Commit d2f1cab

Browse files
authored
Merge pull request #1211 from openml/no_pq_on_test
Don't serve parquet from test server as they point to production
2 parents dad10ae + ff1cb5d commit d2f1cab

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

openml_OS/models/api/v1/Api_data.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,10 @@ private function data($data_id) {
842842
if ($data_status != false) {
843843
$dataset->status = $data_status->status;
844844
}
845-
if ($dataset->format != 'Sparse_ARFF') {
845+
// The BASE_URL check prevents servering parquet urls from the test server,
846+
// which is needed as long as the test server does not have its own dedicated
847+
// MinIO with parquet files. TODO: Remove this after running MinIO on test
848+
if ($dataset->format != 'Sparse_ARFF' && BASE_URL != "https://test.openml.org/") {
846849
$bracket = sprintf('%04d', floor($data_id / 10000));
847850
$padded_id = sprintf('%04d', $data_id);
848851
$url = MINIO_URL . 'datasets/' . $bracket . '/' . $padded_id . '/dataset_' . $data_id . '.pq';

0 commit comments

Comments
 (0)