Git Product home page Git Product logo

aicrowd_api's Introduction

AIcrowd API

Build Status

Python client for server side API of the aicrowd.com webapp.

Installation

Deployment

pip install git+https://github.com/AIcrowd/aicrowd_api.git

Development

git clone https://github.com/AIcrowd/aicrowd_api
cd aicrowd_api
pip install -r requirements_dev.txt
pip install -e .

Usage

Instantiate API object

from aicrowd_api import API as AICROWD_API
auth_token="<YOUR AICROWD AUTH TOKEN>"
api = AICROWD_API(auth_token)

Authenticate participant

  • with API_KEY
api.authenticate_participant(EXAMPLE_API_KEY)
  • with username
api_key = api.authenticate_participant_with_username("spMohanty")

Get all Submissions

challenge_id = "test_challenge"
submissions = api.get_all_submissions(challenge_id)
print(submissions)

Create Submission

challenge_id = "test_challenge"
submission = api.create_submission(challenge_id)
print(submission)

# Output
# ========================================
# AIcrowdSubmission	:	5261
# 	challenge_id	:	test_challenge
# 	round_id	:	False
# 	score	:	False
# 	score_secondary	:	False
# 	grading_status	:	submitted
# 	message	:
# ========================================

Get submission

challenge_id = "test_challenge"
submission_id = 5262
submission = api.get_submission(challenge_id, submission_id)

Update submission

Assuming you have a submission object by using api.create_submission or api.get_submission. You can update the submission by :

# Update params
submission.grading_status = "graded"
submission.score = 0.98
submission.score_secondary = 0.98
submission.update()
print(submission)
# Output#
# ========================================
# AIcrowdSubmission	:	5262
# 	challenge_id	:	test_challenge
# 	round_id	:	False
# 	score	:	0.98
# 	score_secondary	:	0.98
# 	grading_status	:	graded
# 	message	:
# ========================================

Tests

# Setup the environment varriables
cp environ.sh.example environ.sh
# Then modify the respective environment variables
source environ.sh
pytests tests/

Author

S.P.Mohanty [email protected] Arjun Nemani [email protected]

aicrowd_api's People

Contributors

spmohanty avatar nemani avatar masterscrat avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.