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")

Contributing to Flocky

If you would like to contribute to Flocky, first of all thank you for considering this! To get started feel free to create a Github issue so we can discuss the contribution.

Please read the contribution guidelines before submitting pull requests (PRs).

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.2.tar.gz (12.7 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.2-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: flocky-0.0.2.tar.gz
  • Upload date:
  • Size: 12.7 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.2.tar.gz
Algorithm Hash digest
SHA256 a603aa27dc4ce8ca117e7b25e0acb6cd088d0c4d19f9dc200762e9b3e9d86767
MD5 bfe6cb76e08f261794cb3b158a5b7d2d
BLAKE2b-256 3aa168b5f57e94f38ca44b74ecf01e966963fcdc62636bea374505915da85d34

See more details on using hashes here.

File details

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

File metadata

  • Download URL: flocky-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 11.0 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 235ad97b74439ef4da5f57322c72b044fdb050e74b3f39a84507602535846f42
MD5 90c0154807b8a87a7f6807a0e78b04b5
BLAKE2b-256 f9721e12d697235a9322409c1337ce93f627f83d0d4a3edef10924e9e38e86df

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