Skip to main content

(Unofficial) SDK for Flock.io

Project description

flocky

flocky makes participating in Flock.io easy!

NOTE: This project is not officially affiliated with Flock.io. This package is maintained by a participant of the Flock.io community. While I strive for correctness, I cannot guarantee that this package is bug-free. Always verify your own implementation, especially when using flocky in production.

Installation

pip install flocky

Quickstart

Get specific task

Data can be retrieved as JSON or a Pandas DataFrame.

from flocky.api import get_task

get_task(7, as_df=False)
{'title': 'FLock x OneKey: Advancing AI-Driven Smart Contract Security',
 'description': 'FLock and OneKey are collaborating to launch the first AI-driven smart contract security challenge, combining FLock’s decentralized model training with OneKey’s expertise in blockchain security. By training AI on real-world vulnerabilities and security Q&A data, we aim to build a benchmark dataset and develop models capable of detecting and mitigating risks at scale. Top contributors will be rewarded with OneKey Hardware Wallet - FLock Limited Edition',
 'task_type': 'training',
 'data': {'training_set_url': 'https://fed-ledger-prod-dataset.s3.amazonaws.com/7/training_set.jsonl?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIASSFQ745NLT5K57N2%2F20250401%2Fus-east-2%2Fs3%2Faws4_request&X-Amz-Date=20250401T153446Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=fc9d7016681513e23a87fe9c30e5e7139ee53b76e3a8ef78a3cd02248d75494c',
  'max_params': 15000000000,
  'context_length': 8192},
 'duration_in_seconds': 2419200,
 'id': 7,
 'status': 'submission_phase',
 'initialized_at': '2025-03-26T16:22:01.791348',
 'submission_phase_ends_at': '2025-04-23T23:59:59.791348',
 'final_validation_ends_at': '2025-04-28T23:59:59.791348',
 'final_link': None}
get_task(7, as_df=True)
<style scoped> .dataframe tbody tr th:only-of-type { vertical-align: middle; } .dataframe tbody tr th { vertical-align: top; } .dataframe thead th { text-align: right; } </style>
title description task_type duration_in_seconds id status initialized_at submission_phase_ends_at final_validation_ends_at final_link data_training_set_url data_max_params data_context_length
0 FLock x OneKey: Advancing AI-Driven Smart Cont... FLock and OneKey are collaborating to launch t... training 2419200 7 submission_phase 2025-03-26T16:22:01.791348 2025-04-23T23:59:59.791348 2025-04-28T23:59:59.791348 None https://fed-ledger-prod-dataset.s3.amazonaws.c... 15000000000 8192

Get open tasks

from flocky.api import open_tasks

tasks = open_tasks(as_df=True)
tasks
<style scoped> .dataframe tbody tr th:only-of-type { vertical-align: middle; } .dataframe tbody tr th { vertical-align: top; } .dataframe thead th { text-align: right; } </style>
title description task_type duration_in_seconds id status initialized_at submission_phase_ends_at final_validation_ends_at data_recommended_vram data_dataset_s3_key data_max_params data_context_length data_training_set_key data_validation_set_key data_final_validation_set_key
0 FLock x OneKey: Advancing AI-Driven Smart Cont... FLock and OneKey are collaborating to launch t... training 2419200 7 submission_phase 2025-03-26T16:22:01.791348 2025-04-23T23:59:59.791348 2025-04-28T23:59:59.791348 48GB onekey-security/combined.jsonl 15000000000 8192 7/training_set.jsonl 7/validation_set.jsonl 7/final_validation_set.jsonl

Get submission scores

from flocky.api import get_subs

scores = get_subs(7, as_df=True)
scores
<style scoped> .dataframe tbody tr th:only-of-type { vertical-align: middle; } .dataframe tbody tr th { vertical-align: top; } .dataframe thead th { text-align: right; } </style>
link submission_phase_score final_validation_score submitted_at
0 https://huggingface.co/clepelaars/task-7-Qwen-... None None 2025-03-28T12:45:21.402671

Upload to HuggingFace

This function will upload the contents of the outputs directory to the HuggingFace Hub with a given repo name. This require you to have set HF_TOKEN in your environment variables.

from flocky.api import upload_to_hf
# upload_to_hf("clepelaars/flocky-test", output_dir="outputs")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flocky-0.0.1.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flocky-0.0.1-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file flocky-0.0.1.tar.gz.

File metadata

  • Download URL: flocky-0.0.1.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for flocky-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c8061f7a1c73eac4e01d279edc07a639280d989c9ed5995f122e66bcee64d3de
MD5 dc83bc7d014534a1166c15086e79e33d
BLAKE2b-256 a1ffd7f3c254c3c809f804ee8ca00f62d5c9a0f72dafc98d4d66faf296b739a6

See more details on using hashes here.

File details

Details for the file flocky-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: flocky-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for flocky-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 83b79bc1575be90048b09b3b24ff7c00fa4f275c4be206e5dd2a61ab4f46b7a2
MD5 530c7a2c09e485f7d14e5cc478cc90db
BLAKE2b-256 b304cc81eae2e1c5d933d9adeb03f91a8994d68f221ed8039c7eb463fbf4a668

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page