Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions openml_OS/models/api/v1/Api_run.php
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,14 @@ private function run_list($segs, $user_id) {
* ),
*)
*/

private function get_run_object_prefix(int $run_id): string {
// example bucket for id: 142379 'runs/0000/0000/0014/2379'
$s = str_pad((string)$run_id, 16, "0", STR_PAD_LEFT);
$groups = str_split($s, 4);
return implode('/', $groups) . "/";
}

private function run($run_id) {
if( $run_id == false ) {
$this->returnError( 235, $this->version );
Expand Down Expand Up @@ -511,6 +519,11 @@ private function run($run_id) {
$run->task_evaluation = "";
}


$url = MINIO_URL . 'runs/' . $this->get_run_object_prefix($run->rid);
$run->minio_url = $url;
$run->parquet_url = $url;

$this->xmlContents( 'run-get', $this->version, array( 'source' => $run ) );
}

Expand Down