Skip to main content

A Geographical Knowledge Informed Code Evolver

Project description

GeoEvolve

GeoEvolve aims to accelerate geospatial model discovery by the power of large language models.

CLI Usage

pip install geoevolve

export OPENAI_API_KEY='your-openai-api-key'

python ./build_geo_knowledge_db.py --geo_knowledge_dir ./geo_knowledge --working_dir ../geoevolve_storage --chunk_size 500 --chunk_overlap 50 --topic_file ./topics.json --add_knowledge True --collect_knowledge True --is_compressed False --github_token your-github-token

python ./run_geoevolve.py --initial_program_path path-to-initial_program --evaluator_path path-to-evaluator --config_path path-to-config --total_rounds 15 --num_iterations_per_round 15 --is_compressed True --output path-to-output --log_name geoevolve

Library Usage

import os
from geoevolve import save_wiki_pages, save_arxiv_papers, save_github_codes, make_geo_know_db, run_geo_evolution

topics = {
    'giscience_theory': [
    'Absolute vs relative vs relational space',
    'Cognitive geography',
    'Representation of scale in GIS'
  ],
  'spatial_modeling': [
    'Agent-based models in geography',
    'Spatial interaction models',
    'Gravity model in geography',
    'Entropy maximization models',
    'Complexity theory in geography'
  ]
}

for category, queries in topics.items():
    if not os.path.exists(f'./geo_knowledge/{category}'):
        os.mkdir(f'./geo_knowledge/{category}')
    print(f'Category: {category}')
    for query in queries:
        save_wiki_pages(query, db_path='./geo_knowledge', category=category)
        save_arxiv_papers(query, max_results=3, db_path='./geo_knowledge', category=category)
        save_github_codes(query, max_repos=3, token='token', db_path='./geo_knowledge',
                                  category=category)
    
make_geo_know_db('./geo_knowledge', './geoevolve_storage')

run_geo_evolution(initial_program_file='your-initial-program-path',
                  evaluator_file='your-evaluator-file',
                  config_path='your-config-path',
                  rounds=15,
                  iterations_per_round=15,
                  output_path='your-output-path')

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

geoevolve-0.0.1.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

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

geoevolve-0.0.1-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: geoevolve-0.0.1.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.14

File hashes

Hashes for geoevolve-0.0.1.tar.gz
Algorithm Hash digest
SHA256 92ba917270850817bc36c141864773c2a9947a6b50ddeef5e28ef753b4b9b5ea
MD5 491ddae7f1e63a2127580a6c647d02e7
BLAKE2b-256 b2bc70aff6777b5c029e8f35599366395ea6373eb29e8d088f4d527190f77849

See more details on using hashes here.

File details

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

File metadata

  • Download URL: geoevolve-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.14

File hashes

Hashes for geoevolve-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bfe94c6b0955c7e46fab6d0a28838f81dd3c6cacedee761d9d05793af4656914
MD5 13215c8757474581989ce3a00096e12b
BLAKE2b-256 fd746a8d2075455c8f8aec3290d9179999e0ca4ac7d6e508dbe947bfa028b0c2

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