openml / openml-python

OpenML's Python API for a World of Data and More 💫
http://openml.github.io/openml-python/
Other
279 stars 143 forks source link

Can't upload rmse,mae and other results to openml server #1197

Closed SharathKumarReddyAlijarla closed 1 year ago

SharathKumarReddyAlijarla commented 1 year ago

Description

Can't upload rmse,mae and other results to openml server

Steps/Code to Reproduce

` root = logging.getLogger() root.setLevel(logging.INFO)

args = parse_args()
if args.openml_apikey:
    openml.config.apikey = args.openml_apikey
if args.openml_server:
    openml.config.server = args.openml_server
else:
    openml.config.server = 'https://test.openml.org/api/v1/'
clf_pipeline=pipeline()
run = openml.runs.run_model_on_task(clf_pipeline, args.task_id)
score = []
evaluations = run.fold_evaluations['mean_absolute_error'][0]
for key in evaluations:
    score.append(evaluations[key])
mae=np.mean(score)
print(np.mean(score))
print(np.mean(run.get_metric_fn(sklearn.metrics.mean_squared_error)))
print(np.mean(run.get_metric_fn(sklearn.metrics.r2_score)))
logging.info('Task %d - %s; Accuracy: %0.2f' % (args.task_id, task.get_dataset().name, mae))

del_outputdir()
run.to_filesystem(directory= 'myrun')
print(args.upload_result)

if args.upload_result:
    run.publish()
    print(run)
    print('Results Uploaded to Openml and stored in local folder myrun')
else:
    print('Results stored in local folder myrun')`

Expected Results

want to upload mean absolute error value to openml runs. run is uploaded but this values are not uploaded when run.publish() is executed.I am only able to get results locally,

Actual Results

Versions

LennartPurucker commented 1 year ago

Solved in #1209