1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Python] numerapi python crypto signals submission

Discussão em 'Python' iniciado por Stack, Outubro 1, 2024 às 13:12.

  1. Stack

    Stack Membro Participativo

    looking for a way to automate submission for Numerai crypto signals tournament. For some reason, this code (from their documentation) does not work (invalid model error, checked model id). So, if you have a working example of submitting prediction with python, or with their CLI, could you please share it?

    Tried this:

    import pandas as pd
    from numerapi import SignalsAPI
    import sys

    # Check command line arguments for model ID and predictions file path
    if len(sys.argv) != 2:
    print("Usage: python submit_signals.py <predictions_file_path>")
    sys.exit(1)

    predictions_file_path = sys.argv[1]

    # Initialize the SignalsAPI with your API key
    api = SignalsAPI("key1", "key2")

    try:

    model_id = uuid

    # Upload predictions from the specified file
    api.upload_predictions(predictions_file_path, model_id=model_id)

    print(f"Predictions uploaded successfully for model ID: {model_id}")

    except Exception as e:
    # Print detailed error message and traceback
    print(f"An error occurred while uploading predictions: {e}")
    traceback.print_exc()

    Continue reading...

Compartilhe esta Página