Full Code of AI4Finance-Foundation/FinGPT for AI

master a91a408d817f cached
376 files
10.8 MB
2.8M tokens
1264 symbols
1 requests
Copy disabled (too large) Download .txt
Showing preview only (11,386K chars total). Download the full file to get everything.
Repository: AI4Finance-Foundation/FinGPT
Branch: master
Commit: a91a408d817f
Files: 376
Total size: 10.8 MB

Directory structure:
gitextract_nwpardo3/

├── .github/
│   ├── FUNDING.yml
│   └── ISSUE_TEMPLATE/
│       └── feature_request.md
├── .gitignore
├── .gitpod.yml
├── .idea/
│   └── .gitignore
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── FinGPT_ Training with LoRA and Meta-Llama-3-8B.ipynb
├── FinGPT_Inference_Llama2_13B_falcon_7B_for_Beginners.ipynb
├── FinGPT_Training_LoRA_with_ChatGLM2_6B_for_Beginners.ipynb
├── FinGPT_Training_LoRA_with_ChatGLM2_6B_for_Beginners_v2-2.ipynb
├── LICENSE
├── MANIFEST.in
├── README.md
├── Use_Cases.md
├── figs/
│   └── README.md
├── fingpt/
│   ├── FinGPT_Benchmark/
│   │   ├── __init__.py
│   │   ├── benchmarks/
│   │   │   ├── __init__.py
│   │   │   ├── benchmarks.py
│   │   │   ├── convfinqa.py
│   │   │   ├── evaluate.sh
│   │   │   ├── fineval.py
│   │   │   ├── finred.py
│   │   │   ├── fiqa.py
│   │   │   ├── fpb.py
│   │   │   ├── headline.py
│   │   │   ├── ner.py
│   │   │   ├── nwgi.py
│   │   │   ├── sentiment_templates.txt
│   │   │   └── tfns.py
│   │   ├── config.json
│   │   ├── config_hf.json
│   │   ├── config_new.json
│   │   ├── data/
│   │   │   ├── __init__.py
│   │   │   ├── download.py
│   │   │   └── prepare_data.ipynb
│   │   ├── demo.ipynb
│   │   ├── readme.md
│   │   ├── train.sh
│   │   ├── train_lora.py
│   │   └── utils.py
│   ├── FinGPT_FinancialReportAnalysis/
│   │   ├── README.md
│   │   ├── reportanalysis.ipynb
│   │   └── utils/
│   │       ├── __init__.py
│   │       ├── earning_calls.py
│   │       ├── format_pdf.py
│   │       └── rag.py
│   ├── FinGPT_Forecaster/
│   │   ├── AAAI-Good-Data/
│   │   │   ├── README.md
│   │   │   ├── Testing.ipynb
│   │   │   ├── Training.ipynb
│   │   │   ├── config.json
│   │   │   ├── train.sh
│   │   │   ├── train_lora.py
│   │   │   ├── utils.py
│   │   │   └── yes.gitkeep
│   │   ├── FinGPT-Forecaster-Chinese/
│   │   │   ├── Ashare_data.py
│   │   │   ├── Formulate_training_data.ipynb
│   │   │   ├── Inference_datapipe.py
│   │   │   ├── requirement.txt
│   │   │   ├── train_lora.py
│   │   │   └── utils.py
│   │   ├── README.md
│   │   ├── app.py
│   │   ├── config.json
│   │   ├── data.py
│   │   ├── data_infererence_fetch.py
│   │   ├── data_pipeline.py
│   │   ├── demo.ipynb
│   │   ├── indices.py
│   │   ├── prepare_data.ipynb
│   │   ├── prompt.py
│   │   ├── requirements.txt
│   │   ├── train.sh
│   │   ├── train_lora.py
│   │   └── utils.py
│   ├── FinGPT_MultiAgentsRAG/
│   │   ├── Evaluation_methods/
│   │   │   ├── HaluEval/
│   │   │   │   ├── evaluate.py
│   │   │   │   ├── filtering.py
│   │   │   │   ├── generate.py
│   │   │   │   └── halueval
│   │   │   ├── MMLU/
│   │   │   │   ├── eval_mmlu.py
│   │   │   │   ├── gen_mmlu.py
│   │   │   │   └── mmlu
│   │   │   ├── TruthfulQA/
│   │   │   │   ├── evaluate.py
│   │   │   │   ├── truthfulqa
│   │   │   │   └── utilities.py
│   │   │   └── new_evaluation
│   │   ├── Fine_tune_model/
│   │   │   ├── fine_tune_GLM2.ipynb
│   │   │   ├── fine_tune_Llama2.ipynb
│   │   │   └── newFTmodels
│   │   ├── MultiAgents/
│   │   │   ├── inference_mmlu_Llama2.ipynb
│   │   │   ├── inference_mmlu_Llama2_cleaned.ipynb
│   │   │   ├── inference_mmlu_Llama2_v2.ipynb
│   │   │   └── new_file_multiagents
│   │   ├── RAG/
│   │   │   ├── RAG_part.ipynb
│   │   │   └── new_file_rag
│   │   └── README.md
│   ├── FinGPT_Others/
│   │   ├── FinGPT_Low_Code_Development/
│   │   │   ├── chatgpt-low-code-development-v1/
│   │   │   │   ├── main.ipynb
│   │   │   │   └── readme.md
│   │   │   └── chatgpt-low-code-development-v2/
│   │   │       ├── main.ipynb
│   │   │       └── readme.md
│   │   ├── FinGPT_Robo_Advisor/
│   │   │   ├── chatgpt-robo-advisor-v1/
│   │   │   │   ├── ChatGPT_Robo_Advisor.ipynb
│   │   │   │   ├── ChatGPT_Robo_Advisor_Results.csv
│   │   │   │   ├── README.md
│   │   │   │   └── requirements.txt
│   │   │   └── chatgpt-robo-advisor-v2/
│   │   │       ├── ChatGPT_Robo_Advisor_v2.ipynb
│   │   │       ├── ChatGPT_Robo_Advisor_v2_Results.csv
│   │   │       ├── README.md
│   │   │       ├── data/
│   │   │       │   └── dataset.csv
│   │   │       └── requirements.txt
│   │   ├── FinGPT_Trading/
│   │   │   ├── chatgpt-trading-v1/
│   │   │   │   ├── README.md
│   │   │   │   ├── data/
│   │   │   │   │   ├── dataset.csv
│   │   │   │   │   ├── maotai.csv
│   │   │   │   │   └── maotai_another.csv
│   │   │   │   ├── get_chatgpt_results.ipynb
│   │   │   │   ├── requirements.txt
│   │   │   │   └── trade_with_chatgpt.ipynb
│   │   │   └── chatgpt-trading-v2/
│   │   │       ├── README.md
│   │   │       ├── data/
│   │   │       │   ├── text-curie-001.pkl
│   │   │       │   └── text-davinci-003.pkl
│   │   │       ├── get_gpt_sentiment_results/
│   │   │       │   ├── df.csv
│   │   │       │   ├── get_gpt_res.py
│   │   │       │   └── run.sh
│   │   │       ├── openai_token/
│   │   │       │   └── token_.py
│   │   │       ├── pyfolio/
│   │   │       │   ├── __init__.py
│   │   │       │   ├── _seaborn.py
│   │   │       │   ├── _version.py
│   │   │       │   ├── capacity.py
│   │   │       │   ├── deprecate.py
│   │   │       │   ├── interesting_periods.py
│   │   │       │   ├── ipycompat.py
│   │   │       │   ├── perf_attrib.py
│   │   │       │   ├── plotting.py
│   │   │       │   ├── pos.py
│   │   │       │   ├── round_trips.py
│   │   │       │   ├── tears.py
│   │   │       │   ├── tests/
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── test_capacity.py
│   │   │       │   │   ├── test_nbs.py
│   │   │       │   │   ├── test_perf_attrib.py
│   │   │       │   │   ├── test_pos.py
│   │   │       │   │   ├── test_round_trips.py
│   │   │       │   │   ├── test_tears.py
│   │   │       │   │   ├── test_timeseries.py
│   │   │       │   │   └── test_txn.py
│   │   │       │   ├── timeseries.py
│   │   │       │   ├── txn.py
│   │   │       │   └── utils.py
│   │   │       ├── requirements.txt
│   │   │       └── trade_with_gpt3.ipynb
│   │   └── shares_news_sentiment_classify.py
│   ├── FinGPT_RAG/
│   │   ├── README.md
│   │   ├── __init__.py
│   │   ├── instruct-FinGPT/
│   │   │   ├── README.md
│   │   │   ├── chat.py
│   │   │   ├── convert_llama_weights_to_hf.py
│   │   │   ├── infer.sh
│   │   │   ├── inference/
│   │   │   │   ├── batchbot.py
│   │   │   │   ├── batchbot_torch.py
│   │   │   │   ├── chatbot.py
│   │   │   │   └── f1fromcm.py
│   │   │   ├── load_data.ipynb
│   │   │   ├── nohup.out
│   │   │   ├── train.py
│   │   │   ├── train.sh
│   │   │   └── training/
│   │   │       ├── supervised_finetuning/
│   │   │       │   ├── README.md
│   │   │       │   ├── evaluation_scripts/
│   │   │       │   │   └── run_prompt.sh
│   │   │       │   ├── main.py
│   │   │       │   ├── main_data.py
│   │   │       │   ├── prompt_eval.py
│   │   │       │   └── training_scripts/
│   │   │       │       ├── README.md
│   │   │       │       ├── multi_node/
│   │   │       │       │   ├── run_66b.sh
│   │   │       │       │   ├── run_sent-1.3b.sh
│   │   │       │       │   └── run_sent-llama-7b.sh
│   │   │       │       ├── other_language/
│   │   │       │       │   ├── run_chinese.sh
│   │   │       │       │   └── run_japanese.sh
│   │   │       │       ├── single_gpu/
│   │   │       │       │   ├── run_1.3b.sh
│   │   │       │       │   ├── run_6.7b_lora.sh
│   │   │       │       │   └── run_sent-1.3b.sh
│   │   │       │       └── single_node/
│   │   │       │           ├── run_1.3b.sh
│   │   │       │           ├── run_1.3b_lora.sh
│   │   │       │           ├── run_13b.sh
│   │   │       │           ├── run_30b_lora.sh
│   │   │       │           ├── run_6.7b.sh
│   │   │       │           ├── run_llama-13b.sh
│   │   │       │           ├── run_sent-1.3b.sh
│   │   │       │           ├── run_sent-llama-7b.sh
│   │   │       │           └── run_sent-llama2-7b.sh
│   │   │       └── utils/
│   │   │           ├── data/
│   │   │           │   ├── data_utils.py
│   │   │           │   └── raw_datasets.py
│   │   │           ├── ds_utils.py
│   │   │           ├── model/
│   │   │           │   ├── model_utils.py
│   │   │           │   └── reward_model.py
│   │   │           ├── module/
│   │   │           │   └── lora.py
│   │   │           └── utils.py
│   │   ├── multisource_retrieval/
│   │   │   ├── ChatGPT_sentiment_analysis_benchmark.ipynb
│   │   │   ├── README.md
│   │   │   ├── __init__.py
│   │   │   ├── count_contexts.py
│   │   │   ├── data/
│   │   │   │   ├── sent_valid.csv
│   │   │   │   ├── sent_valid_penultimate_run.csv
│   │   │   │   ├── sent_valid_penultimate_run_classified.csv
│   │   │   │   ├── sent_valid_penultimate_run_classified_classified.csv
│   │   │   │   ├── sent_valid_scraped.csv
│   │   │   │   ├── test.csv
│   │   │   │   └── test_classified.csv
│   │   │   ├── external_LLMs/
│   │   │   │   ├── chatGPT_tokenization.py
│   │   │   │   ├── chatGPT_tokenization.tsx
│   │   │   │   ├── external_LLMs.py
│   │   │   │   └── g4f_tokenization.py
│   │   │   ├── format_checker.py
│   │   │   ├── gui/
│   │   │   │   └── gui.py
│   │   │   ├── manual_classification.py
│   │   │   ├── news_scraper.py
│   │   │   ├── proxies/
│   │   │   │   └── headers.py
│   │   │   ├── requests_url.py
│   │   │   ├── scrapers/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── cnbc/
│   │   │   │   │   └── scrape_cnbc.py
│   │   │   │   ├── google/
│   │   │   │   │   └── scrape_google.py
│   │   │   │   ├── market_screener/
│   │   │   │   │   └── scrape_market_screener.py
│   │   │   │   ├── seeking_alpha/
│   │   │   │   │   ├── SeekingAlpha_Content.ipynb
│   │   │   │   │   ├── __init__.py
│   │   │   │   │   └── seeking_alpha_scraping.py
│   │   │   │   ├── selenium/
│   │   │   │   │   └── selenium_app.py
│   │   │   │   ├── similarity_score.py
│   │   │   │   ├── url_encode.py
│   │   │   │   └── yahoo/
│   │   │   │       └── scrape_yahoo.py
│   │   │   ├── sentence_processing/
│   │   │   │   └── split_sentence.py
│   │   │   └── utils/
│   │   │       ├── classification_accuracy_verification.py
│   │   │       ├── classify_news_sources.py
│   │   │       ├── count_contexts.py
│   │   │       ├── format_checker.py
│   │   │       ├── manual_classification.py
│   │   │       └── sentiment_classification_by_external_LLMs.py
│   │   └── requirements.txt
│   ├── FinGPT_Sentiment_Analysis_v1/
│   │   ├── FinGPT_v1.0/
│   │   │   ├── README.md
│   │   │   ├── data_preparations/
│   │   │   │   ├── FMP/
│   │   │   │   │   ├── FMP.ipynb
│   │   │   │   │   └── S&P 500 Index.xlsx
│   │   │   │   ├── add_labels.py
│   │   │   │   ├── download_content_demo.ipynb
│   │   │   │   ├── download_contents.py
│   │   │   │   ├── download_titles.py
│   │   │   │   └── hs_300.csv
│   │   │   ├── inferencing/
│   │   │   │   ├── cover_alpaca2jsonl.py
│   │   │   │   └── infer.ipynb
│   │   │   ├── making_dataset/
│   │   │   │   ├── change_jsonl_train_and_valid.sh
│   │   │   │   ├── cover_alpaca2jsonl.py
│   │   │   │   ├── make_dataset_by_date.ipynb
│   │   │   │   ├── make_dataset_train_and_valid.sh
│   │   │   │   └── tokenize_dataset_rows.py
│   │   │   ├── requirements.txt
│   │   │   └── training/
│   │   │       ├── finetune.py
│   │   │       └── finetune.sh
│   │   ├── FinGPT_v1.1/
│   │   │   └── README.md
│   │   └── README.md
│   ├── FinGPT_Sentiment_Analysis_v3/
│   │   ├── README.md
│   │   ├── __init__.py
│   │   ├── benchmark/
│   │   │   ├── benchmarks.ipynb
│   │   │   └── benchmarks_llama2_13b.ipynb
│   │   ├── data/
│   │   │   └── making_data.ipynb
│   │   ├── training_8bit/
│   │   │   ├── train_ChatGLM2_6B.ipynb
│   │   │   └── train_Llama2_13B.ipynb
│   │   ├── training_int4/
│   │   │   └── train.ipynb
│   │   └── training_parallel/
│   │       ├── config.json
│   │       ├── train.sh
│   │       └── train_lora.py
│   ├── __init__.py
│   └── readme.md
├── finogrid/
│   ├── README.md
│   ├── agents/
│   │   ├── audit_governance/
│   │   │   └── agent.py
│   │   ├── internal_support/
│   │   │   └── agent.py
│   │   ├── ops_oversight/
│   │   │   └── agent.py
│   │   ├── process_improvement/
│   │   │   └── agent.py
│   │   └── treasury_strategy/
│   │       └── agent.py
│   ├── corridors/
│   │   ├── __init__.py
│   │   ├── argentina/
│   │   │   └── adapter.py
│   │   ├── base.py
│   │   ├── brazil/
│   │   │   └── adapter.py
│   │   ├── india/
│   │   │   └── adapter.py
│   │   ├── indonesia/
│   │   │   └── adapter.py
│   │   ├── nigeria/
│   │   │   └── adapter.py
│   │   ├── philippines/
│   │   │   └── adapter.py
│   │   ├── uae/
│   │   │   └── adapter.py
│   │   └── vietnam/
│   │       └── adapter.py
│   ├── database/
│   │   ├── migrations/
│   │   │   ├── 001_initial_schema.sql
│   │   │   ├── 002_agent_ledger.sql
│   │   │   └── 003_mandate.sql
│   │   └── models/
│   │       ├── __init__.py
│   │       ├── agent_ledger.py
│   │       ├── audit.py
│   │       ├── base.py
│   │       ├── batch.py
│   │       ├── client.py
│   │       ├── execution.py
│   │       ├── instruction.py
│   │       ├── mandate.py
│   │       └── routing.py
│   ├── docs/
│   │   ├── architecture.md
│   │   ├── corridors/
│   │   │   └── nigeria.md
│   │   ├── dr-runbook.md
│   │   └── fingpt_usage_policy.md
│   ├── fingpt_integration/
│   │   ├── __init__.py
│   │   ├── forecaster/
│   │   │   └── corridor_forecaster.py
│   │   ├── minimax_llm_client.py
│   │   ├── rag/
│   │   │   └── knowledge_base.py
│   │   └── sentiment/
│   │       ├── crypto_sentiment.py
│   │       ├── minimax_provider.py
│   │       └── openai_fallback.py
│   ├── mcp/
│   │   ├── bridge/
│   │   │   └── server.py
│   │   ├── identity/
│   │   │   └── server.py
│   │   ├── kya_validator/
│   │   │   ├── __init__.py
│   │   │   └── server.py
│   │   ├── kyt_aml/
│   │   │   └── server.py
│   │   ├── plaid/
│   │   │   ├── __init__.py
│   │   │   └── server.py
│   │   └── wallet_factory/
│   │       ├── __init__.py
│   │       └── server.py
│   ├── requirements.txt
│   ├── sdk/
│   │   └── typescript/
│   │       ├── package.json
│   │       ├── src/
│   │       │   ├── client.test.ts
│   │       │   ├── client.ts
│   │       │   ├── index.ts
│   │       │   └── types.ts
│   │       └── tsconfig.json
│   ├── services/
│   │   ├── agent_ledger_api/
│   │   │   ├── chain_watcher.py
│   │   │   ├── config.py
│   │   │   ├── dependencies.py
│   │   │   ├── intent_sweeper.py
│   │   │   ├── main.py
│   │   │   ├── middleware/
│   │   │   │   ├── __init__.py
│   │   │   │   └── payment_required.py
│   │   │   ├── routers/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── agent_accounts.py
│   │   │   │   ├── health.py
│   │   │   │   ├── kya.py
│   │   │   │   ├── micropay.py
│   │   │   │   ├── payment_intents.py
│   │   │   │   ├── topup.py
│   │   │   │   └── wallets.py
│   │   │   └── schemas.py
│   │   ├── compliance_gate/
│   │   │   └── gate.py
│   │   ├── ingress_api/
│   │   │   ├── config.py
│   │   │   ├── dependencies.py
│   │   │   ├── main.py
│   │   │   ├── routers/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── batches.py
│   │   │   │   ├── health.py
│   │   │   │   ├── onboarding.py
│   │   │   │   └── webhooks.py
│   │   │   └── schemas.py
│   │   ├── ops_console/
│   │   │   ├── __init__.py
│   │   │   ├── config.py
│   │   │   ├── dependencies.py
│   │   │   ├── main.py
│   │   │   └── routers/
│   │   │       ├── __init__.py
│   │   │       ├── agents_explorer.py
│   │   │       ├── approvals.py
│   │   │       ├── corridors.py
│   │   │       ├── exceptions.py
│   │   │       ├── ledger_explorer.py
│   │   │       ├── mandates_console.py
│   │   │       └── search.py
│   │   ├── partner_execution/
│   │   │   ├── bridge_client.py
│   │   │   └── executor.py
│   │   ├── reconciliation/
│   │   │   └── reconciler.py
│   │   └── routing_engine/
│   │       ├── engine.py
│   │       └── worker.py
│   └── tests/
│       ├── __init__.py
│       ├── integration/
│       │   ├── __init__.py
│       │   └── test_minimax_integration.py
│       └── unit/
│           ├── __init__.py
│           ├── test_agent_ledger.py
│           ├── test_corridor_adapters.py
│           ├── test_minimax_provider.py
│           └── test_routing_engine.py
├── requirements.txt
└── setup.py

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms

github: [BruceYanghy]
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: ['paypal.me/Hongyang']


================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.


================================================
FILE: .gitignore
================================================
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
#  Usually these files are written by a python script from a template
#  before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
#   According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
#   However, in case of collaboration, if having platform-specific dependencies or dependencies
#   having no cross-platform support, pipenv may install dependencies that don't work, or not
#   install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
.DS_Store
.idea/FinGPT.iml
*.xml

# Job scripts
fingpt/FinGPT_sentiment/instruct-FinGPT/run.sh
fingpt/FinGPT_sentiment/instruct-FinGPT/checkpoints
fingpt/FinGPT_sentiment/instruct-FinGPT/ds_results_all_10_v2_1.*
FinGPT_Training_LoRA_with_Chatglm2_6b_for_beginners.ipynb

# Benchmark data
fingpt/FinGPT_Benchmark/data/*/**


================================================
FILE: .gitpod.yml
================================================
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
# and commit this file to your remote git repository to share the goodness with others.

# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart

tasks:
  - init: pip install -r requirements.txt




================================================
FILE: .idea/.gitignore
================================================
# Default ignored files
/shelf/
/workspace.xml


================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct that could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

We as project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

We have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident.

## Enforcement Guidelines

Community managers will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of actions.

**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public of private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior,  harassment of an individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the community.

================================================
FILE: CONTRIBUTING.md
================================================
# FinGPT Contribution Guidelines 🚀

Welcome to the FinGPT project! We are thrilled to have you here 🌟. Your contributions are instrumental in shaping the intersection of finance and AI, making it even more amazing. 📈✨ Let's embark on this journey together.

## Code of Conduct 🤝

Before diving in, please take a moment to review our Code of Conduct. It sets the tone for our community and emphasizes the importance of respect and inclusivity. [Read the Code of Conduct](LICENSE.md).

## Contribution Types 🦠🚀📚

### Bug Reports 🐞

If you encounter any bugs during your journey, don't fret! We have the Bug Busters ready to help. To report a bug, follow these steps:

1. Check if the bug has already been reported in [GitHub Issues](https://github.com/AI4Finance-Foundation/FinGPT/issues).
2. If it's a new bug, open a new issue with a concise description and provide detailed, step-by-step instructions to reproduce it.

### Feature Requests 💡

Do you have visionary ideas that could elevate FinGPT? Share them with us! When submitting a feature request, be sure to include:

1. A clear and vivid description of the feature you envision.
2. Discuss the impact and potential benefits.

### Documentation 📖

For those with a penchant for words and an eye for detail, consider contributing to our documentation. You can make the documentation more enlightening for everyone. 🧙📜

### Code Contributions 💻

Calling all AI heroes and wizards! You are the secret sauce behind the FinGPT project. To contribute code and save the financial world:

1. **Fork the Repository**: Click the "Fork" button on the top right of the repository's page. This creates your own copy of the project.
   
2. **Clone your Fork**: In your terminal, use the following command to clone your fork to your local machine:

   ```bash
   git clone https://github.com/YourUsername/FinGPT.git
   ```

3. **Create a New Branch**: Make a new branch for your adventures. This helps keep the main codebase clean:

   ```bash
   git checkout -b your-feature-branch
   ```

4. **Work Your Magic**: Implement your code or changes.

5. **Commit and Push**: Use these commands to commit your changes and push them to your fork:

   ```bash
   git commit -m "Your commit message"
   git push origin your-feature-branch
   ```

6. **Create a Pull Request**: Go to the original FinGPT repository and click "New Pull Request." Select your branch, write a description, and submit.

## Seeking Assistance ❓🙋‍♀️

If you find yourself stuck or have questions, remember that our support team is your sidekick. Don't hesitate to reach out. We are here to guide you through the process and provide any necessary assistance.

## Getting Started 🚀🚀

Are you ready to make a mark on the FinGPT project? Grab your cape and join us in our mission to make finance and AI even more incredible. Your contributions are the magic that fuels our journey.

🔗 [FinGPT GitHub Repository](https://github.com/AI4Finance-Foundation/FinGPT)

### May your contributions be as amazing as you are! 🌌🚀

================================================
FILE: FinGPT_ Training with LoRA and Meta-Llama-3-8B.ipynb
================================================
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[],"machine_shape":"hm","toc_visible":true,"gpuType":"A100","authorship_tag":"ABX9TyNVjPCS6gwMFJlGuWc4H2St"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"},"widgets":{"application/vnd.jupyter.widget-state+json":{"07b2d0624ca54c26959c9fffc8da37d3":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_0df33a26ef494bc8b5a97855af865d51","IPY_MODEL_315751c486bf4310832330cf83f743a9","IPY_MODEL_c6371d81e1544b38938730f6e7e58c62"],"layout":"IPY_MODEL_7116e2a9e4d74b63a8f9485358be9c70"}},"0df33a26ef494bc8b5a97855af865d51":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_3b138daaf42941e388c0069e437a5231","placeholder":"​","style":"IPY_MODEL_4de915655a97452c941d1c1599d9d70e","value":"README.md: 100%"}},"315751c486bf4310832330cf83f743a9":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_feea4a62e28644db9352c111ba95c141","max":1390,"min":0,"orientation":"horizontal","style":"IPY_MODEL_97f5155b49684aeaae5b903a2e3b96c0","value":1390}},"c6371d81e1544b38938730f6e7e58c62":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_856b2d507f7e49b980fbb52cd8c4a603","placeholder":"​","style":"IPY_MODEL_73333eb78c53466883727322c6115908","value":" 1.39k/1.39k [00:00&lt;00:00, 113kB/s]"}},"7116e2a9e4d74b63a8f9485358be9c70":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"3b138daaf42941e388c0069e437a5231":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"4de915655a97452c941d1c1599d9d70e":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"feea4a62e28644db9352c111ba95c141":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"97f5155b49684aeaae5b903a2e3b96c0":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"856b2d507f7e49b980fbb52cd8c4a603":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"73333eb78c53466883727322c6115908":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"354bd5e8413d46cfa9ae78b5648fb436":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_d380540a1a5d433a86d8361b77fda56f","IPY_MODEL_7b2a8b68667c4934be028d4cf7b6956d","IPY_MODEL_4061becdc986431bb470a474d7f0d9e2"],"layout":"IPY_MODEL_f3549f709ad747de99c82985384ebf9a"}},"d380540a1a5d433a86d8361b77fda56f":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_d528afd3c6574a778f7016197747e3b5","placeholder":"​","style":"IPY_MODEL_2c1eb0bce9cd4218b6fba3b5febfc910","value":"sent_train.csv: 100%"}},"7b2a8b68667c4934be028d4cf7b6956d":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_46531a3d409248b1b43a01b1fd0ceb6e","max":858645,"min":0,"orientation":"horizontal","style":"IPY_MODEL_40e9b365dcd940caa1b9fb1e2f37b5dd","value":858645}},"4061becdc986431bb470a474d7f0d9e2":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_9c45f7febf9b432da3392900ae23f198","placeholder":"​","style":"IPY_MODEL_1a2540b48f0a402c96a2560bc1ac4165","value":" 859k/859k [00:00&lt;00:00, 1.70MB/s]"}},"f3549f709ad747de99c82985384ebf9a":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"d528afd3c6574a778f7016197747e3b5":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"2c1eb0bce9cd4218b6fba3b5febfc910":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"46531a3d409248b1b43a01b1fd0ceb6e":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"40e9b365dcd940caa1b9fb1e2f37b5dd":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"9c45f7febf9b432da3392900ae23f198":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"1a2540b48f0a402c96a2560bc1ac4165":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"b7de3576f65344eaaf7d5a08db85588a":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_d932cad0586947509ab3fde467ba7357","IPY_MODEL_1ac87a168d7c4ed08994f681d59bf3e4","IPY_MODEL_6d369cc9fd2243d293d7e2a5ff4b2db2"],"layout":"IPY_MODEL_968d6e47a31949478c7e21b4bed7e029"}},"d932cad0586947509ab3fde467ba7357":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_7dd9abbc09f047729087cf6b32e7fdbe","placeholder":"​","style":"IPY_MODEL_add35e421a114d7781503be9af48d282","value":"sent_valid.csv: 100%"}},"1ac87a168d7c4ed08994f681d59bf3e4":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_dca076fd97504098b50decb0ea6a8c6e","max":217378,"min":0,"orientation":"horizontal","style":"IPY_MODEL_49faea6373f14d67936171644659efd0","value":217378}},"6d369cc9fd2243d293d7e2a5ff4b2db2":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_0c821a883f0c44078db3064d9d7d6ad9","placeholder":"​","style":"IPY_MODEL_222403e6f19349f298df755a09560daa","value":" 217k/217k [00:00&lt;00:00, 874kB/s]"}},"968d6e47a31949478c7e21b4bed7e029":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"7dd9abbc09f047729087cf6b32e7fdbe":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"add35e421a114d7781503be9af48d282":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"dca076fd97504098b50decb0ea6a8c6e":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"49faea6373f14d67936171644659efd0":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"0c821a883f0c44078db3064d9d7d6ad9":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"222403e6f19349f298df755a09560daa":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"ff8e0e5c79be4c19937e49cc2ccbbc21":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_1dcd9f5bc2ab496194b9e5838228caa6","IPY_MODEL_0ec00d34e953436eaf8c8f32af88a329","IPY_MODEL_ef9fa8843cf34267b7d5dcbf8869f6c8"],"layout":"IPY_MODEL_91c7201b53124f03954572cbe52db21d"}},"1dcd9f5bc2ab496194b9e5838228caa6":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_0de04a84dd644332ac1547d6540c9007","placeholder":"​","style":"IPY_MODEL_b799ff81e69741b6897d36285b429466","value":"Generating train split: 100%"}},"0ec00d34e953436eaf8c8f32af88a329":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_a4a08d6bf329484cb296411b2e70ca67","max":9543,"min":0,"orientation":"horizontal","style":"IPY_MODEL_2010f85089e640e98dfbb7585eb99bf6","value":9543}},"ef9fa8843cf34267b7d5dcbf8869f6c8":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_e6f6e8a58359483c9ca290f043e09e5b","placeholder":"​","style":"IPY_MODEL_90d05589d9c84e1f87ffad2632c6c71d","value":" 9543/9543 [00:00&lt;00:00, 199543.56 examples/s]"}},"91c7201b53124f03954572cbe52db21d":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"0de04a84dd644332ac1547d6540c9007":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"b799ff81e69741b6897d36285b429466":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"a4a08d6bf329484cb296411b2e70ca67":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"2010f85089e640e98dfbb7585eb99bf6":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"e6f6e8a58359483c9ca290f043e09e5b":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"90d05589d9c84e1f87ffad2632c6c71d":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"01c4ff58a0a84b87bf05f9371a593caa":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_1e423fb1ebfa479bb241a7aee3cafc05","IPY_MODEL_82ea288dd90147388b07eb8961940e52","IPY_MODEL_777177eb10d54109a8a4253eca75b82d"],"layout":"IPY_MODEL_c1967bc33b4c44cc8524119f463c668b"}},"1e423fb1ebfa479bb241a7aee3cafc05":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_7d9492586a924585983b892e23bdeb4a","placeholder":"​","style":"IPY_MODEL_511a761fe718484b89abd806dc7ac60c","value":"Generating validation split: 100%"}},"82ea288dd90147388b07eb8961940e52":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_6428e0ebfd574ee88974be31648354ae","max":2388,"min":0,"orientation":"horizontal","style":"IPY_MODEL_7c3276a84e67414e8b5b0737539910ea","value":2388}},"777177eb10d54109a8a4253eca75b82d":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_171a931f2fef4ceea6d09036cf7a3315","placeholder":"​","style":"IPY_MODEL_c4238ab47e49491b9ba80bde0f67ac3b","value":" 2388/2388 [00:00&lt;00:00, 86779.46 examples/s]"}},"c1967bc33b4c44cc8524119f463c668b":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"7d9492586a924585983b892e23bdeb4a":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"511a761fe718484b89abd806dc7ac60c":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"6428e0ebfd574ee88974be31648354ae":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"7c3276a84e67414e8b5b0737539910ea":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"171a931f2fef4ceea6d09036cf7a3315":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"c4238ab47e49491b9ba80bde0f67ac3b":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"d186891419fe4cdbb29e8c9bcd27d4a7":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_f36ca85863f84e51a9c3a71c6401fbb0","IPY_MODEL_722a1da6a59a4812991fd5a3646531f8","IPY_MODEL_7f338c915d2a4154b9790c5a9c6a42ea"],"layout":"IPY_MODEL_c6182617918f403595c72c143ebb7697"}},"f36ca85863f84e51a9c3a71c6401fbb0":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_64660f224299457c9d22603cb3f5c842","placeholder":"​","style":"IPY_MODEL_277186ade77242bfa3f8095adb0935b9","value":"formatting..: 100%"}},"722a1da6a59a4812991fd5a3646531f8":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_301c3b91250444d88cf91137e7a2edf5","max":19086,"min":0,"orientation":"horizontal","style":"IPY_MODEL_87e313fe3c1c4f0bb0f44bc61bb12eb1","value":19086}},"7f338c915d2a4154b9790c5a9c6a42ea":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_3e584353238d4abdac8cadb2ef9f19b4","placeholder":"​","style":"IPY_MODEL_4d44f66f788e460083bf2f8ba569706a","value":" 19086/19086 [00:00&lt;00:00, 160460.70it/s]"}},"c6182617918f403595c72c143ebb7697":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"64660f224299457c9d22603cb3f5c842":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"277186ade77242bfa3f8095adb0935b9":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"301c3b91250444d88cf91137e7a2edf5":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"87e313fe3c1c4f0bb0f44bc61bb12eb1":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"3e584353238d4abdac8cadb2ef9f19b4":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"4d44f66f788e460083bf2f8ba569706a":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"2a119723664347af9b320ec7bd9de1cb":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_a3b6277c83ce4981bd7eca6a5c2d8104","IPY_MODEL_ffe02caf5f8d42c1ad64110207e30021","IPY_MODEL_477db912b0454a96b77bb96a2d907c43"],"layout":"IPY_MODEL_ecfa1ed61321472db260eb29af6be2ba"}},"a3b6277c83ce4981bd7eca6a5c2d8104":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_9a1984db57404860b14f3af434796cae","placeholder":"​","style":"IPY_MODEL_6c82a861d86e48c9b46ec2455dfdff7d","value":""}},"ffe02caf5f8d42c1ad64110207e30021":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_a1c5fad783b5412ba836909cd85d49c6","max":1,"min":0,"orientation":"horizontal","style":"IPY_MODEL_d25fbd1d965c48b9b1c16c859fde464c","value":0}},"477db912b0454a96b77bb96a2d907c43":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_5476179897a84305bd652c02a5106a43","placeholder":"​","style":"IPY_MODEL_f1ad03c919644c25b9fcdf307b989c7a","value":" 0/0 [00:00&lt;?, ?it/s]"}},"ecfa1ed61321472db260eb29af6be2ba":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"9a1984db57404860b14f3af434796cae":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"6c82a861d86e48c9b46ec2455dfdff7d":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"a1c5fad783b5412ba836909cd85d49c6":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":"20px"}},"d25fbd1d965c48b9b1c16c859fde464c":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"5476179897a84305bd652c02a5106a43":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"f1ad03c919644c25b9fcdf307b989c7a":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"3fbdc5eb0ad649a6a2185ff5c01447c9":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_7d509c994d3048fe9081bd8afc1f9526","IPY_MODEL_b501b74a56fc43418d098bf6b3703714","IPY_MODEL_aa1f17b5e387471cb3ff8f918603cc01"],"layout":"IPY_MODEL_72fadabe43304723bfa05ec9a66c680f"}},"7d509c994d3048fe9081bd8afc1f9526":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_009f988c42ba4b07858abc62a8ff4ae7","placeholder":"​","style":"IPY_MODEL_0c15c3a41f3442f2b6c5ef2f9e91c261","value":"Generating train split: "}},"b501b74a56fc43418d098bf6b3703714":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_3f600d79bd094f939727c8dba98c492e","max":1,"min":0,"orientation":"horizontal","style":"IPY_MODEL_6c9745bcf8f24781a3588a8223335bd7","value":1}},"aa1f17b5e387471cb3ff8f918603cc01":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_d742c04e26cc46cf87f147df32af90ad","placeholder":"​","style":"IPY_MODEL_9c88941c7caf48398e19f301dfaa3f32","value":" 19086/0 [00:06&lt;00:00, 3581.79 examples/s]"}},"72fadabe43304723bfa05ec9a66c680f":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"009f988c42ba4b07858abc62a8ff4ae7":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"0c15c3a41f3442f2b6c5ef2f9e91c261":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"3f600d79bd094f939727c8dba98c492e":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":"20px"}},"6c9745bcf8f24781a3588a8223335bd7":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"d742c04e26cc46cf87f147df32af90ad":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"9c88941c7caf48398e19f301dfaa3f32":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"ff32afd0b67e4372b32e39bee4732632":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_2e1250d4e7b34c408cf2d0e76f104930","IPY_MODEL_7d45b0ee63af4055b3884ee8cc0e247d","IPY_MODEL_1671dd31d0e94fce84b7e30df924162b"],"layout":"IPY_MODEL_efd665b309c645d195860f4b23f68fd0"}},"2e1250d4e7b34c408cf2d0e76f104930":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_e5e4826e0ba74aa39c850aa686e02953","placeholder":"​","style":"IPY_MODEL_e3d54027f0eb4131b722e01ffc1a75c5","value":"100%"}},"7d45b0ee63af4055b3884ee8cc0e247d":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_fc28cafadc2943b394983991aa222f2c","max":19086,"min":0,"orientation":"horizontal","style":"IPY_MODEL_08f7b66e545e48ab9844b5f6ed53a658","value":19086}},"1671dd31d0e94fce84b7e30df924162b":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_0af158b6dab8447bb7a8e46371df6044","placeholder":"​","style":"IPY_MODEL_4b50a26daa1440fe93a46b062a5b353c","value":" 19086/19086 [00:05&lt;00:00, 3595.39it/s]"}},"efd665b309c645d195860f4b23f68fd0":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"e5e4826e0ba74aa39c850aa686e02953":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"e3d54027f0eb4131b722e01ffc1a75c5":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"fc28cafadc2943b394983991aa222f2c":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"08f7b66e545e48ab9844b5f6ed53a658":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"0af158b6dab8447bb7a8e46371df6044":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"4b50a26daa1440fe93a46b062a5b353c":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"d9c98c221ca34fb0bcd10ffe057e4b1a":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_c17f202789cc4b0bbd379c6c56a23f6d","IPY_MODEL_b7901d36d93f4fbdbe54369ea4be8968","IPY_MODEL_da205f761a7e436983e08f9521384875"],"layout":"IPY_MODEL_f7690f61b1384ace8e4e0a3e3e2e78d9"}},"c17f202789cc4b0bbd379c6c56a23f6d":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_13f5be0753d54f5e9793a436bfc2c807","placeholder":"​","style":"IPY_MODEL_dc432aa357d640d3a57690bfbb30382e","value":"Saving the dataset (1/1 shards): 100%"}},"b7901d36d93f4fbdbe54369ea4be8968":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_d8a361c3653b456c9fe2834c5bbdc994","max":19086,"min":0,"orientation":"horizontal","style":"IPY_MODEL_e181354052df46f2bbf78c6c64b90f66","value":19086}},"da205f761a7e436983e08f9521384875":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_358d62623bda45488c95cd035f2d3e39","placeholder":"​","style":"IPY_MODEL_2689554243194d24880808231936db58","value":" 19086/19086 [00:00&lt;00:00, 662291.40 examples/s]"}},"f7690f61b1384ace8e4e0a3e3e2e78d9":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"13f5be0753d54f5e9793a436bfc2c807":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"dc432aa357d640d3a57690bfbb30382e":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"d8a361c3653b456c9fe2834c5bbdc994":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"e181354052df46f2bbf78c6c64b90f66":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"358d62623bda45488c95cd035f2d3e39":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"2689554243194d24880808231936db58":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"08b1a8f1a78b43cc9fcadfbd62b8c640":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_0425b5a2fd4d43c7a5c23ce0d871c2bc","IPY_MODEL_d195de0e6ae24554aae7dac017702aa6","IPY_MODEL_925779e4950449468858202aea2e41c5"],"layout":"IPY_MODEL_77c13a2147484f0ba7df11ebe2c3ed05"}},"0425b5a2fd4d43c7a5c23ce0d871c2bc":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_533cb8875d5244dda8e32d7cbc73ab30","placeholder":"​","style":"IPY_MODEL_50f8bac5cc714a07841576d2e68a1540","value":"Saving the dataset (1/1 shards): 100%"}},"d195de0e6ae24554aae7dac017702aa6":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_7e088ac4ea01438788ec74e036ba6aa4","max":19086,"min":0,"orientation":"horizontal","style":"IPY_MODEL_e6a724f0076b465ea14da1c66c93514b","value":19086}},"925779e4950449468858202aea2e41c5":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_3ed33e39bd80437d855a878928198bbc","placeholder":"​","style":"IPY_MODEL_bcda59cdb6b44c468ec40f25db93e0ed","value":" 19086/19086 [00:00&lt;00:00, 440141.45 examples/s]"}},"77c13a2147484f0ba7df11ebe2c3ed05":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"533cb8875d5244dda8e32d7cbc73ab30":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"50f8bac5cc714a07841576d2e68a1540":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"7e088ac4ea01438788ec74e036ba6aa4":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"e6a724f0076b465ea14da1c66c93514b":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"3ed33e39bd80437d855a878928198bbc":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"bcda59cdb6b44c468ec40f25db93e0ed":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"accdc799fb984c06928a728fc83235f3":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_da4a447f614c4a7ab4ee0aa2866ce1d8","IPY_MODEL_e94ff7ee9edc4732a15d1fe4ebdee452","IPY_MODEL_cd57c5897c9146b2bb0882711636c186"],"layout":"IPY_MODEL_d5cf4320251d4ef1a43f744ad057f9bc"}},"da4a447f614c4a7ab4ee0aa2866ce1d8":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_fdd537bd5c214210892d8de2d6f36cde","placeholder":"​","style":"IPY_MODEL_9b4f67139c4e474fab9ff5f68841dd1e","value":"Loading checkpoint shards: 100%"}},"e94ff7ee9edc4732a15d1fe4ebdee452":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_098f37019be84aa0b9d9004ee02f6a8b","max":4,"min":0,"orientation":"horizontal","style":"IPY_MODEL_1d27c47dcffe4cb08e8b9f953ddd06e6","value":4}},"cd57c5897c9146b2bb0882711636c186":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_8ca9fc82ec214686bb9f89a950263b11","placeholder":"​","style":"IPY_MODEL_c827a177aeb84d6886baa707b55873aa","value":" 4/4 [00:09&lt;00:00,  2.17s/it]"}},"d5cf4320251d4ef1a43f744ad057f9bc":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"fdd537bd5c214210892d8de2d6f36cde":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"9b4f67139c4e474fab9ff5f68841dd1e":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"098f37019be84aa0b9d9004ee02f6a8b":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"1d27c47dcffe4cb08e8b9f953ddd06e6":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"8ca9fc82ec214686bb9f89a950263b11":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"c827a177aeb84d6886baa707b55873aa":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"256e4d08479e44cea312bc61f5df3e65":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_9de3f80680ea4e068103f4f54763888b","IPY_MODEL_8cefc7bb2af64ce68749eae8faf0735d","IPY_MODEL_e96202e3af654c328cb39b5c2931624e"],"layout":"IPY_MODEL_08ebbf44bcb545ad92eef0f6df938782"}},"9de3f80680ea4e068103f4f54763888b":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_c82035139f974912b39fc19a16749abc","placeholder":"​","style":"IPY_MODEL_169212d00c5e4a94b9741ff39ab8a517","value":"Loading checkpoint shards: 100%"}},"8cefc7bb2af64ce68749eae8faf0735d":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_78a1ce26130240fdb730c3e1972566e9","max":4,"min":0,"orientation":"horizontal","style":"IPY_MODEL_26422841e84d4af9816b2bf29dc9d253","value":4}},"e96202e3af654c328cb39b5c2931624e":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_f7a1c8d0c9bf412d8ce43c7873bd1b97","placeholder":"​","style":"IPY_MODEL_a90c70e22d344674a8440b036101d9c5","value":" 4/4 [01:06&lt;00:00, 14.09s/it]"}},"08ebbf44bcb545ad92eef0f6df938782":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"c82035139f974912b39fc19a16749abc":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"169212d00c5e4a94b9741ff39ab8a517":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"78a1ce26130240fdb730c3e1972566e9":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"26422841e84d4af9816b2bf29dc9d253":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"f7a1c8d0c9bf412d8ce43c7873bd1b97":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"a90c70e22d344674a8440b036101d9c5":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"7d886b5f22c545d0bdd23d345f530661":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_31e79afb3c9a4af1948bda9f7eb75aac","IPY_MODEL_cdc4e75a547d42ea8384f4d2bec59197","IPY_MODEL_a18fc50e4dfb4c14866ad85836455800"],"layout":"IPY_MODEL_9cac43448fba448c8c9c38e8aa66ecae"}},"31e79afb3c9a4af1948bda9f7eb75aac":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_fbe7b46555284c7cbde120ee3e8b92c6","placeholder":"​","style":"IPY_MODEL_5dd0b638f97742b1ab5c32021b0f9097","value":"generation_config.json: 100%"}},"cdc4e75a547d42ea8384f4d2bec59197":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_81ddc58c72b6451ea29c47c48c18c6c9","max":177,"min":0,"orientation":"horizontal","style":"IPY_MODEL_5e30c83d7900483a8d05500e98411e04","value":177}},"a18fc50e4dfb4c14866ad85836455800":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_46596104a92a4328899496b305d36932","placeholder":"​","style":"IPY_MODEL_643e36f1ab674c9cb0d1e407e65170b4","value":" 177/177 [00:00&lt;00:00, 15.6kB/s]"}},"9cac43448fba448c8c9c38e8aa66ecae":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"fbe7b46555284c7cbde120ee3e8b92c6":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"5dd0b638f97742b1ab5c32021b0f9097":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"81ddc58c72b6451ea29c47c48c18c6c9":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"5e30c83d7900483a8d05500e98411e04":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"46596104a92a4328899496b305d36932":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"643e36f1ab674c9cb0d1e407e65170b4":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}}}},"accelerator":"GPU"},"cells":[{"cell_type":"markdown","source":["# FinGPT: Training with LoRA and Meta-Llama-3-8B"],"metadata":{"id":"ByoMEW4RHTm8"}},{"cell_type":"markdown","source":["## Part 1: Preparing the Data"],"metadata":{"id":"mc_iU0uSHcBH"}},{"cell_type":"markdown","source":["### 1.1 Initialize Directories"],"metadata":{"id":"xPQiRkSBHlPk"}},{"cell_type":"code","source":["hf_token = \"Your HF token\" #Put your own HF token here, do not publish it\n","from huggingface_hub import login\n","# Login directly with your Token (remember not to share this Token publicly)\n","login(token=hf_token)"],"metadata":{"id":"pu9p8wwFav3d"},"execution_count":null,"outputs":[]},{"cell_type":"code","execution_count":null,"metadata":{"id":"M4t-GME9HSi_"},"outputs":[],"source":["import os\n","import shutil"]},{"cell_type":"code","source":["if not os.path.exists('./data'):\n","    os.makedirs('./data')\n","\n","\n","jsonl_path = \"../data/dataset_new.jsonl\"\n","save_path = '../data/dataset_new'\n","\n","\n","if os.path.exists(jsonl_path):\n","    os.remove(jsonl_path)\n","\n","if os.path.exists(save_path):\n","    shutil.rmtree(save_path)\n","\n","directory = \"../data\"\n","if not os.path.exists(directory):\n","    os.makedirs(directory)"],"metadata":{"id":"763xKcP5HsMg"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["!ls -l ./data/dataset_new"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"o5Ld9fkI7ya0","executionInfo":{"status":"ok","timestamp":1727628921511,"user_tz":240,"elapsed":351,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"f74a83b5-6a36-4217-9aee-68194813497e"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["ls: cannot access './data/dataset_new': No such file or directory\n"]}]},{"cell_type":"markdown","source":["### 1.2 Load and Prepare Dataset"],"metadata":{"id":"avu789edJigP"}},{"cell_type":"code","source":["!pip install datasets"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"Wj4yKaOvXxhZ","executionInfo":{"status":"ok","timestamp":1727628939219,"user_tz":240,"elapsed":7919,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"5578aefa-17c8-40a1-9f35-d29346b6f005"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Collecting datasets\n","  Downloading datasets-3.0.1-py3-none-any.whl.metadata (20 kB)\n","Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from datasets) (3.16.1)\n","Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from datasets) (1.26.4)\n","Collecting pyarrow>=15.0.0 (from datasets)\n","  Downloading pyarrow-17.0.0-cp310-cp310-manylinux_2_28_x86_64.whl.metadata (3.3 kB)\n","Collecting dill<0.3.9,>=0.3.0 (from datasets)\n","  Downloading dill-0.3.8-py3-none-any.whl.metadata (10 kB)\n","Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from datasets) (2.1.4)\n","Requirement already satisfied: requests>=2.32.2 in /usr/local/lib/python3.10/dist-packages (from datasets) (2.32.3)\n","Requirement already satisfied: tqdm>=4.66.3 in /usr/local/lib/python3.10/dist-packages (from datasets) (4.66.5)\n","Collecting xxhash (from datasets)\n","  Downloading xxhash-3.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (12 kB)\n","Collecting multiprocess (from datasets)\n","  Downloading multiprocess-0.70.16-py310-none-any.whl.metadata (7.2 kB)\n","Requirement already satisfied: fsspec<=2024.6.1,>=2023.1.0 in /usr/local/lib/python3.10/dist-packages (from fsspec[http]<=2024.6.1,>=2023.1.0->datasets) (2024.6.1)\n","Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from datasets) (3.10.5)\n","Requirement already satisfied: huggingface-hub>=0.22.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (0.24.7)\n","Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from datasets) (24.1)\n","Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from datasets) (6.0.2)\n","Requirement already satisfied: aiohappyeyeballs>=2.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (2.4.0)\n","Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.3.1)\n","Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (24.2.0)\n","Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.4.1)\n","Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (6.1.0)\n","Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.11.1)\n","Requirement already satisfied: async-timeout<5.0,>=4.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (4.0.3)\n","Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.22.0->datasets) (4.12.2)\n","Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.32.2->datasets) (3.3.2)\n","Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.32.2->datasets) (3.10)\n","Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.32.2->datasets) (2.2.3)\n","Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.32.2->datasets) (2024.8.30)\n","Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2.8.2)\n","Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2024.2)\n","Requirement already satisfied: tzdata>=2022.1 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2024.1)\n","Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.2->pandas->datasets) (1.16.0)\n","Downloading datasets-3.0.1-py3-none-any.whl (471 kB)\n","\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m471.6/471.6 kB\u001b[0m \u001b[31m31.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hDownloading dill-0.3.8-py3-none-any.whl (116 kB)\n","\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m116.3/116.3 kB\u001b[0m \u001b[31m10.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hDownloading pyarrow-17.0.0-cp310-cp310-manylinux_2_28_x86_64.whl (39.9 MB)\n","\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m39.9/39.9 MB\u001b[0m \u001b[31m56.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hDownloading multiprocess-0.70.16-py310-none-any.whl (134 kB)\n","\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.8/134.8 kB\u001b[0m \u001b[31m12.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hDownloading xxhash-3.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (194 kB)\n","\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m194.1/194.1 kB\u001b[0m \u001b[31m17.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hInstalling collected packages: xxhash, pyarrow, dill, multiprocess, datasets\n","  Attempting uninstall: pyarrow\n","    Found existing installation: pyarrow 14.0.2\n","    Uninstalling pyarrow-14.0.2:\n","      Successfully uninstalled pyarrow-14.0.2\n","\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n","cudf-cu12 24.4.1 requires pyarrow<15.0.0a0,>=14.0.1, but you have pyarrow 17.0.0 which is incompatible.\u001b[0m\u001b[31m\n","\u001b[0mSuccessfully installed datasets-3.0.1 dill-0.3.8 multiprocess-0.70.16 pyarrow-17.0.0 xxhash-3.5.0\n"]}]},{"cell_type":"code","source":["from datasets import load_dataset\n","import datasets"],"metadata":{"id":"a7Z1LIC7II3r"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["dic = {\n","    0:'negative',\n","    1:'positive',\n","    2:'neutral'\n","}"],"metadata":{"id":"PZbuDeGnMfuK"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["tfns = load_dataset('zeroshot/twitter-financial-news-sentiment') #tfns = Twitter Financial News Sentiment"],"metadata":{"id":"VHAEKqhsOtQQ","colab":{"base_uri":"https://localhost:8080/","height":286,"referenced_widgets":["07b2d0624ca54c26959c9fffc8da37d3","0df33a26ef494bc8b5a97855af865d51","315751c486bf4310832330cf83f743a9","c6371d81e1544b38938730f6e7e58c62","7116e2a9e4d74b63a8f9485358be9c70","3b138daaf42941e388c0069e437a5231","4de915655a97452c941d1c1599d9d70e","feea4a62e28644db9352c111ba95c141","97f5155b49684aeaae5b903a2e3b96c0","856b2d507f7e49b980fbb52cd8c4a603","73333eb78c53466883727322c6115908","354bd5e8413d46cfa9ae78b5648fb436","d380540a1a5d433a86d8361b77fda56f","7b2a8b68667c4934be028d4cf7b6956d","4061becdc986431bb470a474d7f0d9e2","f3549f709ad747de99c82985384ebf9a","d528afd3c6574a778f7016197747e3b5","2c1eb0bce9cd4218b6fba3b5febfc910","46531a3d409248b1b43a01b1fd0ceb6e","40e9b365dcd940caa1b9fb1e2f37b5dd","9c45f7febf9b432da3392900ae23f198","1a2540b48f0a402c96a2560bc1ac4165","b7de3576f65344eaaf7d5a08db85588a","d932cad0586947509ab3fde467ba7357","1ac87a168d7c4ed08994f681d59bf3e4","6d369cc9fd2243d293d7e2a5ff4b2db2","968d6e47a31949478c7e21b4bed7e029","7dd9abbc09f047729087cf6b32e7fdbe","add35e421a114d7781503be9af48d282","dca076fd97504098b50decb0ea6a8c6e","49faea6373f14d67936171644659efd0","0c821a883f0c44078db3064d9d7d6ad9","222403e6f19349f298df755a09560daa","ff8e0e5c79be4c19937e49cc2ccbbc21","1dcd9f5bc2ab496194b9e5838228caa6","0ec00d34e953436eaf8c8f32af88a329","ef9fa8843cf34267b7d5dcbf8869f6c8","91c7201b53124f03954572cbe52db21d","0de04a84dd644332ac1547d6540c9007","b799ff81e69741b6897d36285b429466","a4a08d6bf329484cb296411b2e70ca67","2010f85089e640e98dfbb7585eb99bf6","e6f6e8a58359483c9ca290f043e09e5b","90d05589d9c84e1f87ffad2632c6c71d","01c4ff58a0a84b87bf05f9371a593caa","1e423fb1ebfa479bb241a7aee3cafc05","82ea288dd90147388b07eb8961940e52","777177eb10d54109a8a4253eca75b82d","c1967bc33b4c44cc8524119f463c668b","7d9492586a924585983b892e23bdeb4a","511a761fe718484b89abd806dc7ac60c","6428e0ebfd574ee88974be31648354ae","7c3276a84e67414e8b5b0737539910ea","171a931f2fef4ceea6d09036cf7a3315","c4238ab47e49491b9ba80bde0f67ac3b"]},"executionInfo":{"status":"ok","timestamp":1727628956408,"user_tz":240,"elapsed":7634,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"3839f1db-f1f8-4f26-f9a1-103af869a660"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stderr","text":["/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_token.py:89: UserWarning: \n","The secret `HF_TOKEN` does not exist in your Colab secrets.\n","To authenticate with the Hugging Face Hub, create a token in your settings tab (https://huggingface.co/settings/tokens), set it as secret in your Google Colab and restart your session.\n","You will be able to reuse this secret in all of your notebooks.\n","Please note that authentication is recommended but still optional to access public models or datasets.\n","  warnings.warn(\n"]},{"output_type":"display_data","data":{"text/plain":["README.md:   0%|          | 0.00/1.39k [00:00<?, ?B/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"07b2d0624ca54c26959c9fffc8da37d3"}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":["sent_train.csv:   0%|          | 0.00/859k [00:00<?, ?B/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"354bd5e8413d46cfa9ae78b5648fb436"}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":["sent_valid.csv:   0%|          | 0.00/217k [00:00<?, ?B/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"b7de3576f65344eaaf7d5a08db85588a"}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":["Generating train split:   0%|          | 0/9543 [00:00<?, ? examples/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"ff8e0e5c79be4c19937e49cc2ccbbc21"}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":["Generating validation split:   0%|          | 0/2388 [00:00<?, ? examples/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"01c4ff58a0a84b87bf05f9371a593caa"}},"metadata":{}}]},{"cell_type":"code","source":["tfns = tfns['train']\n","tfns = tfns.to_pandas()\n","\n","tfns['label'] = tfns['label'].apply(lambda x : dic[x])  # Map numerical labels to their corresponding sentiments\n","\n","#Add instruction for each data entry, which is crucial for Instruction Tuning.\n","tfns['instruction'] = 'What is the sentiment of this tweet? Please choose an answer from {negative/neutral/positive}.'\n","tfns.columns = ['input','output','instruction']\n","\n","#Convert the Pandas dataframe back to a Hugging Face Dataset object.\n","tfns = datasets.Dataset.from_pandas(tfns)\n","tfns"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"EBUg8dULO9Vu","executionInfo":{"status":"ok","timestamp":1727628970896,"user_tz":240,"elapsed":356,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"e346425f-330c-4f67-f09f-35b8c0a84319"},"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/plain":["Dataset({\n","    features: ['input', 'output', 'instruction'],\n","    num_rows: 9543\n","})"]},"metadata":{},"execution_count":8}]},{"cell_type":"markdown","source":["### 1.3 Concatenate and Shuffle Dataset"],"metadata":{"id":"a7Sxgc0TR7KC"}},{"cell_type":"code","source":["tmp_dataset = datasets.concatenate_datasets([tfns]*2) #Creat a list that contains 2 tfns\n","train_dataset = tmp_dataset\n","print(tmp_dataset.num_rows)"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"2rzsssIJQNvR","executionInfo":{"status":"ok","timestamp":1727628975938,"user_tz":240,"elapsed":360,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"fb578ec4-6d96-4ac4-8898-98a80f9d812b"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["19086\n"]}]},{"cell_type":"code","source":["all_dataset = train_dataset.shuffle(seed = 42)\n","all_dataset.shape"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"XL2210OoSSCY","executionInfo":{"status":"ok","timestamp":1727628977033,"user_tz":240,"elapsed":1,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"48946bf7-c7a7-4780-b757-36f50fd5d63f"},"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/plain":["(19086, 3)"]},"metadata":{},"execution_count":10}]},{"cell_type":"markdown","source":["The training data is all set"],"metadata":{"id":"uRGfbF0rW1xj"}},{"cell_type":"markdown","source":["## Part 2: Dataset Formatting and Tokenization"],"metadata":{"id":"b_3uB3hMTSK8"}},{"cell_type":"markdown","source":["### 2.1 Dataset Fromatting"],"metadata":{"id":"FDWmm-bNTbw9"}},{"cell_type":"markdown","source":["You must structure your data in a specific format that aligns with the training process."],"metadata":{"id":"x62UGwsCTrqP"}},{"cell_type":"code","source":["import json\n","from tqdm.notebook import tqdm\n","# Used to display a progress bar in Jupyter Notebook to help visualize the progress of data processing"],"metadata":{"id":"7XZ2sYr4W1g9"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["def format_examle(example:dict) -> dict:    #Defines a function named format_example that takes a dictionary as input (example: dict) and returns a dictionary (-> dict).\n","  context = f\"Instruction:{example['instruction']}\\n\"   #Initializes a string variable context using an f-string to format the instruction.\n","  if example.get('input'):     #Checks if the example dictionary has an input key and whether it contains a value.\n","    context += f\"Input:{example['input']}\\n\"\n","  context += 'Answer: '\n","  target = example['output']\n","  return {\"context\": context , \"target\":target}  # This is the format of json data.\n","\n","\n","\n","data_list = []\n","for item in all_dataset.to_pandas().itertuples():    #Iterates over each row of the dataset all_dataset, which has been converted into a Pandas DataFrame using .to_pandas().\n","  tmp = {}\n","  tmp['instruction'] = item.instruction\n","  tmp['input'] = item.input\n","  tmp['output'] = item.output\n","  data_list.append(tmp)"],"metadata":{"id":"FHv7KAtVSdMI"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["This is what the elements in data_list look like before formatting\n","\n","---\n","\n"],"metadata":{"id":"u8pPeWBkdOum"}},{"cell_type":"code","source":["data_list[0]"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"cootm_jhch6O","executionInfo":{"status":"ok","timestamp":1727628988495,"user_tz":240,"elapsed":735,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"87643703-7afe-422b-fd55-16cbd17b83fe"},"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/plain":["{'instruction': 'What is the sentiment of this tweet? Please choose an answer from {negative/neutral/positive}.',\n"," 'input': '$DRIP $LABU $GASX - SOXL, LABU, JO and GUSH among weekly ETF movers https://t.co/FntrWNY9sn',\n"," 'output': 'neutral'}"]},"metadata":{},"execution_count":13}]},{"cell_type":"code","source":["# save to a json file\n","with open(\"../data/dataset_new.jsonl\",'w') as f:\n","  for example in tqdm(data_list,desc = 'formatting..'):\n","    f.write(json.dumps(format_examle(example)) + '\\n')"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":49,"referenced_widgets":["d186891419fe4cdbb29e8c9bcd27d4a7","f36ca85863f84e51a9c3a71c6401fbb0","722a1da6a59a4812991fd5a3646531f8","7f338c915d2a4154b9790c5a9c6a42ea","c6182617918f403595c72c143ebb7697","64660f224299457c9d22603cb3f5c842","277186ade77242bfa3f8095adb0935b9","301c3b91250444d88cf91137e7a2edf5","87e313fe3c1c4f0bb0f44bc61bb12eb1","3e584353238d4abdac8cadb2ef9f19b4","4d44f66f788e460083bf2f8ba569706a"]},"id":"S6qo2PPueXG0","executionInfo":{"status":"ok","timestamp":1727628992205,"user_tz":240,"elapsed":380,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"7a165fb1-ec76-4d40-ba59-6da918ff3f96"},"execution_count":null,"outputs":[{"output_type":"display_data","data":{"text/plain":["formatting..:   0%|          | 0/19086 [00:00<?, ?it/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"d186891419fe4cdbb29e8c9bcd27d4a7"}},"metadata":{}}]},{"cell_type":"code","source":["json_data_list = []  # Var to save json data\n","\n","# Save to a jsonl file and store in json_data_list\n","with open(\"../data/dataset_new.jsonl\", 'r') as f:\n","    for line in f:\n","        json_line = json.loads(line.strip())\n","        json_data_list.append(json_line)"],"metadata":{"id":"HHsyl1zPgC77"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["This is what it is look like after formatting"],"metadata":{"id":"2h7lzIE0hHJF"}},{"cell_type":"code","source":["json_data_list[0]"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"k-032c77gzF1","executionInfo":{"status":"ok","timestamp":1727629002683,"user_tz":240,"elapsed":339,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"c7dc71e2-6296-4d73-ec29-3a0212842295"},"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/plain":["{'context': 'Instruction:What is the sentiment of this tweet? Please choose an answer from {negative/neutral/positive}.\\nInput:$DRIP $LABU $GASX - SOXL, LABU, JO and GUSH among weekly ETF movers https://t.co/FntrWNY9sn\\nAnswer: ',\n"," 'target': 'neutral'}"]},"metadata":{},"execution_count":16}]},{"cell_type":"code","source":["json_data_list[0]['context']"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":36},"id":"elRL-VkVqQNf","executionInfo":{"status":"ok","timestamp":1727629005547,"user_tz":240,"elapsed":325,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"05ea8534-f23e-4d75-cf02-300aa43a21fb"},"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/plain":["'Instruction:What is the sentiment of this tweet? Please choose an answer from {negative/neutral/positive}.\\nInput:$DRIP $LABU $GASX - SOXL, LABU, JO and GUSH among weekly ETF movers https://t.co/FntrWNY9sn\\nAnswer: '"],"application/vnd.google.colaboratory.intrinsic+json":{"type":"string"}},"metadata":{},"execution_count":17}]},{"cell_type":"code","source":["json_data_list[0]['target']"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":36},"id":"U5za7_xYqWYP","executionInfo":{"status":"ok","timestamp":1727629006998,"user_tz":240,"elapsed":351,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"f11b1549-8f62-4742-ef31-cd58e6f955af"},"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/plain":["'neutral'"],"application/vnd.google.colaboratory.intrinsic+json":{"type":"string"}},"metadata":{},"execution_count":18}]},{"cell_type":"markdown","source":["login to HF to use Llama 3"],"metadata":{"id":"SqZapShIy_Lq"}},{"cell_type":"markdown","source":["### 2.2 Tokenization"],"metadata":{"id":"QHCUCE7-U0VV"}},{"cell_type":"markdown","source":["Tokenization is the process of converting input text into tokens that can be fed into the model."],"metadata":{"id":"SURNzAL0hoY-"}},{"cell_type":"code","source":["## need to set the packages to run this code block\n","!pip install protobuf transformers==4.30.2 cpm_kernels torch>=2.0 gradio mdtex2html sentencepiece accelerate"],"metadata":{"id":"_t08UOLohoJq"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from transformers import AutoTokenizer, AutoConfig"],"metadata":{"id":"37DThz-phmHj","colab":{"base_uri":"https://localhost:8080/","height":67,"referenced_widgets":["2a119723664347af9b320ec7bd9de1cb","a3b6277c83ce4981bd7eca6a5c2d8104","ffe02caf5f8d42c1ad64110207e30021","477db912b0454a96b77bb96a2d907c43","ecfa1ed61321472db260eb29af6be2ba","9a1984db57404860b14f3af434796cae","6c82a861d86e48c9b46ec2455dfdff7d","a1c5fad783b5412ba836909cd85d49c6","d25fbd1d965c48b9b1c16c859fde464c","5476179897a84305bd652c02a5106a43","f1ad03c919644c25b9fcdf307b989c7a"]},"executionInfo":{"status":"ok","timestamp":1727629038091,"user_tz":240,"elapsed":776,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"dbc9f1fa-d526-49f8-bfcf-42eabfb02dc0"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stderr","text":["The cache for model files in Transformers v4.22.0 has been updated. Migrating your old cache. This is a one-time only operation. You can interrupt this and resume the migration later on by calling `transformers.utils.move_cache()`.\n"]},{"output_type":"display_data","data":{"text/plain":["0it [00:00, ?it/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"2a119723664347af9b320ec7bd9de1cb"}},"metadata":{}}]},{"cell_type":"code","source":["model_name = 'meta-llama/Meta-Llama-3-8B'   #Specifies the model you're working with\n","jsonl_path = '../data/dataset_new.jsonl'\n","save_path = '../data/dataset_new'    #The path where the processed dataset will be saved after tokenization or any other processing\n","max_seq_length = 512    #Maximum sequence length for the inputs. If an input exceeds this length, it will either be truncated or skipped.\n","skip_overlength = True    #A flag that determines whether to skip overlength examples that exceed max_seq_length"],"metadata":{"id":"v00HBZ_zj4Ve"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["This preprocess function tokenizes the promt and target, combines them into Input ids, trims or pads the squence to the maximum squence length."],"metadata":{"id":"ZTsS1aeimfNR"}},{"cell_type":"code","source":["def preprocess(tokenizer, config, example, max_seq_length):\n","  prompt = example['context']\n","  target = example['target']\n","  prompt_ids = tokenizer.encode(   #ids refers to the numerical identifiers that correspond to tokens.These token ids are what the model processes, as models require numerical input rather than raw text.\n","      prompt,\n","      max_length = max_seq_length,\n","      truncation = True\n","      )\n","  target_ids = tokenizer.encode(\n","      target,\n","      max_length = max_seq_length,\n","      truncation = True,\n","      add_special_tokens = False\n","      )\n","  input_ids = prompt_ids + target_ids + [config.eos_token_id]  #[config.eos_token_id] is a sign that marks the end of the list.\n","  return {'input_ids':input_ids,'seq_len':len(prompt_ids)}"],"metadata":{"id":"4vq6aOkOkVRg"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)\n","config = AutoConfig.from_pretrained(model_name, trust_remote_code=True, device_map='auto')"],"metadata":{"id":"-KJikX-D2cRC"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["example = json_data_list[0]\n","prompt = example['context']\n","target = example['target']"],"metadata":{"id":"0-SCMNMA2deK"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["example['target']"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":36},"id":"vr_1HqJG221U","executionInfo":{"status":"ok","timestamp":1727633103969,"user_tz":240,"elapsed":364,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"7b9a8f1d-2d3e-4448-888b-6d50e3046821"},"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/plain":["'neutral'"],"application/vnd.google.colaboratory.intrinsic+json":{"type":"string"}},"metadata":{},"execution_count":47}]},{"cell_type":"markdown","source":["input_ids is a complete list of token IDs that combines the input sentence (prompt), the target sentence (target), and the end-of-sequence token (eos_token_id).\n","This list is fed into the model for training or inference. The model uses these IDs to understand and process the input and generate the corresponding output."],"metadata":{"id":"leOtS6SuwKF6"}},{"cell_type":"markdown","source":["The read_jsonl function reads each line from the JSONL file, preprocesses it using the preprocess function,\n","and then yields each preprocessed example."],"metadata":{"id":"oTN9ClZMwSf-"}},{"cell_type":"code","source":["def read_jsonl(path, max_seq_length, skip_overlength=False):\n","    tokenizer = AutoTokenizer.from_pretrained(    #Initializes a tokenizer using a pre-trained model specified by model_name.\n","        model_name, trust_remote_code=True)\n","    config = AutoConfig.from_pretrained(    #Loads the configuration for the model. device_map='auto' helps automatically map the model to available devices (e.g., GPU or CPU).\n","        model_name, trust_remote_code=True, device_map='auto')\n","    with open(path, \"r\") as f:\n","        for line in tqdm(f.readlines()):\n","            example = json.loads(line)\n","            #Preprocesses each example by tokenizing it and converting it into input_ids using the preprocess() function,\n","            #which takes the tokenizer, config, example, and max_seq_length as inputs.\n","            feature = preprocess(tokenizer, config, example, max_seq_length)\n","            if skip_overlength and len(feature[\"input_ids\"]) > max_seq_length:\n","                continue\n","            feature[\"input_ids\"] = feature[\"input_ids\"][:max_seq_length]  #Truncates the input_ids to ensure they do not exceed max_seq_length.\n","            yield feature\n","#Uses yield to return one preprocessed feature at a time, making the function a generator.\n","#This allows you to iterate over the processed features one by one without loading everything into memory at once."],"metadata":{"id":"dPgs5ecEwQGS"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["### 2.3 Save the Dataset"],"metadata":{"id":"OiIr5nLhx8PY"}},{"cell_type":"code","source":["save_path = './data/dataset_new'"],"metadata":{"id":"jTsJEl9UnmWV"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["dataset = datasets.Dataset.from_generator(\n","    lambda: read_jsonl(jsonl_path, max_seq_length, skip_overlength)\n","    )\n","dataset.save_to_disk(save_path)"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":169,"referenced_widgets":["3fbdc5eb0ad649a6a2185ff5c01447c9","7d509c994d3048fe9081bd8afc1f9526","b501b74a56fc43418d098bf6b3703714","aa1f17b5e387471cb3ff8f918603cc01","72fadabe43304723bfa05ec9a66c680f","009f988c42ba4b07858abc62a8ff4ae7","0c15c3a41f3442f2b6c5ef2f9e91c261","3f600d79bd094f939727c8dba98c492e","6c9745bcf8f24781a3588a8223335bd7","d742c04e26cc46cf87f147df32af90ad","9c88941c7caf48398e19f301dfaa3f32","ff32afd0b67e4372b32e39bee4732632","2e1250d4e7b34c408cf2d0e76f104930","7d45b0ee63af4055b3884ee8cc0e247d","1671dd31d0e94fce84b7e30df924162b","efd665b309c645d195860f4b23f68fd0","e5e4826e0ba74aa39c850aa686e02953","e3d54027f0eb4131b722e01ffc1a75c5","fc28cafadc2943b394983991aa222f2c","08f7b66e545e48ab9844b5f6ed53a658","0af158b6dab8447bb7a8e46371df6044","4b50a26daa1440fe93a46b062a5b353c","d9c98c221ca34fb0bcd10ffe057e4b1a","c17f202789cc4b0bbd379c6c56a23f6d","b7901d36d93f4fbdbe54369ea4be8968","da205f761a7e436983e08f9521384875","f7690f61b1384ace8e4e0a3e3e2e78d9","13f5be0753d54f5e9793a436bfc2c807","dc432aa357d640d3a57690bfbb30382e","d8a361c3653b456c9fe2834c5bbdc994","e181354052df46f2bbf78c6c64b90f66","358d62623bda45488c95cd035f2d3e39","2689554243194d24880808231936db58"]},"id":"D24yK-E8ynIh","executionInfo":{"status":"ok","timestamp":1727634162475,"user_tz":240,"elapsed":9684,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"0bc4dbbf-2beb-4bee-d311-5d7262144a55"},"execution_count":null,"outputs":[{"output_type":"display_data","data":{"text/plain":["Generating train split: 0 examples [00:00, ? examples/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"3fbdc5eb0ad649a6a2185ff5c01447c9"}},"metadata":{}},{"output_type":"stream","name":"stderr","text":["/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py:1150: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.\n","  warnings.warn(\n"]},{"output_type":"display_data","data":{"text/plain":["  0%|          | 0/19086 [00:00<?, ?it/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"ff32afd0b67e4372b32e39bee4732632"}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":["Saving the dataset (0/1 shards):   0%|          | 0/19086 [00:00<?, ? examples/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"d9c98c221ca34fb0bcd10ffe057e4b1a"}},"metadata":{}}]},{"cell_type":"code","source":["from datasets import load_from_disk\n","\n","# Load Dataset\n","loaded_dataset = load_from_disk('./data/dataset_new')\n","\n","# Check the structure of Dataset\n","print(loaded_dataset)\n","\n","# Print the first sample of the dataset\n","print(loaded_dataset['input_ids'][0])"],"metadata":{"id":"DM_V5ZZqiLJV"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["### 2.4 Save dataset to your own google drive\n","\n","Every time you restart colab, you don't have to reformat the data, you can just load the formatted data directly from this google drive."],"metadata":{"id":"a67Trw8LgCqo"}},{"cell_type":"code","source":["from google.colab import drive\n","drive.mount('/content/drive') #You'll be asked to authorize access to your Google Drive"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"hGlXnW9mf7qi","executionInfo":{"status":"ok","timestamp":1727634274367,"user_tz":240,"elapsed":31765,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"f625e017-521a-4ba4-9d66-c0fb556a5fbf"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Mounted at /content/drive\n"]}]},{"cell_type":"code","source":["save_path = '/content/drive/MyDrive/Colab Notebooks/AI4Finance/FinGPT/FinGPT: Training with LoRA and Llama-3/dataset_new' #Change to your own address\n","# Write your own Google drive saving address in xxxxxxxx part: '/content/drive/MyDrive/xxxxxxxxxxxxxxxxx/dataset_new'\n","dataset.save_to_disk(save_path)"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","referenced_widgets":["08b1a8f1a78b43cc9fcadfbd62b8c640","0425b5a2fd4d43c7a5c23ce0d871c2bc","d195de0e6ae24554aae7dac017702aa6","925779e4950449468858202aea2e41c5","77c13a2147484f0ba7df11ebe2c3ed05","533cb8875d5244dda8e32d7cbc73ab30","50f8bac5cc714a07841576d2e68a1540","7e088ac4ea01438788ec74e036ba6aa4","e6a724f0076b465ea14da1c66c93514b","3ed33e39bd80437d855a878928198bbc","bcda59cdb6b44c468ec40f25db93e0ed"],"height":49},"id":"WgRQDWYUg3ft","executionInfo":{"status":"ok","timestamp":1727634425692,"user_tz":240,"elapsed":4101,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"62cf9d61-597d-4ffb-f810-ce4687aebf4a"},"execution_count":null,"outputs":[{"output_type":"display_data","data":{"text/plain":["Saving the dataset (0/1 shards):   0%|          | 0/19086 [00:00<?, ? examples/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"08b1a8f1a78b43cc9fcadfbd62b8c640"}},"metadata":{}}]},{"cell_type":"markdown","source":["### 2.5 Load Dataset from google drive\n","\n","Runs directly from here every time you re-login or reconnect."],"metadata":{"id":"QsF548Xdh8mN"}},{"cell_type":"code","source":["from huggingface_hub import login\n","\n","\n","# Login directly with your Token (remember not to share this Token publicly)\n","login(token=hf_token)"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"7NWI3s_5Eqme","executionInfo":{"status":"ok","timestamp":1727741485251,"user_tz":240,"elapsed":378,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"06b5e19f-baee-4153-cfba-67db35d42197"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["The token has not been saved to the git credentials helper. Pass `add_to_git_credential=True` in this function directly or `--add-to-git-credential` if using via `huggingface-cli` if you want to set the git credential as well.\n","Token is valid (permission: write).\n","Your token has been saved to /root/.cache/huggingface/token\n","Login successful\n"]}]},{"cell_type":"code","source":["!pip install datasets\n","from datasets import load_from_disk\n","from google.colab import drive\n","\n","drive.mount('/content/drive') #You'll be asked to authorize access to your Google Drive\n","\n","save_path = '/content/drive/MyDrive/Colab Notebooks/AI4Finance/FinGPT/FinGPT: Training with LoRA and Llama-3/dataset_new' #Change to your own address\n","# Load saved dataset\n","loaded_dataset = load_from_disk(save_path)"],"metadata":{"id":"Vo6-EMOAiCPp","executionInfo":{"status":"ok","timestamp":1727741286234,"user_tz":240,"elapsed":48213,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"colab":{"base_uri":"https://localhost:8080/"},"outputId":"4db9c05a-c028-4853-eb84-4984aa66236f"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Collecting datasets\n","  Downloading datasets-3.0.1-py3-none-any.whl.metadata (20 kB)\n","Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from datasets) (3.16.1)\n","Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from datasets) (1.26.4)\n","Collecting pyarrow>=15.0.0 (from datasets)\n","  Downloading pyarrow-17.0.0-cp310-cp310-manylinux_2_28_x86_64.whl.metadata (3.3 kB)\n","Collecting dill<0.3.9,>=0.3.0 (from datasets)\n","  Downloading dill-0.3.8-py3-none-any.whl.metadata (10 kB)\n","Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from datasets) (2.1.4)\n","Requirement already satisfied: requests>=2.32.2 in /usr/local/lib/python3.10/dist-packages (from datasets) (2.32.3)\n","Requirement already satisfied: tqdm>=4.66.3 in /usr/local/lib/python3.10/dist-packages (from datasets) (4.66.5)\n","Collecting xxhash (from datasets)\n","  Downloading xxhash-3.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (12 kB)\n","Collecting multiprocess (from datasets)\n","  Downloading multiprocess-0.70.17-py310-none-any.whl.metadata (7.2 kB)\n","Requirement already satisfied: fsspec<=2024.6.1,>=2023.1.0 in /usr/local/lib/python3.10/dist-packages (from fsspec[http]<=2024.6.1,>=2023.1.0->datasets) (2024.6.1)\n","Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from datasets) (3.10.5)\n","Requirement already satisfied: huggingface-hub>=0.22.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (0.24.7)\n","Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from datasets) (24.1)\n","Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from datasets) (6.0.2)\n","Requirement already satisfied: aiohappyeyeballs>=2.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (2.4.0)\n","Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.3.1)\n","Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (24.2.0)\n","Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.4.1)\n","Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (6.1.0)\n","Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.11.1)\n","Requirement already satisfied: async-timeout<5.0,>=4.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (4.0.3)\n","Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.22.0->datasets) (4.12.2)\n","Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.32.2->datasets) (3.3.2)\n","Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.32.2->datasets) (3.10)\n","Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.32.2->datasets) (2.2.3)\n","Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.32.2->datasets) (2024.8.30)\n","INFO: pip is looking at multiple versions of multiprocess to determine which version is compatible with other requirements. This could take a while.\n","  Downloading multiprocess-0.70.16-py310-none-any.whl.metadata (7.2 kB)\n","Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2.8.2)\n","Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2024.2)\n","Requirement already satisfied: tzdata>=2022.1 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2024.1)\n","Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.2->pandas->datasets) (1.16.0)\n","Downloading datasets-3.0.1-py3-none-any.whl (471 kB)\n","\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m471.6/471.6 kB\u001b[0m \u001b[31m8.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hDownloading dill-0.3.8-py3-none-any.whl (116 kB)\n","\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m116.3/116.3 kB\u001b[0m \u001b[31m7.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hDownloading pyarrow-17.0.0-cp310-cp310-manylinux_2_28_x86_64.whl (39.9 MB)\n","\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m39.9/39.9 MB\u001b[0m \u001b[31m59.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hDownloading multiprocess-0.70.16-py310-none-any.whl (134 kB)\n","\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.8/134.8 kB\u001b[0m \u001b[31m10.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hDownloading xxhash-3.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (194 kB)\n","\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m194.1/194.1 kB\u001b[0m \u001b[31m13.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hInstalling collected packages: xxhash, pyarrow, dill, multiprocess, datasets\n","  Attempting uninstall: pyarrow\n","    Found existing installation: pyarrow 14.0.2\n","    Uninstalling pyarrow-14.0.2:\n","      Successfully uninstalled pyarrow-14.0.2\n","\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n","cudf-cu12 24.4.1 requires pyarrow<15.0.0a0,>=14.0.1, but you have pyarrow 17.0.0 which is incompatible.\u001b[0m\u001b[31m\n","\u001b[0mSuccessfully installed datasets-3.0.1 dill-0.3.8 multiprocess-0.70.16 pyarrow-17.0.0 xxhash-3.5.0\n","Mounted at /content/drive\n"]}]},{"cell_type":"code","source":["# Check the structure of Dataset\n","print(loaded_dataset)\n","\n","# Print the first sample of the dataset\n","print(loaded_dataset['input_ids'][0])"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"OgoD1tc4mhiT","executionInfo":{"status":"ok","timestamp":1727741290941,"user_tz":240,"elapsed":353,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"eafd6968-8cd4-4bda-d413-c4e7976d53e7"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Dataset({\n","    features: ['input_ids', 'seq_len'],\n","    num_rows: 19086\n","})\n","[128000, 17077, 25, 3923, 374, 279, 27065, 315, 420, 12072, 30, 5321, 5268, 459, 4320, 505, 314, 43324, 14, 60668, 14, 31587, 28374, 2566, 22444, 7842, 3378, 400, 20257, 52, 400, 38, 1950, 55, 482, 5745, 37630, 11, 32074, 52, 11, 10458, 323, 480, 20088, 4315, 17496, 54163, 96454, 3788, 1129, 83, 6973, 12598, 77, 376, 54, 23923, 24, 9810, 198, 16533, 25, 220, 60668, 128001]\n"]}]},{"cell_type":"markdown","source":["The output of this code block above should be:\n","\n","Dataset({\n","  \n","    features: ['input_ids', 'seq_len'],\n","\n","    num_rows: 19086\n","\n","})\n","\n","[128000, 17077, 25, 3923, 374, 279, 27065, 315, 420, 12072, 30, 5321, 5268, 459, 4320, 505, 314, 43324, 14, 60668, 14, 31587, 28374, 2566, 22444, 7842, 3378, 400, 20257, 52, 400, 38, 1950, 55, 482, 5745, 37630, 11, 32074, 52, 11, 10458, 323, 480, 20088, 4315, 17496, 54163, 96454, 3788, 1129, 83, 6973, 12598, 77, 376, 54, 23923, 24, 9810, 198, 16533, 25, 220, 60668, 128001]\n","\n","说明数据正确的被加载"],"metadata":{"id":"Ppd5PszSUQLs"}},{"cell_type":"markdown","source":["## Part 3: Setup FinGPT training with LoRA and Llama-3\n"],"metadata":{"id":"6e_SkszzBgOS"}},{"cell_type":"markdown","source":["### 3.1 Training Arguments Setup:\n","Initialize and set training arguments."],"metadata":{"id":"AWnNrvzXByt8"}},{"cell_type":"code","source":["!pip install accelerate\n","!pip install -U bitsandbytes\n","!pip install loguru\n","!pip install --upgrade peft\n","!pip install transformers==4.40.1"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":1000},"id":"heUtAghtDa1s","outputId":"3db9c61f-de86-4ed9-9f66-74aa0ea3fd93","executionInfo":{"status":"ok","timestamp":1727663619445,"user_tz":240,"elapsed":18478,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}}},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Requirement already satisfied: accelerate in /usr/local/lib/python3.10/dist-packages (0.34.2)\n","Requirement already satisfied: numpy<3.0.0,>=1.17 in /usr/local/lib/python3.10/dist-packages (from accelerate) (1.26.4)\n","Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from accelerate) (24.1)\n","Requirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from accelerate) (5.9.5)\n","Requirement already satisfied: pyyaml in /usr/local/lib/python3.10/dist-packages (from accelerate) (6.0.2)\n","Requirement already satisfied: torch>=1.10.0 in /usr/local/lib/python3.10/dist-packages (from accelerate) (2.4.1+cu121)\n","Requirement already satisfied: huggingface-hub>=0.21.0 in /usr/local/lib/python3.10/dist-packages (from accelerate) (0.24.7)\n","Requirement already satisfied: safetensors>=0.4.3 in /usr/local/lib/python3.10/dist-packages (from accelerate) (0.4.5)\n","Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.21.0->accelerate) (3.16.1)\n","Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.21.0->accelerate) (2024.6.1)\n","Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.21.0->accelerate) (2.32.3)\n","Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.21.0->accelerate) (4.66.5)\n","Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.21.0->accelerate) (4.12.2)\n","Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (1.13.3)\n","Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (3.3)\n","Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (3.1.4)\n","Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch>=1.10.0->accelerate) (2.1.5)\n","Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.21.0->accelerate) (3.3.2)\n","Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.21.0->accelerate) (3.10)\n","Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.21.0->accelerate) (2.2.3)\n","Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.21.0->accelerate) (2024.8.30)\n","Requirement already satisfied: mpmath<1.4,>=1.1.0 in /usr/local/lib/python3.10/dist-packages (from sympy->torch>=1.10.0->accelerate) (1.3.0)\n","Requirement already satisfied: bitsandbytes in /usr/local/lib/python3.10/dist-packages (0.44.0)\n","Requirement already satisfied: torch in /usr/local/lib/python3.10/dist-packages (from bitsandbytes) (2.4.1+cu121)\n","Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from bitsandbytes) (1.26.4)\n","Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from torch->bitsandbytes) (3.16.1)\n","Requirement already satisfied: typing-extensions>=4.8.0 in /usr/local/lib/python3.10/dist-packages (from torch->bitsandbytes) (4.12.2)\n","Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch->bitsandbytes) (1.13.3)\n","Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch->bitsandbytes) (3.3)\n","Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch->bitsandbytes) (3.1.4)\n","Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from torch->bitsandbytes) (2024.6.1)\n","Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch->bitsandbytes) (2.1.5)\n","Requirement already satisfied: mpmath<1.4,>=1.1.0 in /usr/local/lib/python3.10/dist-packages (from sympy->torch->bitsandbytes) (1.3.0)\n","Requirement already satisfied: loguru in /usr/local/lib/python3.10/dist-packages (0.7.2)\n","Requirement already satisfied: peft in /usr/local/lib/python3.10/dist-packages (0.13.0)\n","Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from peft) (1.26.4)\n","Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from peft) (24.1)\n","Requirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from peft) (5.9.5)\n","Requirement already satisfied: pyyaml in /usr/local/lib/python3.10/dist-packages (from peft) (6.0.2)\n","Requirement already satisfied: torch>=1.13.0 in /usr/local/lib/python3.10/dist-packages (from peft) (2.4.1+cu121)\n","Requirement already satisfied: transformers in /usr/local/lib/python3.10/dist-packages (from peft) (4.30.2)\n","Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (from peft) (4.66.5)\n","Requirement already satisfied: accelerate>=0.21.0 in /usr/local/lib/python3.10/dist-packages (from peft) (0.34.2)\n","Requirement already satisfied: safetensors in /usr/local/lib/python3.10/dist-packages (from peft) (0.4.5)\n","Requirement already satisfied: huggingface-hub>=0.17.0 in /usr/local/lib/python3.10/dist-packages (from peft) (0.24.7)\n","Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.17.0->peft) (3.16.1)\n","Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.17.0->peft) (2024.6.1)\n","Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.17.0->peft) (2.32.3)\n","Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.17.0->peft) (4.12.2)\n","Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch>=1.13.0->peft) (1.13.3)\n","Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch>=1.13.0->peft) (3.3)\n","Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch>=1.13.0->peft) (3.1.4)\n","Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from transformers->peft) (2024.9.11)\n","Requirement already satisfied: tokenizers!=0.11.3,<0.14,>=0.11.1 in /usr/local/lib/python3.10/dist-packages (from transformers->peft) (0.13.3)\n","Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch>=1.13.0->peft) (2.1.5)\n","Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.17.0->peft) (3.3.2)\n","Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.17.0->peft) (3.10)\n","Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.17.0->peft) (2.2.3)\n","Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.17.0->peft) (2024.8.30)\n","Requirement already satisfied: mpmath<1.4,>=1.1.0 in /usr/local/lib/python3.10/dist-packages (from sympy->torch>=1.13.0->peft) (1.3.0)\n","Collecting transformers==4.40.1\n","  Using cached transformers-4.40.1-py3-none-any.whl.metadata (137 kB)\n","Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from transformers==4.40.1) (3.16.1)\n","Requirement already satisfied: huggingface-hub<1.0,>=0.19.3 in /usr/local/lib/python3.10/dist-packages (from transformers==4.40.1) (0.24.7)\n","Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from transformers==4.40.1) (1.26.4)\n","Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from transformers==4.40.1) (24.1)\n","Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from transformers==4.40.1) (6.0.2)\n","Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from transformers==4.40.1) (2024.9.11)\n","Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from transformers==4.40.1) (2.32.3)\n","Collecting tokenizers<0.20,>=0.19 (from transformers==4.40.1)\n","  Using cached tokenizers-0.19.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.7 kB)\n","Requirement already satisfied: safetensors>=0.4.1 in /usr/local/lib/python3.10/dist-packages (from transformers==4.40.1) (0.4.5)\n","Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.10/dist-packages (from transformers==4.40.1) (4.66.5)\n","Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0,>=0.19.3->transformers==4.40.1) (2024.6.1)\n","Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0,>=0.19.3->transformers==4.40.1) (4.12.2)\n","Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->transformers==4.40.1) (3.3.2)\n","Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->transformers==4.40.1) (3.10)\n","Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->transformers==4.40.1) (2.2.3)\n","Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->transformers==4.40.1) (2024.8.30)\n","Using cached transformers-4.40.1-py3-none-any.whl (9.0 MB)\n","Using cached tokenizers-0.19.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB)\n","Installing collected packages: tokenizers, transformers\n","  Attempting uninstall: tokenizers\n","    Found existing installation: tokenizers 0.13.3\n","    Uninstalling tokenizers-0.13.3:\n","      Successfully uninstalled tokenizers-0.13.3\n","  Attempting uninstall: transformers\n","    Found existing installation: transformers 4.30.2\n","    Uninstalling transformers-4.30.2:\n","      Successfully uninstalled transformers-4.30.2\n","Successfully installed tokenizers-0.19.1 transformers-4.40.1\n"]},{"output_type":"display_data","data":{"application/vnd.colab-display-data+json":{"pip_warning":{"packages":["transformers"]},"id":"c7102b135379415a95dd0bf7fdbc2664"}},"metadata":{}}]},{"cell_type":"code","source":["from typing import List, Dict, Optional\n","import torch\n","from loguru import logger\n","from transformers import (\n","    AutoModel,\n","    AutoTokenizer,\n","    TrainingArguments,\n","    Trainer,\n","    BitsAndBytesConfig,\n","    AutoModelForCausalLM\n",")\n","from peft import (\n","    TaskType,\n","    LoraConfig,\n","    get_peft_model,\n","    set_peft_model_state_dict,\n","    prepare_model_for_kbit_training,\n",")\n","from peft.utils import TRANSFORMERS_MODELS_TO_LORA_TARGET_MODULES_MAPPING\n","from transformers import LlamaForCausalLM"],"metadata":{"id":"PXSfDpGE5zQt"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["Note: This will report error with newest torch and CUDA version.\n","\n","is_bitsandbytes_available() will return False\n","\n"," and will show:\n","\n","ImportError: Using `load_in_8bit=True` requires Accelerate: `pip install accelerate` and the latest version of bitsandbytes `pip install -i https://test.pypi.org/simple/ bitsandbytes` or pip install bitsandbytes`  \n","\n"," in model loading part.\n","\n","Run\n","\n","!pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 torchaudio==0.13.1+cu116 --extra-index-url https://download.pytorch.org/whl/cu116\n","\n","first to adress the problem."],"metadata":{"id":"31CH3eehsKGG"}},{"cell_type":"code","source":["training_args = TrainingArguments(\n","    output_dir='/content/drive/MyDrive/Colab Notebooks/AI4Finance/FinGPT/FinGPT: Training with LoRA and Llama-3/finetuned_model/',    # Path to save the fine-tuned model\n","    logging_steps = 500,               # Log every 500 steps\n","    # max_steps=10000,                 # Maximum number of training steps (commented out, can be enabled)\n","    num_train_epochs = 2,              # Number of training epochs (train for 2 epochs)\n","    per_device_train_batch_size=4,     # Batch size of 4 for training on each device (GPU/CPU)\n","    gradient_accumulation_steps=8,     # Accumulate gradients for 8 steps before updating weights\n","    learning_rate=1e-4,                # Learning rate set to 1e-4\n","    weight_decay=0.01,                 # Weight decay (L2 regularization) set to 0.01\n","    warmup_steps=1000,                 # Warm up the learning rate for the first 1000 steps\n","    save_steps=500,                    # Save the model every 500 steps\n","    fp16=True,                         # Enable FP16 mixed precision training to save memory and speed up training\n","    # bf16=True,                       # Enable BF16 mixed precision training (commented out)\n","    torch_compile = False,             # Whether to enable Torch compile (`False` means not enabled)\n","    load_best_model_at_end = True,     # Load the best-performing model at the end of training\n","    evaluation_strategy=\"steps\",       # Evaluation strategy is set to evaluate every few steps\n","    remove_unused_columns=False,       # Whether to remove unused columns during training (keep all columns)\n",")\n"],"metadata":{"id":"dayPAldSVcZE"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["### 3.2 Quantization Config Setup:\n","Set quantization configuration to reduce model size without losing significant precision."],"metadata":{"id":"j63Nx-ssCG7a"}},{"cell_type":"code","source":["!pip list | grep bitsandbytes"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"A218CO6pi0nn","executionInfo":{"status":"ok","timestamp":1727659435829,"user_tz":240,"elapsed":1191,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"0bebcff9-6f43-4443-9bc3-c5ca4cb76e49"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["bitsandbytes                     0.44.0\n"]}]},{"cell_type":"code","source":["# quantitative allocation\n","q_config = BitsAndBytesConfig(load_in_4bit=False,\n","                                bnb_4bit_quant_type='nf4',\n","                                bnb_4bit_use_double_quant=True,\n","                                bnb_4bit_compute_dtype=torch.float16\n","                                )"],"metadata":{"id":"mDZbkv53BfnI"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["import os\n","os.environ['PYTORCH_CUDA_ALLOC_CONF'] = 'expandable_segments:True'"],"metadata":{"id":"vWyeniBRMhi1"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["### 3.3 Model Loading & Preparation:\n","Load the base model and tokenizer, and prepare the model for INT8 training.\n","\n","Runtime -> Change runtime type -> A100 GPU\n","\n","Restart runtime and run again if not working"],"metadata":{"id":"ERYZSwgBDkNc"}},{"cell_type":"code","source":["model_name = \"meta-llama/Meta-Llama-3-8B\"\n","tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"LQvQFY1vCeDm","executionInfo":{"status":"ok","timestamp":1727659444186,"user_tz":240,"elapsed":2124,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"8410908e-473a-41c7-cca7-78d0cb1d4254"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stderr","text":["/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py:1150: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.\n","  warnings.warn(\n","/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_token.py:89: UserWarning: \n","The secret `HF_TOKEN` does not exist in your Colab secrets.\n","To authenticate with the Hugging Face Hub, create a token in your settings tab (https://huggingface.co/settings/tokens), set it as secret in your Google Colab and restart your session.\n","You will be able to reuse this secret in all of your notebooks.\n","Please note that authentication is recommended but still optional to access public models or datasets.\n","  warnings.warn(\n","Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\n"]}]},{"cell_type":"code","source":["from transformers.utils import is_bitsandbytes_available\n","is_bitsandbytes_available()"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"IiiQVcVxfet5","executionInfo":{"status":"ok","timestamp":1727659446926,"user_tz":240,"elapsed":463,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"f604877f-ad4d-4fed-ca7d-c7d08aee449d"},"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/plain":["True"]},"metadata":{},"execution_count":10}]},{"cell_type":"code","source":["model = LlamaForCausalLM.from_pretrained(\n","        model_name,\n","        quantization_config = q_config,\n","        trust_remote_code=True,\n","        device_map='auto'\n","    )"],"metadata":{"id":"1xHMJhS4EZnS","colab":{"base_uri":"https://localhost:8080/","height":123,"referenced_widgets":["accdc799fb984c06928a728fc83235f3","da4a447f614c4a7ab4ee0aa2866ce1d8","e94ff7ee9edc4732a15d1fe4ebdee452","cd57c5897c9146b2bb0882711636c186","d5cf4320251d4ef1a43f744ad057f9bc","fdd537bd5c214210892d8de2d6f36cde","9b4f67139c4e474fab9ff5f68841dd1e","098f37019be84aa0b9d9004ee02f6a8b","1d27c47dcffe4cb08e8b9f953ddd06e6","8ca9fc82ec214686bb9f89a950263b11","c827a177aeb84d6886baa707b55873aa"]},"executionInfo":{"status":"ok","timestamp":1727659543900,"user_tz":240,"elapsed":14138,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"05efe260-9850-4606-e330-e4b4bd997523"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stderr","text":["The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.\n","/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py:1150: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.\n","  warnings.warn(\n"]},{"output_type":"display_data","data":{"text/plain":["Loading checkpoint shards:   0%|          | 0/4 [00:00<?, ?it/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"accdc799fb984c06928a728fc83235f3"}},"metadata":{}}]},{"cell_type":"markdown","source":["### 3.4 LoRA Config & Setup"],"metadata":{"id":"oXh4hpVbss4t"}},{"cell_type":"code","source":[],"metadata":{"id":"r7DkLNHosssU"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["def print_trainable_parameters(model):\n","    \"\"\"\n","    Prints the number of trainable parameters in the model.\n","    \"\"\"\n","    trainable_params = 0\n","    all_param = 0\n","    for _, param in model.named_parameters():\n","        all_param += param.numel()\n","        if param.requires_grad:\n","            trainable_params += param.numel()\n","    print(\n","        f\"trainable params: {trainable_params} || all params: {all_param} || trainable%: {100 * trainable_params / all_param}\"\n","    )\n","\n","# LoRA for Llama3\n","target_modules = TRANSFORMERS_MODELS_TO_LORA_TARGET_MODULES_MAPPING['llama']  # Modules for the Llama model\n","lora_config = LoraConfig(\n","    task_type=TaskType.CAUSAL_LM,\n","    inference_mode=False,\n","    r=8,\n","    lora_alpha=32,\n","    lora_dropout=0.1,\n","    target_modules=target_modules,\n","    bias='none',\n",")\n","\n","# Loading LoRA for Llama3 models using PEFT (Parameter-Efficient Fine-Tuning)\n","model = get_peft_model(model, lora_config)\n","\n","# Print the number of trainable parameters\n","print_trainable_parameters(model)"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"FFpy6LwrrB3Z","executionInfo":{"status":"ok","timestamp":1727659582086,"user_tz":240,"elapsed":335,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"05aae0e2-ac6b-49da-8e9d-053b88a717b2"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["trainable params: 3407872 || all params: 4544008192 || trainable%: 0.07499704789264605\n"]}]},{"cell_type":"code","source":["resume_from_checkpoint = None\n","if resume_from_checkpoint is not None:\n","    checkpoint_name = os.path.join(resume_from_checkpoint, 'pytorch_model.bin')\n","    if not os.path.exists(checkpoint_name):\n","        checkpoint_name = os.path.join(\n","            resume_from_checkpoint, 'adapter_model.bin'\n","        )\n","        resume_from_checkpoint = False\n","    if os.path.exists(checkpoint_name):\n","        logger.info(f'Restarting from {checkpoint_name}')\n","        adapters_weights = torch.load(checkpoint_name)\n","        set_peft_model_state_dict(model, adapters_weights)\n","    else:\n","        logger.info(f'Checkpoint {checkpoint_name} not found')"],"metadata":{"id":"8AwgMRgUxpjg"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["model.print_trainable_parameters()"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"CAE5BPkyuit2","executionInfo":{"status":"ok","timestamp":1727659587313,"user_tz":240,"elapsed":338,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"7c5654e3-4492-42f4-8f9e-1f2dc8b5585d"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["trainable params: 3,407,872 || all params: 8,033,669,120 || trainable%: 0.0424\n"]}]},{"cell_type":"markdown","source":["## Part 4: Loading Data and Training FinGPT\n","\n","\n","In this segment, we'll delve into the loading of your pre-processed data, and finally, launch the training of your FinGPT model. Here's a stepwise breakdown of the script provided:\n","\n","\n","\n","*   Need to purchase Google Colab GPU plans, Colab Pro is\n","sufficient or just buy 100 compute units for $10\n","\n"],"metadata":{"id":"eZswfZZ7utGZ"}},{"cell_type":"markdown","source":["### 4.1 Loading Your Data:"],"metadata":{"id":"r23RLTLWu99A"}},{"cell_type":"code","source":["# load data\n","from datasets import load_from_disk\n","import datasets\n","from google.colab import drive\n","\n","drive.mount('/content/drive') # You will be asked to authorize access to your Google Drive\n","\n","save_path = '/content/drive/MyDrive/Colab Notebooks/AI4Finance/FinGPT/FinGPT: Training with LoRA and Llama-3/dataset_new'\n","# Load saved dataset\n","dataset = load_from_disk(save_path)\n","dataset = dataset.train_test_split(0.2, shuffle=True, seed = 42)"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"Grl0YyGtul3W","executionInfo":{"status":"ok","timestamp":1727659594988,"user_tz":240,"elapsed":4665,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"3264cefd-f251-4ed8-ed19-f96467d9a359"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount(\"/content/drive\", force_remount=True).\n"]}]},{"cell_type":"markdown","source":["### 4.2 Training Configuration and Launch:\n","\n","\n","\n","*   Customize the Trainer class for specific loss computation, prediction step, and model-saving methods.\n","*   Define a data collator function to process batches of data during training.\n","*   Set up TensorBoard for logging, instantiate your modified trainer, and begin training.\n","\n","\n"],"metadata":{"id":"fSiYPVACvaFn"}},{"cell_type":"code","source":["import torch.nn.functional as F"],"metadata":{"id":"V9YOr0sRyRT-"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["def data_collator(features: list) -> dict:\n","    # Check if pad_token_id is None, if it is then use eos_token_id as the padding value\n","    if tokenizer.pad_token_id is None:\n","        pad_token_id = tokenizer.eos_token_id  # Use eos_token_id as a fill symbol\n","    else:\n","        pad_token_id = tokenizer.pad_token_id\n","\n","    len_ids = [len(feature[\"input_ids\"]) for feature in features]\n","    longest = max(len_ids)\n","\n","    input_ids = []\n","    labels_list = []\n","\n","    for ids_l, feature in sorted(zip(len_ids, features), key=lambda x: -x[0]):\n","        ids = feature[\"input_ids\"]\n","        seq_len = feature[\"seq_len\"]\n","\n","        # Padding with calculated pad_token_id\n","        labels = (\n","            [pad_token_id] * (seq_len - 1) + ids[(seq_len - 1) :] + [pad_token_id] * (longest - ids_l)\n","        )\n","        ids = ids + [pad_token_id] * (longest - ids_l)\n","\n","        _ids = torch.LongTensor(ids)\n","        labels_list.append(torch.LongTensor(labels))\n","        input_ids.append(_ids)\n","\n","    input_ids = torch.stack(input_ids)\n","    labels = torch.stack(labels_list)\n","\n","    return {\n","        \"input_ids\": input_ids,\n","        \"labels\": labels,\n","    }"],"metadata":{"id":"zZbPLxQt73vf"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from torch.utils.tensorboard import SummaryWriter\n","from transformers.integrations import TensorBoardCallback"],"metadata":{"id":"QZfzIDH1vnDt"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["# Mount Google Drive\n","from google.colab import drive\n","drive.mount('/content/drive')\n","\n","# 创建保存路径\n","import os\n","\n","output_dir = '/content/drive/MyDrive/Colab Notebooks/AI4Finance/FinGPT/FinGPT: Training with LoRA and Llama-3/Model/' # Use your own address\n","os.makedirs(output_dir, exist_ok=True)"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"8bHQI3jsw1rr","executionInfo":{"status":"ok","timestamp":1727659660074,"user_tz":240,"elapsed":1565,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"586ece69-b442-4b2a-9a9e-fe23155a76af"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount(\"/content/drive\", force_remount=True).\n"]}]},{"cell_type":"code","source":[],"metadata":{"id":"4bu-a9bf1gfx"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["# Train\n","# Took about 10 compute units\n","writer = SummaryWriter()\n","trainer = ModifiedTrainer(\n","    model=model,\n","    args=training_args,             # Trainer args\n","    train_dataset=dataset[\"train\"], # Training set\n","    eval_dataset=dataset[\"test\"],   # Testing set\n","    data_collator=data_collator,    # Data Collator\n","    callbacks=[TensorBoardCallback(writer)],\n",")\n","trainer.train()\n","writer.close()\n","\n","\n","# Save model to Google Drive\n","model.save_pretrained(output_dir)"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":217},"id":"NxA4IK_fvxZW","executionInfo":{"status":"ok","timestamp":1727661996241,"user_tz":240,"elapsed":2145440,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"2f9cf8d0-01ac-425e-e588-2d4104ecb134"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stderr","text":["You are adding a <class 'transformers.integrations.integration_utils.TensorBoardCallback'> to the callbacks of this Trainer, but there is already one. The currentlist of callbacks is\n",":DefaultFlowCallback\n","TensorBoardCallback\n"]},{"output_type":"display_data","data":{"text/plain":["<IPython.core.display.HTML object>"],"text/html":["\n","    <div>\n","      \n","      <progress value='954' max='954' style='width:300px; height:20px; vertical-align: middle;'></progress>\n","      [954/954 35:40, Epoch 1/2]\n","    </div>\n","    <table border=\"1\" class=\"dataframe\">\n","  <thead>\n"," <tr style=\"text-align: left;\">\n","      <th>Step</th>\n","      <th>Training Loss</th>\n","      <th>Validation Loss</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <td>500</td>\n","      <td>2.355200</td>\n","      <td>0.004615</td>\n","    </tr>\n","  </tbody>\n","</table><p>"]},"metadata":{}},{"output_type":"stream","name":"stderr","text":["/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py:1150: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.\n","  warnings.warn(\n"]}]},{"cell_type":"markdown","source":["Now your model is trained and saved! You can download it and use it for generating financial insights or any other relevant tasks in the finance domain. The usage of TensorBoard allows you to deeply understand and visualize the training dynamics and performance of your model in real-time."],"metadata":{"id":"_A3Ts9KQCQR2"}},{"cell_type":"markdown","source":["## Part 5: Inference and Benchmarks using FinGPT\n","\n","Now that your model is trained, let’s understand how to use it to infer and run benchmarks.\n","\n","\n","*   Took about 10 compute units\n","\n","\n"],"metadata":{"id":"_1CYlbFPZcwN"}},{"cell_type":"markdown","source":["### 5.1 Load the model"],"metadata":{"id":"QkKYdbVVatvg"}},{"cell_type":"code","source":["!pip install transformers==4.40.1 peft==0.4.0\n","!pip install sentencepiece\n","!pip install accelerate\n","!pip install torch\n","!pip install peft\n","!pip install datasets\n","!pip install bitsandbytes"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"AcAcMqwFCOaY","executionInfo":{"status":"ok","timestamp":1727742474271,"user_tz":240,"elapsed":25892,"user":{"displayName":"Yuncong Liu","userId":"08340999060190968949"}},"outputId":"095f551d-c67e-42f2-ba41-29d69f90e5d1"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Collecting transformers==4.40.1\n","  Downloading transformers-4.40.1-py3-none-any.whl.metadata (137 kB)\n","\u001b[?25l     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/138.0 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K     \u001b[91m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[91m╸\u001b[0m\u001b[90m━\u001b[0m \u001b[32m133.1/138.0 kB\u001b[0m \u001b[31m5.1 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m138.0/138.0 kB\u001b[0m \u001b[31m3.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hRequirement already satisfied: peft==0.4.0 in /usr/local/lib/python3.10/dist-packages (0.4.0)\n","Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from transformers==4.40.1) (3.16.1)\n","Requirement already satisfied: huggingface-hub<1.0,>=0.19.3 in /usr/local/lib/python3.10/dist-packages (from transformers==4.40.1) (0.24.7)\n","Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from transformers==4.40.1) (1.26.4)\n","Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from transformers==4.40.1) (24.1)\n","Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from transformers==4.40.1) (6.0.2)\n","Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from transformers==4.40.1) (2024.9.11)\n","Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from transformers==4.40.1) (2.32.3)\n","Collecting tokenizers<0.20,>=0.19 (from transformers==4.40.1)\n","  Using cached tokenizers-0.19.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.7 kB)\n","Requirement already satisfied: safetensors>=0.4.1 in /usr/local/lib/python3.10/dist-packages (from transformers==4.40.1) (0.4.5)\n","Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.10/dist-packages (from transformers==4.40.1) (4.66.5)\n","Requirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from peft==0.4.0) (5.9.5)\n","Requirement already satisfied: torch>=1.13.0 in /usr/local/lib/python3.10/dist-packages (from peft==0.4.0) (2.4.1+cu121)\n","Requirement already satisfied: accelerate in /usr/local/lib/python3.10/dist-packages (from peft==0.4.0) (0.34.2)\n","Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/di
Download .txt
gitextract_nwpardo3/

├── .github/
│   ├── FUNDING.yml
│   └── ISSUE_TEMPLATE/
│       └── feature_request.md
├── .gitignore
├── .gitpod.yml
├── .idea/
│   └── .gitignore
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── FinGPT_ Training with LoRA and Meta-Llama-3-8B.ipynb
├── FinGPT_Inference_Llama2_13B_falcon_7B_for_Beginners.ipynb
├── FinGPT_Training_LoRA_with_ChatGLM2_6B_for_Beginners.ipynb
├── FinGPT_Training_LoRA_with_ChatGLM2_6B_for_Beginners_v2-2.ipynb
├── LICENSE
├── MANIFEST.in
├── README.md
├── Use_Cases.md
├── figs/
│   └── README.md
├── fingpt/
│   ├── FinGPT_Benchmark/
│   │   ├── __init__.py
│   │   ├── benchmarks/
│   │   │   ├── __init__.py
│   │   │   ├── benchmarks.py
│   │   │   ├── convfinqa.py
│   │   │   ├── evaluate.sh
│   │   │   ├── fineval.py
│   │   │   ├── finred.py
│   │   │   ├── fiqa.py
│   │   │   ├── fpb.py
│   │   │   ├── headline.py
│   │   │   ├── ner.py
│   │   │   ├── nwgi.py
│   │   │   ├── sentiment_templates.txt
│   │   │   └── tfns.py
│   │   ├── config.json
│   │   ├── config_hf.json
│   │   ├── config_new.json
│   │   ├── data/
│   │   │   ├── __init__.py
│   │   │   ├── download.py
│   │   │   └── prepare_data.ipynb
│   │   ├── demo.ipynb
│   │   ├── readme.md
│   │   ├── train.sh
│   │   ├── train_lora.py
│   │   └── utils.py
│   ├── FinGPT_FinancialReportAnalysis/
│   │   ├── README.md
│   │   ├── reportanalysis.ipynb
│   │   └── utils/
│   │       ├── __init__.py
│   │       ├── earning_calls.py
│   │       ├── format_pdf.py
│   │       └── rag.py
│   ├── FinGPT_Forecaster/
│   │   ├── AAAI-Good-Data/
│   │   │   ├── README.md
│   │   │   ├── Testing.ipynb
│   │   │   ├── Training.ipynb
│   │   │   ├── config.json
│   │   │   ├── train.sh
│   │   │   ├── train_lora.py
│   │   │   ├── utils.py
│   │   │   └── yes.gitkeep
│   │   ├── FinGPT-Forecaster-Chinese/
│   │   │   ├── Ashare_data.py
│   │   │   ├── Formulate_training_data.ipynb
│   │   │   ├── Inference_datapipe.py
│   │   │   ├── requirement.txt
│   │   │   ├── train_lora.py
│   │   │   └── utils.py
│   │   ├── README.md
│   │   ├── app.py
│   │   ├── config.json
│   │   ├── data.py
│   │   ├── data_infererence_fetch.py
│   │   ├── data_pipeline.py
│   │   ├── demo.ipynb
│   │   ├── indices.py
│   │   ├── prepare_data.ipynb
│   │   ├── prompt.py
│   │   ├── requirements.txt
│   │   ├── train.sh
│   │   ├── train_lora.py
│   │   └── utils.py
│   ├── FinGPT_MultiAgentsRAG/
│   │   ├── Evaluation_methods/
│   │   │   ├── HaluEval/
│   │   │   │   ├── evaluate.py
│   │   │   │   ├── filtering.py
│   │   │   │   ├── generate.py
│   │   │   │   └── halueval
│   │   │   ├── MMLU/
│   │   │   │   ├── eval_mmlu.py
│   │   │   │   ├── gen_mmlu.py
│   │   │   │   └── mmlu
│   │   │   ├── TruthfulQA/
│   │   │   │   ├── evaluate.py
│   │   │   │   ├── truthfulqa
│   │   │   │   └── utilities.py
│   │   │   └── new_evaluation
│   │   ├── Fine_tune_model/
│   │   │   ├── fine_tune_GLM2.ipynb
│   │   │   ├── fine_tune_Llama2.ipynb
│   │   │   └── newFTmodels
│   │   ├── MultiAgents/
│   │   │   ├── inference_mmlu_Llama2.ipynb
│   │   │   ├── inference_mmlu_Llama2_cleaned.ipynb
│   │   │   ├── inference_mmlu_Llama2_v2.ipynb
│   │   │   └── new_file_multiagents
│   │   ├── RAG/
│   │   │   ├── RAG_part.ipynb
│   │   │   └── new_file_rag
│   │   └── README.md
│   ├── FinGPT_Others/
│   │   ├── FinGPT_Low_Code_Development/
│   │   │   ├── chatgpt-low-code-development-v1/
│   │   │   │   ├── main.ipynb
│   │   │   │   └── readme.md
│   │   │   └── chatgpt-low-code-development-v2/
│   │   │       ├── main.ipynb
│   │   │       └── readme.md
│   │   ├── FinGPT_Robo_Advisor/
│   │   │   ├── chatgpt-robo-advisor-v1/
│   │   │   │   ├── ChatGPT_Robo_Advisor.ipynb
│   │   │   │   ├── ChatGPT_Robo_Advisor_Results.csv
│   │   │   │   ├── README.md
│   │   │   │   └── requirements.txt
│   │   │   └── chatgpt-robo-advisor-v2/
│   │   │       ├── ChatGPT_Robo_Advisor_v2.ipynb
│   │   │       ├── ChatGPT_Robo_Advisor_v2_Results.csv
│   │   │       ├── README.md
│   │   │       ├── data/
│   │   │       │   └── dataset.csv
│   │   │       └── requirements.txt
│   │   ├── FinGPT_Trading/
│   │   │   ├── chatgpt-trading-v1/
│   │   │   │   ├── README.md
│   │   │   │   ├── data/
│   │   │   │   │   ├── dataset.csv
│   │   │   │   │   ├── maotai.csv
│   │   │   │   │   └── maotai_another.csv
│   │   │   │   ├── get_chatgpt_results.ipynb
│   │   │   │   ├── requirements.txt
│   │   │   │   └── trade_with_chatgpt.ipynb
│   │   │   └── chatgpt-trading-v2/
│   │   │       ├── README.md
│   │   │       ├── data/
│   │   │       │   ├── text-curie-001.pkl
│   │   │       │   └── text-davinci-003.pkl
│   │   │       ├── get_gpt_sentiment_results/
│   │   │       │   ├── df.csv
│   │   │       │   ├── get_gpt_res.py
│   │   │       │   └── run.sh
│   │   │       ├── openai_token/
│   │   │       │   └── token_.py
│   │   │       ├── pyfolio/
│   │   │       │   ├── __init__.py
│   │   │       │   ├── _seaborn.py
│   │   │       │   ├── _version.py
│   │   │       │   ├── capacity.py
│   │   │       │   ├── deprecate.py
│   │   │       │   ├── interesting_periods.py
│   │   │       │   ├── ipycompat.py
│   │   │       │   ├── perf_attrib.py
│   │   │       │   ├── plotting.py
│   │   │       │   ├── pos.py
│   │   │       │   ├── round_trips.py
│   │   │       │   ├── tears.py
│   │   │       │   ├── tests/
│   │   │       │   │   ├── __init__.py
│   │   │       │   │   ├── test_capacity.py
│   │   │       │   │   ├── test_nbs.py
│   │   │       │   │   ├── test_perf_attrib.py
│   │   │       │   │   ├── test_pos.py
│   │   │       │   │   ├── test_round_trips.py
│   │   │       │   │   ├── test_tears.py
│   │   │       │   │   ├── test_timeseries.py
│   │   │       │   │   └── test_txn.py
│   │   │       │   ├── timeseries.py
│   │   │       │   ├── txn.py
│   │   │       │   └── utils.py
│   │   │       ├── requirements.txt
│   │   │       └── trade_with_gpt3.ipynb
│   │   └── shares_news_sentiment_classify.py
│   ├── FinGPT_RAG/
│   │   ├── README.md
│   │   ├── __init__.py
│   │   ├── instruct-FinGPT/
│   │   │   ├── README.md
│   │   │   ├── chat.py
│   │   │   ├── convert_llama_weights_to_hf.py
│   │   │   ├── infer.sh
│   │   │   ├── inference/
│   │   │   │   ├── batchbot.py
│   │   │   │   ├── batchbot_torch.py
│   │   │   │   ├── chatbot.py
│   │   │   │   └── f1fromcm.py
│   │   │   ├── load_data.ipynb
│   │   │   ├── nohup.out
│   │   │   ├── train.py
│   │   │   ├── train.sh
│   │   │   └── training/
│   │   │       ├── supervised_finetuning/
│   │   │       │   ├── README.md
│   │   │       │   ├── evaluation_scripts/
│   │   │       │   │   └── run_prompt.sh
│   │   │       │   ├── main.py
│   │   │       │   ├── main_data.py
│   │   │       │   ├── prompt_eval.py
│   │   │       │   └── training_scripts/
│   │   │       │       ├── README.md
│   │   │       │       ├── multi_node/
│   │   │       │       │   ├── run_66b.sh
│   │   │       │       │   ├── run_sent-1.3b.sh
│   │   │       │       │   └── run_sent-llama-7b.sh
│   │   │       │       ├── other_language/
│   │   │       │       │   ├── run_chinese.sh
│   │   │       │       │   └── run_japanese.sh
│   │   │       │       ├── single_gpu/
│   │   │       │       │   ├── run_1.3b.sh
│   │   │       │       │   ├── run_6.7b_lora.sh
│   │   │       │       │   └── run_sent-1.3b.sh
│   │   │       │       └── single_node/
│   │   │       │           ├── run_1.3b.sh
│   │   │       │           ├── run_1.3b_lora.sh
│   │   │       │           ├── run_13b.sh
│   │   │       │           ├── run_30b_lora.sh
│   │   │       │           ├── run_6.7b.sh
│   │   │       │           ├── run_llama-13b.sh
│   │   │       │           ├── run_sent-1.3b.sh
│   │   │       │           ├── run_sent-llama-7b.sh
│   │   │       │           └── run_sent-llama2-7b.sh
│   │   │       └── utils/
│   │   │           ├── data/
│   │   │           │   ├── data_utils.py
│   │   │           │   └── raw_datasets.py
│   │   │           ├── ds_utils.py
│   │   │           ├── model/
│   │   │           │   ├── model_utils.py
│   │   │           │   └── reward_model.py
│   │   │           ├── module/
│   │   │           │   └── lora.py
│   │   │           └── utils.py
│   │   ├── multisource_retrieval/
│   │   │   ├── ChatGPT_sentiment_analysis_benchmark.ipynb
│   │   │   ├── README.md
│   │   │   ├── __init__.py
│   │   │   ├── count_contexts.py
│   │   │   ├── data/
│   │   │   │   ├── sent_valid.csv
│   │   │   │   ├── sent_valid_penultimate_run.csv
│   │   │   │   ├── sent_valid_penultimate_run_classified.csv
│   │   │   │   ├── sent_valid_penultimate_run_classified_classified.csv
│   │   │   │   ├── sent_valid_scraped.csv
│   │   │   │   ├── test.csv
│   │   │   │   └── test_classified.csv
│   │   │   ├── external_LLMs/
│   │   │   │   ├── chatGPT_tokenization.py
│   │   │   │   ├── chatGPT_tokenization.tsx
│   │   │   │   ├── external_LLMs.py
│   │   │   │   └── g4f_tokenization.py
│   │   │   ├── format_checker.py
│   │   │   ├── gui/
│   │   │   │   └── gui.py
│   │   │   ├── manual_classification.py
│   │   │   ├── news_scraper.py
│   │   │   ├── proxies/
│   │   │   │   └── headers.py
│   │   │   ├── requests_url.py
│   │   │   ├── scrapers/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── cnbc/
│   │   │   │   │   └── scrape_cnbc.py
│   │   │   │   ├── google/
│   │   │   │   │   └── scrape_google.py
│   │   │   │   ├── market_screener/
│   │   │   │   │   └── scrape_market_screener.py
│   │   │   │   ├── seeking_alpha/
│   │   │   │   │   ├── SeekingAlpha_Content.ipynb
│   │   │   │   │   ├── __init__.py
│   │   │   │   │   └── seeking_alpha_scraping.py
│   │   │   │   ├── selenium/
│   │   │   │   │   └── selenium_app.py
│   │   │   │   ├── similarity_score.py
│   │   │   │   ├── url_encode.py
│   │   │   │   └── yahoo/
│   │   │   │       └── scrape_yahoo.py
│   │   │   ├── sentence_processing/
│   │   │   │   └── split_sentence.py
│   │   │   └── utils/
│   │   │       ├── classification_accuracy_verification.py
│   │   │       ├── classify_news_sources.py
│   │   │       ├── count_contexts.py
│   │   │       ├── format_checker.py
│   │   │       ├── manual_classification.py
│   │   │       └── sentiment_classification_by_external_LLMs.py
│   │   └── requirements.txt
│   ├── FinGPT_Sentiment_Analysis_v1/
│   │   ├── FinGPT_v1.0/
│   │   │   ├── README.md
│   │   │   ├── data_preparations/
│   │   │   │   ├── FMP/
│   │   │   │   │   ├── FMP.ipynb
│   │   │   │   │   └── S&P 500 Index.xlsx
│   │   │   │   ├── add_labels.py
│   │   │   │   ├── download_content_demo.ipynb
│   │   │   │   ├── download_contents.py
│   │   │   │   ├── download_titles.py
│   │   │   │   └── hs_300.csv
│   │   │   ├── inferencing/
│   │   │   │   ├── cover_alpaca2jsonl.py
│   │   │   │   └── infer.ipynb
│   │   │   ├── making_dataset/
│   │   │   │   ├── change_jsonl_train_and_valid.sh
│   │   │   │   ├── cover_alpaca2jsonl.py
│   │   │   │   ├── make_dataset_by_date.ipynb
│   │   │   │   ├── make_dataset_train_and_valid.sh
│   │   │   │   └── tokenize_dataset_rows.py
│   │   │   ├── requirements.txt
│   │   │   └── training/
│   │   │       ├── finetune.py
│   │   │       └── finetune.sh
│   │   ├── FinGPT_v1.1/
│   │   │   └── README.md
│   │   └── README.md
│   ├── FinGPT_Sentiment_Analysis_v3/
│   │   ├── README.md
│   │   ├── __init__.py
│   │   ├── benchmark/
│   │   │   ├── benchmarks.ipynb
│   │   │   └── benchmarks_llama2_13b.ipynb
│   │   ├── data/
│   │   │   └── making_data.ipynb
│   │   ├── training_8bit/
│   │   │   ├── train_ChatGLM2_6B.ipynb
│   │   │   └── train_Llama2_13B.ipynb
│   │   ├── training_int4/
│   │   │   └── train.ipynb
│   │   └── training_parallel/
│   │       ├── config.json
│   │       ├── train.sh
│   │       └── train_lora.py
│   ├── __init__.py
│   └── readme.md
├── finogrid/
│   ├── README.md
│   ├── agents/
│   │   ├── audit_governance/
│   │   │   └── agent.py
│   │   ├── internal_support/
│   │   │   └── agent.py
│   │   ├── ops_oversight/
│   │   │   └── agent.py
│   │   ├── process_improvement/
│   │   │   └── agent.py
│   │   └── treasury_strategy/
│   │       └── agent.py
│   ├── corridors/
│   │   ├── __init__.py
│   │   ├── argentina/
│   │   │   └── adapter.py
│   │   ├── base.py
│   │   ├── brazil/
│   │   │   └── adapter.py
│   │   ├── india/
│   │   │   └── adapter.py
│   │   ├── indonesia/
│   │   │   └── adapter.py
│   │   ├── nigeria/
│   │   │   └── adapter.py
│   │   ├── philippines/
│   │   │   └── adapter.py
│   │   ├── uae/
│   │   │   └── adapter.py
│   │   └── vietnam/
│   │       └── adapter.py
│   ├── database/
│   │   ├── migrations/
│   │   │   ├── 001_initial_schema.sql
│   │   │   ├── 002_agent_ledger.sql
│   │   │   └── 003_mandate.sql
│   │   └── models/
│   │       ├── __init__.py
│   │       ├── agent_ledger.py
│   │       ├── audit.py
│   │       ├── base.py
│   │       ├── batch.py
│   │       ├── client.py
│   │       ├── execution.py
│   │       ├── instruction.py
│   │       ├── mandate.py
│   │       └── routing.py
│   ├── docs/
│   │   ├── architecture.md
│   │   ├── corridors/
│   │   │   └── nigeria.md
│   │   ├── dr-runbook.md
│   │   └── fingpt_usage_policy.md
│   ├── fingpt_integration/
│   │   ├── __init__.py
│   │   ├── forecaster/
│   │   │   └── corridor_forecaster.py
│   │   ├── minimax_llm_client.py
│   │   ├── rag/
│   │   │   └── knowledge_base.py
│   │   └── sentiment/
│   │       ├── crypto_sentiment.py
│   │       ├── minimax_provider.py
│   │       └── openai_fallback.py
│   ├── mcp/
│   │   ├── bridge/
│   │   │   └── server.py
│   │   ├── identity/
│   │   │   └── server.py
│   │   ├── kya_validator/
│   │   │   ├── __init__.py
│   │   │   └── server.py
│   │   ├── kyt_aml/
│   │   │   └── server.py
│   │   ├── plaid/
│   │   │   ├── __init__.py
│   │   │   └── server.py
│   │   └── wallet_factory/
│   │       ├── __init__.py
│   │       └── server.py
│   ├── requirements.txt
│   ├── sdk/
│   │   └── typescript/
│   │       ├── package.json
│   │       ├── src/
│   │       │   ├── client.test.ts
│   │       │   ├── client.ts
│   │       │   ├── index.ts
│   │       │   └── types.ts
│   │       └── tsconfig.json
│   ├── services/
│   │   ├── agent_ledger_api/
│   │   │   ├── chain_watcher.py
│   │   │   ├── config.py
│   │   │   ├── dependencies.py
│   │   │   ├── intent_sweeper.py
│   │   │   ├── main.py
│   │   │   ├── middleware/
│   │   │   │   ├── __init__.py
│   │   │   │   └── payment_required.py
│   │   │   ├── routers/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── agent_accounts.py
│   │   │   │   ├── health.py
│   │   │   │   ├── kya.py
│   │   │   │   ├── micropay.py
│   │   │   │   ├── payment_intents.py
│   │   │   │   ├── topup.py
│   │   │   │   └── wallets.py
│   │   │   └── schemas.py
│   │   ├── compliance_gate/
│   │   │   └── gate.py
│   │   ├── ingress_api/
│   │   │   ├── config.py
│   │   │   ├── dependencies.py
│   │   │   ├── main.py
│   │   │   ├── routers/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── batches.py
│   │   │   │   ├── health.py
│   │   │   │   ├── onboarding.py
│   │   │   │   └── webhooks.py
│   │   │   └── schemas.py
│   │   ├── ops_console/
│   │   │   ├── __init__.py
│   │   │   ├── config.py
│   │   │   ├── dependencies.py
│   │   │   ├── main.py
│   │   │   └── routers/
│   │   │       ├── __init__.py
│   │   │       ├── agents_explorer.py
│   │   │       ├── approvals.py
│   │   │       ├── corridors.py
│   │   │       ├── exceptions.py
│   │   │       ├── ledger_explorer.py
│   │   │       ├── mandates_console.py
│   │   │       └── search.py
│   │   ├── partner_execution/
│   │   │   ├── bridge_client.py
│   │   │   └── executor.py
│   │   ├── reconciliation/
│   │   │   └── reconciler.py
│   │   └── routing_engine/
│   │       ├── engine.py
│   │       └── worker.py
│   └── tests/
│       ├── __init__.py
│       ├── integration/
│       │   ├── __init__.py
│       │   └── test_minimax_integration.py
│       └── unit/
│           ├── __init__.py
│           ├── test_agent_ledger.py
│           ├── test_corridor_adapters.py
│           ├── test_minimax_provider.py
│           └── test_routing_engine.py
├── requirements.txt
└── setup.py
Download .txt
SYMBOL INDEX (1264 symbols across 184 files)

FILE: fingpt/FinGPT_Benchmark/benchmarks/benchmarks.py
  function main (line 23) | def main(args):

FILE: fingpt/FinGPT_Benchmark/benchmarks/convfinqa.py
  function cvt_text_to_pred (line 15) | def cvt_text_to_pred(text):
  function map_output (line 27) | def map_output(feature):

FILE: fingpt/FinGPT_Benchmark/benchmarks/fineval.py
  function cvt_text_to_pred (line 16) | def cvt_text_to_pred(text):
  function map_output (line 27) | def map_output(feature):
  function test_fineval (line 35) | def test_fineval(args, model, tokenizer):

FILE: fingpt/FinGPT_Benchmark/benchmarks/finred.py
  function cvt_text_to_pred (line 49) | def cvt_text_to_pred(ref, text):
  function map_output (line 66) | def map_output(feature):
  function calc_metric (line 75) | def calc_metric(gt_list, pred_list):
  function test_re (line 104) | def test_re(args, model, tokenizer):

FILE: fingpt/FinGPT_Benchmark/benchmarks/fiqa.py
  function format_example (line 19) | def format_example(example: dict) -> dict:
  function add_instructions (line 27) | def add_instructions(x):
  function make_label (line 33) | def make_label(x):
  function change_target (line 38) | def change_target(x):
  function vote_output (line 46) | def vote_output(x):
  function test_fiqa (line 59) | def test_fiqa(args, model, tokenizer, prompt_fun=add_instructions):
  function test_fiqa_mlt (line 113) | def test_fiqa_mlt(args, model, tokenizer):

FILE: fingpt/FinGPT_Benchmark/benchmarks/fpb.py
  function format_example (line 24) | def format_example(example: dict) -> dict:
  function change_target (line 32) | def change_target(x):
  function vote_output (line 41) | def vote_output(x):
  function test_fpb (line 53) | def test_fpb(args, model, tokenizer, prompt_fun=None):
  function test_fpb_mlt (line 107) | def test_fpb_mlt(args, model, tokenizer):

FILE: fingpt/FinGPT_Benchmark/benchmarks/headline.py
  function binary2multi (line 16) | def binary2multi(dataset):
  function map_output (line 29) | def map_output(feature):
  function test_headline (line 35) | def test_headline(args, model, tokenizer):

FILE: fingpt/FinGPT_Benchmark/benchmarks/ner.py
  function cvt_text_to_pred (line 23) | def cvt_text_to_pred(tokens, text):
  function map_output (line 45) | def map_output(feature):
  function test_ner (line 54) | def test_ner(args, model, tokenizer):

FILE: fingpt/FinGPT_Benchmark/benchmarks/nwgi.py
  function format_example (line 21) | def format_example(example: dict) -> dict:
  function change_target (line 29) | def change_target(x):
  function test_nwgi (line 37) | def test_nwgi(args, model, tokenizer, prompt_fun=None):

FILE: fingpt/FinGPT_Benchmark/benchmarks/tfns.py
  function format_example (line 17) | def format_example(example: dict) -> dict:
  function change_target (line 25) | def change_target(x):
  function test_tfns (line 33) | def test_tfns(args, model, tokenizer, prompt_fun=None):

FILE: fingpt/FinGPT_Benchmark/data/download.py
  function download (line 25) | def download(no_cache: bool = False):

FILE: fingpt/FinGPT_Benchmark/train_lora.py
  function main (line 37) | def main(args):

FILE: fingpt/FinGPT_Benchmark/utils.py
  function get_prompt (line 24) | def get_prompt(template, instruction, input_text):
  function test_mapping (line 48) | def test_mapping(args, feature):
  function tokenize (line 77) | def tokenize(args, tokenizer, feature):
  function parse_model_name (line 134) | def parse_model_name(name, from_remote=False):
  function load_dataset (line 166) | def load_dataset(names, from_remote=False):

FILE: fingpt/FinGPT_FinancialReportAnalysis/utils/earning_calls.py
  function correct_date (line 9) | def correct_date(yr, dt):
  function extract_speakers (line 25) | def extract_speakers(cont: str) -> List[str]:
  function get_earnings_transcript (line 41) | def get_earnings_transcript(quarter: str, ticker: str, year: int):

FILE: fingpt/FinGPT_FinancialReportAnalysis/utils/rag.py
  class Raptor (line 15) | class Raptor:
    method __init__ (line 16) | def __init__(self, model, embed):
    method global_cluster_embeddings (line 20) | def global_cluster_embeddings(
    method local_cluster_embeddings (line 47) | def local_cluster_embeddings(
    method get_optimal_clusters (line 67) | def get_optimal_clusters(
    method GMM_cluster (line 91) | def GMM_cluster(self, embeddings: np.ndarray, threshold: float, random...
    method perform_clustering (line 111) | def perform_clustering(
    method embed (line 186) | def embed(self, texts):
    method embed_cluster_texts (line 204) | def embed_cluster_texts(self, texts):
    method fmt_txt (line 228) | def fmt_txt(self, df: pd.DataFrame) -> str:
    method embed_cluster_summarize_texts (line 242) | def embed_cluster_summarize_texts(
    method recursive_embed_cluster_summarize (line 314) | def recursive_embed_cluster_summarize(
    method text_spliter (line 352) | def text_spliter(self, text, chunk_size_tok=2000, level=1, n_levels=3):

FILE: fingpt/FinGPT_Forecaster/AAAI-Good-Data/train_lora.py
  class GenerationEvalCallback (line 30) | class GenerationEvalCallback(TrainerCallback):
    method __init__ (line 31) | def __init__(self, eval_dataset, ignore_until_epoch=0):
    method on_evaluate (line 35) | def on_evaluate(self, args, state: TrainerState, control: TrainerContr...
  function main (line 72) | def main(args):

FILE: fingpt/FinGPT_Forecaster/AAAI-Good-Data/utils.py
  function tokenize (line 22) | def tokenize(args, tokenizer, feature):
  function parse_model_name (line 49) | def parse_model_name(name, from_remote=False):
  function load_dataset (line 60) | def load_dataset(names, from_hf_hub=False):
  function parse_answer (line 90) | def parse_answer(answer):
  function calc_rouge_score (line 127) | def calc_rouge_score(references, answers):
  function calc_metrics (line 138) | def calc_metrics(answers, gts):

FILE: fingpt/FinGPT_Forecaster/FinGPT-Forecaster-Chinese/Ashare_data.py
  function get_return (line 21) | def get_return(symbol, adjust="qfq"):
  function return_transform (line 58) | def return_transform(ret):
  function get_basic (line 68) | def get_basic(symbol, data):
  function raw_financial_data (line 106) | def raw_financial_data(symbol, with_basics = True):
  function get_company_prompt_new (line 155) | def get_company_prompt_new(symbol):
  function map_return_label (line 169) | def map_return_label(return_lb):
  function check_news_quality (line 193) | def check_news_quality(n, last_n, week_end_date, repeat_rate = 0.6):
  function get_prompt_by_row_new (line 213) | def get_prompt_by_row_new(stock, row):
  function sample_news (line 263) | def sample_news(news, k=5):
  function get_all_prompts_new (line 275) | def get_all_prompts_new(symbol, min_past_week=1, max_past_weeks=2, with_...

FILE: fingpt/FinGPT_Forecaster/FinGPT-Forecaster-Chinese/Inference_datapipe.py
  function get_curday (line 14) | def get_curday():
  function n_weeks_before (line 18) | def n_weeks_before(date_string, n, format = "%Y%m%d"):
  function stock_news_em (line 24) | def stock_news_em(symbol: str = "300059", page = 1) -> pd.DataFrame:
  function get_news (line 88) | def get_news(symbol, max_page = 3):
  function get_cur_return (line 103) | def get_cur_return(symbol, start_date, end_date, adjust="qfq"):
  function cur_financial_data (line 135) | def cur_financial_data(symbol, start_date, end_date, with_basics = True):
  function get_all_prompts_online (line 173) | def get_all_prompts_online(symbol, with_basics=True, max_news_perweek = ...

FILE: fingpt/FinGPT_Forecaster/FinGPT-Forecaster-Chinese/train_lora.py
  class GenerationEvalCallback (line 37) | class GenerationEvalCallback(TrainerCallback):
    method __init__ (line 39) | def __init__(self, eval_dataset, ignore_until_epoch=0):
    method on_evaluate (line 43) | def on_evaluate(self, args, state: TrainerState, control: TrainerContr...
  function main (line 84) | def main(args):

FILE: fingpt/FinGPT_Forecaster/FinGPT-Forecaster-Chinese/utils.py
  function tokenize (line 19) | def tokenize(args, tokenizer, feature):
  function parse_model_name (line 47) | def parse_model_name(name, from_remote=False):
  function load_dataset (line 57) | def load_dataset(names, from_remote=False):
  function parse_answer (line 76) | def parse_answer(answer):
  function calc_rouge_score (line 112) | def calc_rouge_score(references, answers):
  function calc_metrics (line 125) | def calc_metrics(answers, gts):

FILE: fingpt/FinGPT_Forecaster/app.py
  function print_gpu_utilization (line 50) | def print_gpu_utilization():
  function get_curday (line 58) | def get_curday():
  function n_weeks_before (line 63) | def n_weeks_before(date_string, n):
  function get_stock_data (line 70) | def get_stock_data(stock_symbol, steps):
  function get_news (line 97) | def get_news(symbol, data):
  function get_company_prompt (line 124) | def get_company_prompt(symbol):
  function get_prompt_by_row (line 138) | def get_prompt_by_row(symbol, row):
  function sample_news (line 161) | def sample_news(news, k=5):
  function get_current_basics (line 166) | def get_current_basics(symbol, curday):
  function get_all_prompts_online (line 191) | def get_all_prompts_online(symbol, data, curday, with_basics=True):
  function construct_prompt (line 229) | def construct_prompt(ticker, curday, n_weeks, use_basics):
  function predict (line 249) | def predict(ticker, date, n_weeks, use_basics):

FILE: fingpt/FinGPT_Forecaster/data.py
  function bin_mapping (line 28) | def bin_mapping(ret):
  function get_returns (line 36) | def get_returns(stock_symbol, start_date, end_date):
  function get_news (line 60) | def get_news(symbol, data):
  function get_basics (line 85) | def get_basics(symbol, data, start_date, always=False):
  function prepare_data_for_symbol (line 118) | def prepare_data_for_symbol(symbol, data_dir, start_date, end_date, with...
  function append_to_csv (line 138) | def append_to_csv(filename, input_data, output_data):
  function initialize_csv (line 145) | def initialize_csv(filename):
  function query_gpt4 (line 152) | def query_gpt4(symbol_list, data_dir, start_date, end_date, min_past_wee...
  function gpt4_to_llama (line 210) | def gpt4_to_llama(symbol, data_dir, start_date, end_date, with_basics=Tr...
  function create_dataset (line 264) | def create_dataset(symbol_list, data_dir, start_date, end_date, train_ra...

FILE: fingpt/FinGPT_Forecaster/data_infererence_fetch.py
  function get_curday (line 14) | def get_curday():
  function n_weeks_before (line 19) | def n_weeks_before(date_string, n):
  function get_stock_data (line 26) | def get_stock_data(stock_symbol, steps):
  function get_current_basics (line 51) | def get_current_basics(symbol, curday):
  function fetch_all_data (line 74) | def fetch_all_data(symbol, curday, n_weeks=3):
  function get_all_prompts_online (line 84) | def get_all_prompts_online(symbol, data, curday, with_basics=True):

FILE: fingpt/FinGPT_Forecaster/data_pipeline.py
  function main (line 12) | def main(args):

FILE: fingpt/FinGPT_Forecaster/prompt.py
  function get_company_prompt (line 14) | def get_company_prompt(symbol):
  function get_crypto_prompt (line 26) | def get_crypto_prompt(symbol):
  function get_prompt_by_row (line 37) | def get_prompt_by_row(symbol, row):
  function get_crypto_prompt_by_row (line 60) | def get_crypto_prompt_by_row(symbol, row):
  function sample_news (line 76) | def sample_news(news, k=5):
  function map_bin_label (line 81) | def map_bin_label(bin_lb):
  function get_all_prompts (line 105) | def get_all_prompts(symbol, data_dir, start_date, end_date, min_past_wee...

FILE: fingpt/FinGPT_Forecaster/train_lora.py
  class GenerationEvalCallback (line 34) | class GenerationEvalCallback(TrainerCallback):
    method __init__ (line 36) | def __init__(self, eval_dataset, ignore_until_epoch=0):
    method on_evaluate (line 40) | def on_evaluate(self, args, state: TrainerState, control: TrainerContr...
  function main (line 82) | def main(args):

FILE: fingpt/FinGPT_Forecaster/utils.py
  function tokenize (line 19) | def tokenize(args, tokenizer, feature):
  function parse_model_name (line 47) | def parse_model_name(name, from_remote=False):
  function load_dataset (line 57) | def load_dataset(names, from_remote=False):
  function parse_answer (line 76) | def parse_answer(answer):
  function calc_rouge_score (line 112) | def calc_rouge_score(references, answers):
  function calc_metrics (line 125) | def calc_metrics(answers, gts):

FILE: fingpt/FinGPT_MultiAgentsRAG/Evaluation_methods/HaluEval/evaluate.py
  function get_qa_response (line 11) | def get_qa_response(model, question, answer, instruction):
  function get_dialogue_response (line 56) | def get_dialogue_response(model, dialog, response, instruction):
  function num_tokens_from_message (line 101) | def num_tokens_from_message(message, model="davinci"):
  function truncate_message (line 107) | def truncate_message(prompt1, prompt2, model="davinci"):
  function get_summarization_response (line 116) | def get_summarization_response(model, document, summary, instruction):
  function evaluation_qa_dataset (line 166) | def evaluation_qa_dataset(model, file, instruction, output_path):
  function evaluation_dialogue_dataset (line 221) | def evaluation_dialogue_dataset(model, file, instruction, output_path):
  function evaluation_summarization_dataset (line 274) | def evaluation_summarization_dataset(model, file, instruction, output_pa...
  function dump_jsonl (line 327) | def dump_jsonl(data, output_path, append=False):

FILE: fingpt/FinGPT_MultiAgentsRAG/Evaluation_methods/HaluEval/filtering.py
  function get_qa_res (line 11) | def get_qa_res(knowledge, question, answer1, answer2, instruction):
  function get_dialogue_res (line 53) | def get_dialogue_res(knowledge, dialog, response1, response2, instruction):
  function get_summarization_res (line 93) | def get_summarization_res(document, summary1, summary2, instruction):
  function filtering_qa_dataset (line 132) | def filtering_qa_dataset(file1, file2, instruction, output_path):
  function filtering_dialogue_dataset (line 178) | def filtering_dialogue_dataset(file1, file2, instruction, output_path):
  function filtering_summarization_dataset (line 231) | def filtering_summarization_dataset(file1, file2, instruction, output_pa...
  function dump_jsonl (line 282) | def dump_jsonl(data, output_path, append=False):

FILE: fingpt/FinGPT_MultiAgentsRAG/Evaluation_methods/HaluEval/generate.py
  function get_qa_res (line 13) | def get_qa_res(knowledge, question, answer, instruction):
  function get_dialogue_res (line 64) | def get_dialogue_res(knowledge, dialog, response, instruction):
  function get_summarization_res (line 114) | def get_summarization_res(text, summary, instruction):
  function generate_qa_dataset (line 162) | def generate_qa_dataset(seed_data, instruction, output_path):
  function generate_dialogue_dataset (line 183) | def generate_dialogue_dataset(seed_data, instruction, output_path):
  function generate_summarization_dataset (line 223) | def generate_summarization_dataset(seed_data, instruction, output_path):
  function dump_jsonl (line 237) | def dump_jsonl(data, output_path, append=False):

FILE: fingpt/FinGPT_MultiAgentsRAG/Evaluation_methods/MMLU/eval_mmlu.py
  function parse_bullets (line 9) | def parse_bullets(sentence):
  function parse_yes_no (line 27) | def parse_yes_no(string):
  function solve_math_problems (line 48) | def solve_math_problems(input_str):
  function parse_answer (line 57) | def parse_answer(input_str):
  function compute_accuracy (line 75) | def compute_accuracy(gt, pred_solutions):
  function most_frequent (line 103) | def most_frequent(List):

FILE: fingpt/FinGPT_MultiAgentsRAG/Evaluation_methods/MMLU/gen_mmlu.py
  function construct_message (line 10) | def construct_message(agents, question, idx):
  function construct_assistant_message (line 26) | def construct_assistant_message(completion):
  function generate_answer (line 31) | def generate_answer(answer_context):
  function parse_question_answer (line 45) | def parse_question_answer(df, ix):

FILE: fingpt/FinGPT_MultiAgentsRAG/Evaluation_methods/TruthfulQA/evaluate.py
  function format_frame (line 12) | def format_frame(results):
  function data_to_dict (line 25) | def data_to_dict(results):
  function main (line 38) | def main():

FILE: fingpt/FinGPT_MultiAgentsRAG/Evaluation_methods/TruthfulQA/utilities.py
  function load_questions (line 6) | def load_questions(filename='questions.csv'):
  function save_questions (line 16) | def save_questions(questions, filename='answers.csv'):
  function format_prompt (line 23) | def format_prompt(ser, preset='qa', format='general'):
  function format_prompt_with_answer_strings (line 47) | def format_prompt_with_answer_strings(question, ans, preset='qa', format...
  function format_comp (line 67) | def format_comp(query, a1, a2):
  function format_ft_comp (line 79) | def format_ft_comp(q, a1, a2, context=False):
  function format_end2end_prompt (line 91) | def format_end2end_prompt(q, ans, info=False):
  function split_multi_answer (line 102) | def split_multi_answer(ans, sep=';', close=True):
  function format_best (line 122) | def format_best(best_ans, close=True):
  function find_start (line 133) | def find_start(token_list):

FILE: fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/get_gpt_sentiment_results/get_gpt_res.py
  function get_gpt_res (line 20) | def get_gpt_res(sentences):
  function save_dict (line 39) | def save_dict(dic,evo):

FILE: fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/_version.py
  function get_versions (line 20) | def get_versions():

FILE: fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/capacity.py
  function daily_txns_with_bar_data (line 10) | def daily_txns_with_bar_data(transactions, market_data):
  function days_to_liquidate_positions (line 46) | def days_to_liquidate_positions(positions, market_data,
  function get_max_days_to_liquidate_by_ticker (line 101) | def get_max_days_to_liquidate_by_ticker(positions, market_data,
  function get_low_liquidity_transactions (line 161) | def get_low_liquidity_transactions(transactions, market_data,
  function apply_slippage_penalty (line 197) | def apply_slippage_penalty(returns, txn_daily, simulate_starting_capital,

FILE: fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/deprecate.py
  function deprecated (line 20) | def deprecated(msg=None, stacklevel=2):

FILE: fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/perf_attrib.py
  function perf_attrib (line 30) | def perf_attrib(returns,
  function compute_exposures (line 151) | def compute_exposures(positions, factor_loadings, stack_positions=True,
  function create_perf_attrib_stats (line 219) | def create_perf_attrib_stats(perf_attrib, risk_exposures):
  function show_perf_attrib_stats (line 268) | def show_perf_attrib_stats(returns,
  function plot_returns (line 326) | def plot_returns(perf_attrib_data, cost=None, ax=None):
  function plot_alpha_returns (line 389) | def plot_alpha_returns(alpha_returns, ax=None):
  function plot_factor_contribution_to_perf (line 419) | def plot_factor_contribution_to_perf(
  function plot_risk_exposures (line 472) | def plot_risk_exposures(exposures, ax=None,
  function _align_and_warn (line 505) | def _align_and_warn(returns,
  function _stack_positions (line 617) | def _stack_positions(positions, pos_in_dollars=True):
  function _cumulative_returns_less_costs (line 647) | def _cumulative_returns_less_costs(returns, costs):

FILE: fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/plotting.py
  function customize (line 43) | def customize(func):
  function plotting_context (line 58) | def plotting_context(context='notebook', font_scale=1.5, rc=None):
  function axes_style (line 103) | def axes_style(style='darkgrid', rc=None):
  function plot_monthly_returns_heatmap (line 143) | def plot_monthly_returns_heatmap(returns, ax=None, **kwargs):
  function plot_annual_returns (line 185) | def plot_annual_returns(returns, ax=None, **kwargs):
  function plot_monthly_returns_dist (line 235) | def plot_monthly_returns_dist(returns, ax=None, **kwargs):
  function plot_holdings (line 286) | def plot_holdings(returns, positions, legend_loc='best', ax=None, **kwar...
  function plot_long_short_holdings (line 346) | def plot_long_short_holdings(returns, positions,
  function plot_drawdown_periods (line 403) | def plot_drawdown_periods(returns, top=10, ax=None, **kwargs):
  function plot_drawdown_underwater (line 456) | def plot_drawdown_underwater(returns, ax=None, **kwargs):
  function plot_perf_stats (line 493) | def plot_perf_stats(returns, factor_returns, ax=None):
  function show_perf_stats (line 539) | def show_perf_stats(returns, factor_returns=None, positions=None,
  function plot_returns (line 665) | def plot_returns(returns,
  function plot_rolling_returns (line 712) | def plot_rolling_returns(returns,
  function plot_rolling_beta (line 839) | def plot_rolling_beta(returns, factor_returns, legend_loc='best',
  function plot_rolling_volatility (line 891) | def plot_rolling_volatility(returns, factor_returns=None,
  function plot_rolling_sharpe (line 958) | def plot_rolling_sharpe(returns, factor_returns=None,
  function plot_gross_leverage (line 1026) | def plot_gross_leverage(returns, positions, ax=None, **kwargs):
  function plot_exposures (line 1065) | def plot_exposures(returns, positions, ax=None, **kwargs):
  function show_and_plot_top_positions (line 1115) | def show_and_plot_top_positions(returns, positions_alloc,
  function plot_max_median_position_concentration (line 1198) | def plot_max_median_position_concentration(positions, ax=None, **kwargs):
  function plot_sector_allocations (line 1230) | def plot_sector_allocations(returns, sector_alloc, ax=None, **kwargs):
  function plot_return_quantiles (line 1273) | def plot_return_quantiles(returns, live_start_date=None, ax=None, **kwar...
  function plot_turnover (line 1326) | def plot_turnover(returns, transactions, positions, turnover_denom='AGB',
  function plot_slippage_sweep (line 1393) | def plot_slippage_sweep(returns, positions, transactions,
  function plot_slippage_sensitivity (line 1444) | def plot_slippage_sensitivity(returns, positions, transactions,
  function plot_capacity_sweep (line 1491) | def plot_capacity_sweep(returns, transactions, market_data,
  function plot_daily_turnover_hist (line 1523) | def plot_daily_turnover_hist(transactions, positions, turnover_denom='AGB',
  function plot_daily_volume (line 1559) | def plot_daily_volume(returns, transactions, ax=None, **kwargs):
  function plot_txn_time_hist (line 1597) | def plot_txn_time_hist(transactions, bin_minutes=5, tz='America/New_York',
  function show_worst_drawdown_periods (line 1655) | def show_worst_drawdown_periods(returns, top=5):
  function plot_monthly_returns_timeseries (line 1679) | def plot_monthly_returns_timeseries(returns, ax=None, **kwargs):
  function plot_round_trip_lifetimes (line 1735) | def plot_round_trip_lifetimes(round_trips, disp_amount=16, lsize=18, ax=...
  function show_profit_attribution (line 1786) | def show_profit_attribution(round_trips):
  function plot_prob_profit_trade (line 1820) | def plot_prob_profit_trade(round_trips, ax=None):
  function plot_cones (line 1867) | def plot_cones(name, bounds, oos_returns, num_samples=1000, ax=None,

FILE: fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/pos.py
  function get_percent_alloc (line 32) | def get_percent_alloc(values):
  function get_top_long_short_abs (line 53) | def get_top_long_short_abs(positions, top=10):
  function get_max_median_position_concentration (line 84) | def get_max_median_position_concentration(positions):
  function extract_pos (line 116) | def extract_pos(positions, cash):
  function get_sector_exposures (line 160) | def get_sector_exposures(positions, symbol_sector_map):
  function get_long_short_pos (line 211) | def get_long_short_pos(positions):

FILE: fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/round_trips.py
  function agg_all_long_short (line 76) | def agg_all_long_short(round_trips, col, stats_dict):
  function _groupby_consecutive (line 93) | def _groupby_consecutive(txn, max_delta=pd.Timedelta('8h')):
  function extract_round_trips (line 149) | def extract_round_trips(transactions,
  function add_closing_transactions (line 276) | def add_closing_transactions(positions, transactions):
  function apply_sector_mappings_to_round_trips (line 324) | def apply_sector_mappings_to_round_trips(round_trips, sector_mappings):
  function gen_round_trip_stats (line 351) | def gen_round_trip_stats(round_trips):
  function print_round_trip_stats (line 386) | def print_round_trip_stats(round_trips, hide_pos=False):

FILE: fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/tears.py
  function timer (line 46) | def timer(msg_body, previous_time):
  function create_full_tear_sheet (line 55) | def create_full_tear_sheet(returns,
  function create_simple_tear_sheet (line 231) | def create_simple_tear_sheet(returns,
  function create_returns_tear_sheet (line 409) | def create_returns_tear_sheet(returns, positions=None,
  function create_position_tear_sheet (line 599) | def create_position_tear_sheet(returns, positions,
  function create_txn_tear_sheet (line 694) | def create_txn_tear_sheet(returns, positions, transactions,
  function create_round_trip_tear_sheet (line 780) | def create_round_trip_tear_sheet(returns, positions, transactions,
  function create_interesting_times_tear_sheet (line 870) | def create_interesting_times_tear_sheet(returns, benchmark_rets=None,
  function create_capacity_tear_sheet (line 954) | def create_capacity_tear_sheet(returns, positions, transactions,
  function create_perf_attrib_tear_sheet (line 1066) | def create_perf_attrib_tear_sheet(returns,

FILE: fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/tests/test_capacity.py
  class CapacityTestCase (line 22) | class CapacityTestCase(TestCase):
    method test_days_to_liquidate_positions (line 48) | def test_days_to_liquidate_positions(self):
    method test_get_max_days_to_liquidate_by_ticker (line 61) | def test_get_max_days_to_liquidate_by_ticker(self):
    method test_get_low_liquidity_transactions (line 85) | def test_get_low_liquidity_transactions(self, expected, last_n_days):
    method test_daily_txns_with_bar_data (line 97) | def test_daily_txns_with_bar_data(self):
    method test_apply_slippage_penalty (line 112) | def test_apply_slippage_penalty(self, starting_base, impact,

FILE: fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/tests/test_nbs.py
  function test_nbs (line 16) | def test_nbs():

FILE: fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/tests/test_perf_attrib.py
  function _empyrical_compat_perf_attrib_result (line 14) | def _empyrical_compat_perf_attrib_result(index, columns, data):
  function generate_toy_risk_model_output (line 25) | def generate_toy_risk_model_output(start_date='2017-01-01', periods=10,
  function mock_transactions_from_positions (line 72) | def mock_transactions_from_positions(positions):
  class PerfAttribTestCase (line 91) | class PerfAttribTestCase(unittest.TestCase):
    method test_perf_attrib_simple (line 93) | def test_perf_attrib_simple(self):
    method test_perf_attrib_regression (line 217) | def test_perf_attrib_regression(self):
    method test_missing_stocks_and_dates (line 349) | def test_missing_stocks_and_dates(self):
    method test_high_turnover_warning (line 443) | def test_high_turnover_warning(self):
    method test_cumulative_returns_less_costs (line 472) | def test_cumulative_returns_less_costs(self):

FILE: fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/tests/test_pos.py
  class PositionsTestCase (line 32) | class PositionsTestCase(TestCase):
    method test_get_percent_alloc (line 35) | def test_get_percent_alloc(self):
    method test_extract_pos (line 59) | def test_extract_pos(self):
    method test_sector_exposure (line 108) | def test_sector_exposure(self, positions, mapping,
    method test_max_median_exposure (line 143) | def test_max_median_exposure(self, positions, expected):
    method test_detect_intraday (line 167) | def test_detect_intraday(self, positions, transactions, expected):
    method test_check_intraday (line 175) | def test_check_intraday(self, estimate, returns,
    method test_estimate_intraday (line 184) | def test_estimate_intraday(self, returns, positions,

FILE: fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/tests/test_round_trips.py
  class RoundTripTestCase (line 24) | class RoundTripTestCase(TestCase):
    method test_groupby_consecutive (line 59) | def test_groupby_consecutive(self, transactions, expected):
    method test_extract_round_trips (line 141) | def test_extract_round_trips(self, transactions, expected,
    method test_add_closing_trades (line 149) | def test_add_closing_trades(self):
    method test_txn_pnl_matches_round_trip_pnl (line 174) | def test_txn_pnl_matches_round_trip_pnl(self):

FILE: fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/tests/test_tears.py
  class PositionsTestCase (line 21) | class PositionsTestCase(TestCase):
    method test_create_full_tear_sheet_breakdown (line 47) | def test_create_full_tear_sheet_breakdown(self, kwargs):
    method test_create_simple_tear_sheet_breakdown (line 60) | def test_create_simple_tear_sheet_breakdown(self, kwargs):
    method test_create_returns_tear_sheet_breakdown (line 74) | def test_create_returns_tear_sheet_breakdown(self, kwargs):
    method test_create_position_tear_sheet_breakdown (line 86) | def test_create_position_tear_sheet_breakdown(self, kwargs):
    method test_create_txn_tear_sheet_breakdown (line 96) | def test_create_txn_tear_sheet_breakdown(self, kwargs):
    method test_create_round_trip_tear_sheet_breakdown (line 107) | def test_create_round_trip_tear_sheet_breakdown(self, kwargs):
    method test_create_interesting_times_tear_sheet_breakdown (line 118) | def test_create_interesting_times_tear_sheet_breakdown(self,

FILE: fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/tests/test_timeseries.py
  class TestDrawdown (line 20) | class TestDrawdown(TestCase):
    method test_get_max_drawdown_begins_first_day (line 31) | def test_get_max_drawdown_begins_first_day(self, px):
    method test_gen_drawdown_table_relative (line 57) | def test_gen_drawdown_table_relative(
    method test_get_max_drawdown (line 104) | def test_get_max_drawdown(
    method test_gen_drawdown_table (line 139) | def test_gen_drawdown_table(self, px, expected_peak,
    method test_drawdown_overlaps (line 169) | def test_drawdown_overlaps(self):
    method test_top_drawdowns (line 196) | def test_top_drawdowns(self, returns, top, expected):
  class TestVariance (line 204) | class TestVariance(TestCase):
    method test_var_cov_var_normal (line 209) | def test_var_cov_var_normal(self, P, c, mu, sigma, expected):
  class TestNormalize (line 219) | class TestNormalize(TestCase):
    method test_normalize (line 227) | def test_normalize(self, returns, expected):
  class TestStats (line 231) | class TestStats(TestCase):
    method test_sharpe_2 (line 269) | def test_sharpe_2(self, returns, rolling_sharpe_window, expected):
    method test_beta (line 278) | def test_beta(self, returns, benchmark_rets, rolling_window, expected):
  class TestCone (line 288) | class TestCone(TestCase):
    method test_bootstrap_cone_against_linear_cone_normal_returns (line 289) | def test_bootstrap_cone_against_linear_cone_normal_returns(self):
  class TestBootstrap (line 315) | class TestBootstrap(TestCase):
    method test_calc_bootstrap (line 321) | def test_calc_bootstrap(self, true_mean, true_sd, n):
  class TestGrossLev (line 353) | class TestGrossLev(TestCase):
    method test_gross_lev_calculation (line 366) | def test_gross_lev_calculation(self):

FILE: fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/tests/test_txn.py
  class TransactionsTestCase (line 14) | class TransactionsTestCase(TestCase):
    method test_get_turnover (line 16) | def test_get_turnover(self):
    method test_adjust_returns_for_slippage (line 67) | def test_adjust_returns_for_slippage(self):

FILE: fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/timeseries.py
  function var_cov_var_normal (line 38) | def var_cov_var_normal(P, c, mu=0, sigma=1):
  function max_drawdown (line 63) | def max_drawdown(returns):
  function annual_return (line 87) | def annual_return(returns, period=DAILY):
  function annual_volatility (line 111) | def annual_volatility(returns, period=DAILY):
  function calmar_ratio (line 135) | def calmar_ratio(returns, period=DAILY):
  function omega_ratio (line 164) | def omega_ratio(returns, annual_return_threshhold=0.0):
  function sortino_ratio (line 202) | def sortino_ratio(returns, required_return=0, period=DAILY):
  function downside_risk (line 231) | def downside_risk(returns, required_return=0, period=DAILY):
  function sharpe_ratio (line 262) | def sharpe_ratio(returns, risk_free=0, period=DAILY):
  function alpha_beta (line 294) | def alpha_beta(returns, factor_returns):
  function alpha (line 320) | def alpha(returns, factor_returns):
  function beta (line 344) | def beta(returns, factor_returns):
  function stability_of_timeseries (line 368) | def stability_of_timeseries(returns):
  function tail_ratio (line 390) | def tail_ratio(returns):
  function common_sense_ratio (line 412) | def common_sense_ratio(returns):
  function normalize (line 437) | def normalize(returns, starting_value=1):
  function cum_returns (line 459) | def cum_returns(returns, starting_value=0):
  function aggregate_returns (line 486) | def aggregate_returns(returns, convert_to):
  function rolling_beta (line 507) | def rolling_beta(returns, factor_returns,
  function rolling_regression (line 551) | def rolling_regression(returns, factor_returns,
  function gross_lev (line 606) | def gross_lev(positions):
  function value_at_risk (line 626) | def value_at_risk(returns, period=None, sigma=2.0):
  function perf_stats (line 692) | def perf_stats(returns, factor_returns=None, positions=None,
  function perf_stats_bootstrap (line 742) | def perf_stats_bootstrap(returns, factor_returns=None, return_stats=True,
  function calc_bootstrap (line 796) | def calc_bootstrap(func, returns, *args, **kwargs):
  function calc_distribution_stats (line 843) | def calc_distribution_stats(x):
  function get_max_drawdown_underwater (line 870) | def get_max_drawdown_underwater(underwater):
  function get_max_drawdown (line 904) | def get_max_drawdown(returns):
  function get_top_drawdowns (line 931) | def get_top_drawdowns(returns, top=10):
  function gen_drawdown_table (line 974) | def gen_drawdown_table(returns, top=10):
  function rolling_volatility (line 1028) | def rolling_volatility(returns, rolling_vol_window):
  function rolling_sharpe (line 1050) | def rolling_sharpe(returns, rolling_sharpe_window):
  function simulate_paths (line 1077) | def simulate_paths(is_returns, num_days,
  function summarize_paths (line 1113) | def summarize_paths(samples, cone_std=(1., 1.5, 2.), starting_value=1.):
  function forecast_cone_bootstrap (line 1149) | def forecast_cone_bootstrap(is_returns, num_days, cone_std=(1., 1.5, 2.),
  function extract_interesting_date_ranges (line 1207) | def extract_interesting_date_ranges(returns, periods=None):

FILE: fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/txn.py
  function map_transaction (line 20) | def map_transaction(txn):
  function make_transaction_frame (line 51) | def make_transaction_frame(transactions):
  function get_txn_vol (line 83) | def get_txn_vol(transactions):
  function adjust_returns_for_slippage (line 113) | def adjust_returns_for_slippage(returns, positions, transactions,
  function get_turnover (line 149) | def get_turnover(positions, transactions, denominator='AGB'):

FILE: fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/utils.py
  function one_dec_places (line 57) | def one_dec_places(x, pos):
  function two_dec_places (line 65) | def two_dec_places(x, pos):
  function percentage (line 73) | def percentage(x, pos):
  function format_asset (line 81) | def format_asset(asset):
  function vectorize (line 99) | def vectorize(func):
  function extract_rets_pos_txn_from_zipline (line 114) | def extract_rets_pos_txn_from_zipline(backtest):
  function print_table (line 170) | def print_table(table,
  function standardize_data (line 222) | def standardize_data(x):
  function detect_intraday (line 240) | def detect_intraday(positions, transactions, threshold=0.25):
  function check_intraday (line 269) | def check_intraday(estimate, returns, positions, transactions):
  function estimate_intraday (line 315) | def estimate_intraday(returns, positions, transactions, EOD_hour=23):
  function clip_returns_to_benchmark (line 376) | def clip_returns_to_benchmark(rets, benchmark_rets):
  function to_utc (line 406) | def to_utc(df):
  function to_series (line 419) | def to_series(df):
  function register_return_func (line 438) | def register_return_func(func):
  function get_symbol_rets (line 461) | def get_symbol_rets(symbol, start=None, end=None):
  function configure_legend (line 489) | def configure_legend(ax, autofmt_xdate=True, change_colors=False,
  function sample_colormap (line 532) | def sample_colormap(cmap_name, n_samples):

FILE: fingpt/FinGPT_Others/shares_news_sentiment_classify.py
  function get_news_from_tushare (line 14) | def get_news_from_tushare(api_key: str, data_path: str = 'finance_news_f...
  function get_news_from_market_aux (line 63) | def get_news_from_market_aux(api_key: str, data_path: str = 'finance_new...
  function get_result_from_openai_davinci (line 108) | def get_result_from_openai_davinci(api_key: str, prompt_str: str):
  function run_news_in_chinese (line 131) | def run_news_in_chinese():
  function run_news_in_english (line 140) | def run_news_in_english():

FILE: fingpt/FinGPT_RAG/instruct-FinGPT/convert_llama_weights_to_hf.py
  function compute_intermediate_size (line 75) | def compute_intermediate_size(n, ffn_dim_multiplier=1, multiple_of=256):
  function read_json (line 79) | def read_json(path):
  function write_json (line 84) | def write_json(text, path):
  function write_model (line 89) | def write_model(model_path, input_base_path, model_size, safe_serializat...
  function write_tokenizer (line 268) | def write_tokenizer(tokenizer_path, input_tokenizer_path):
  function main (line 276) | def main():

FILE: fingpt/FinGPT_RAG/instruct-FinGPT/inference/batchbot.py
  function parse_args (line 22) | def parse_args():
  function get_generator (line 44) | def get_generator(path, local_rank):
  function process_response (line 86) | def process_response(response):
  function main (line 96) | def main(args):

FILE: fingpt/FinGPT_RAG/instruct-FinGPT/inference/batchbot_torch.py
  function parse_args (line 18) | def parse_args():
  function get_generator (line 36) | def get_generator(path):
  function get_user_input (line 70) | def get_user_input(user_input):
  function get_model_response (line 77) | def get_model_response(generator, user_input, max_new_tokens):
  function process_response (line 82) | def process_response(response):
  function main (line 92) | def main(args):

FILE: fingpt/FinGPT_RAG/instruct-FinGPT/inference/chatbot.py
  function parse_args (line 14) | def parse_args():
  function get_generator (line 29) | def get_generator(path):
  function get_user_input (line 61) | def get_user_input(user_input):
  function get_model_response (line 68) | def get_model_response(generator, user_input, max_new_tokens):
  function process_response (line 73) | def process_response(response, num_rounds):
  function main (line 87) | def main(args):

FILE: fingpt/FinGPT_RAG/instruct-FinGPT/inference/f1fromcm.py
  function f1_score (line 2) | def f1_score(confusion_matrix):

FILE: fingpt/FinGPT_RAG/instruct-FinGPT/train.py
  function parse_args (line 25) | def parse_args():
  function get_model_size (line 64) | def get_model_size(args, step_num):
  function get_zero_stage (line 68) | def get_zero_stage(args, step_num):
  function get_output_dir (line 72) | def get_output_dir(args, step_num):
  function get_script (line 80) | def get_script(args, step_num):
  function verify_model (line 96) | def verify_model(args, step_num):
  function get_cmd (line 107) | def get_cmd(args, step_num):
  function launch_cmd (line 117) | def launch_cmd(args, step_num, cmd):
  function main (line 136) | def main(args):

FILE: fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/main.py
  function parse_args (line 38) | def parse_args():
  function main (line 177) | def main():

FILE: fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/main_data.py
  function parse_args (line 37) | def parse_args():
  function main (line 176) | def main():

FILE: fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/prompt_eval.py
  function parse_args (line 24) | def parse_args():
  function generate (line 84) | def generate(model,
  function generate_constrastive_search (line 106) | def generate_constrastive_search(model,
  function print_utils (line 126) | def print_utils(gen_output):
  function prompt_eval (line 133) | def prompt_eval(args, model_baseline, model_fintuned, tokenizer, device,
  function main (line 196) | def main():

FILE: fingpt/FinGPT_RAG/instruct-FinGPT/training/utils/data/data_utils.py
  function get_raw_dataset (line 19) | def get_raw_dataset(dataset_name, output_path, seed, local_rank):
  function get_shuffle_idx (line 68) | def get_shuffle_idx(seed, size):
  function get_raw_dataset_split_index (line 78) | def get_raw_dataset_split_index(local_rank, output_path, dataset_name, s...
  class PromptDataset (line 108) | class PromptDataset(Dataset):
    method __init__ (line 110) | def __init__(self, prompt_dataset, chosen_dataset, reject_dataset,
    method __len__ (line 119) | def __len__(self):
    method __getitem__ (line 125) | def __getitem__(self, idx):
  function create_dataset_split (line 140) | def create_dataset_split(current_dataset, raw_dataset, train_phase, toke...
  function create_dataset (line 213) | def create_dataset(local_rank, dataset_name, data_split, output_path,
  function create_prompt_dataset (line 242) | def create_prompt_dataset(local_rank,
  class DataCollatorReward (line 337) | class DataCollatorReward:
    method __call__ (line 339) | def __call__(self, data):
  class DataCollatorRLHF (line 350) | class DataCollatorRLHF:
    method __init__ (line 352) | def __init__(self, max_token_len, inference_tp_size):
    method __call__ (line 356) | def __call__(self, data):
  function get_unsupervised_data (line 387) | def get_unsupervised_data(args, tokenizer):
  class MiniDataset (line 440) | class MiniDataset:
    method __init__ (line 442) | def __init__(self, max_size, small_batch_size):
    method seperate (line 447) | def seperate(self):
    method add (line 472) | def add(self, data):
    method free (line 484) | def free(self):

FILE: fingpt/FinGPT_RAG/instruct-FinGPT/training/utils/data/raw_datasets.py
  class PromptRawDataset (line 14) | class PromptRawDataset(object):
    method __init__ (line 16) | def __init__(self, output_path, seed, local_rank):
    method get_train_data (line 21) | def get_train_data(self):
    method get_eval_data (line 24) | def get_eval_data(self):
    method get_prompt (line 28) | def get_prompt(self, sample):
    method get_chosen (line 32) | def get_chosen(self, sample):
    method get_rejected (line 37) | def get_rejected(self, sample):
    method get_prompt_and_chosen (line 40) | def get_prompt_and_chosen(self, sample):
    method get_prompt_and_rejected (line 43) | def get_prompt_and_rejected(self, sample):
  class DahoasRmstaticDataset (line 48) | class DahoasRmstaticDataset(PromptRawDataset):
    method __init__ (line 50) | def __init__(self, output_path, seed, local_rank):
    method get_train_data (line 56) | def get_train_data(self):
    method get_eval_data (line 59) | def get_eval_data(self):
    method get_prompt (line 62) | def get_prompt(self, sample):
    method get_chosen (line 65) | def get_chosen(self, sample):
    method get_rejected (line 68) | def get_rejected(self, sample):
    method get_prompt_and_chosen (line 71) | def get_prompt_and_chosen(self, sample):
    method get_prompt_and_rejected (line 74) | def get_prompt_and_rejected(self, sample):
  class TwitterFinancialDataset (line 79) | class TwitterFinancialDataset(PromptRawDataset):    # 9.54k
    method __init__ (line 81) | def __init__(self, output_path, seed, local_rank):
    method get_train_data (line 92) | def get_train_data(self):
    method get_eval_data (line 95) | def get_eval_data(self):
    method get_prompt (line 98) | def get_prompt(self, sample):
    method get_chosen (line 101) | def get_chosen(self, sample):
    method get_rejected (line 104) | def get_rejected(self, sample):
    method get_prompt_and_chosen (line 108) | def get_prompt_and_chosen(self, sample):
    method get_prompt_and_rejected (line 111) | def get_prompt_and_rejected(self, sample):
  class KaggleFinancialDataset (line 116) | class KaggleFinancialDataset(PromptRawDataset):     # 4.67k
    method __init__ (line 118) | def __init__(self, output_path, seed, local_rank):
    method get_train_data (line 129) | def get_train_data(self):
    method get_eval_data (line 132) | def get_eval_data(self):
    method get_prompt (line 135) | def get_prompt(self, sample):
    method get_chosen (line 138) | def get_chosen(self, sample):
    method get_rejected (line 141) | def get_rejected(self, sample):
    method get_prompt_and_chosen (line 144) | def get_prompt_and_chosen(self, sample):
    method get_prompt_and_rejected (line 147) | def get_prompt_and_rejected(self, sample):
  class DahoasFullhhrlhfDataset (line 152) | class DahoasFullhhrlhfDataset(PromptRawDataset):
    method __init__ (line 154) | def __init__(self, output_path, seed, local_rank):
    method get_train_data (line 160) | def get_train_data(self):
    method get_eval_data (line 163) | def get_eval_data(self):
    method get_prompt (line 166) | def get_prompt(self, sample):
    method get_chosen (line 169) | def get_chosen(self, sample):
    method get_rejected (line 172) | def get_rejected(self, sample):
    method get_prompt_and_chosen (line 175) | def get_prompt_and_chosen(self, sample):
    method get_prompt_and_rejected (line 178) | def get_prompt_and_rejected(self, sample):
  class DahoasSyntheticinstructgptjpairwiseDataset (line 183) | class DahoasSyntheticinstructgptjpairwiseDataset(PromptRawDataset):
    method __init__ (line 185) | def __init__(self, output_path, seed, local_rank):
    method get_train_data (line 192) | def get_train_data(self):
    method get_eval_data (line 202) | def get_eval_data(self):
    method get_prompt (line 212) | def get_prompt(self, sample):
    method get_chosen (line 215) | def get_chosen(self, sample):
    method get_rejected (line 218) | def get_rejected(self, sample):
    method get_prompt_and_chosen (line 221) | def get_prompt_and_chosen(self, sample):
    method get_prompt_and_rejected (line 224) | def get_prompt_and_rejected(self, sample):
  class YitingxieRlhfrewarddatasetsDataset (line 230) | class YitingxieRlhfrewarddatasetsDataset(PromptRawDataset):
    method __init__ (line 232) | def __init__(self, output_path, seed, local_rank):
    method get_train_data (line 238) | def get_train_data(self):
    method get_eval_data (line 241) | def get_eval_data(self):
    method get_prompt (line 244) | def get_prompt(self, sample):
    method get_chosen (line 247) | def get_chosen(self, sample):
    method get_rejected (line 250) | def get_rejected(self, sample):
    method get_prompt_and_chosen (line 253) | def get_prompt_and_chosen(self, sample):
    method get_prompt_and_rejected (line 256) | def get_prompt_and_rejected(self, sample):
  class OpenaiWebgptcomparisonsDataset (line 261) | class OpenaiWebgptcomparisonsDataset(PromptRawDataset):
    method __init__ (line 263) | def __init__(self, output_path, seed, local_rank):
    method get_train_data (line 269) | def get_train_data(self):
    method get_eval_data (line 279) | def get_eval_data(self):
    method get_prompt (line 289) | def get_prompt(self, sample):
    method get_chosen (line 292) | def get_chosen(self, sample):
    method get_rejected (line 304) | def get_rejected(self, sample):
    method get_prompt_and_chosen (line 313) | def get_prompt_and_chosen(self, sample):
    method get_prompt_and_rejected (line 323) | def get_prompt_and_rejected(self, sample):
  class StanfordnlpSHPDataset (line 335) | class StanfordnlpSHPDataset(PromptRawDataset):
    method __init__ (line 337) | def __init__(self, output_path, seed, local_rank):
    method get_train_data (line 343) | def get_train_data(self):
    method get_eval_data (line 346) | def get_eval_data(self):
    method get_prompt (line 349) | def get_prompt(self, sample):
    method get_chosen (line 352) | def get_chosen(self, sample):
    method get_rejected (line 359) | def get_rejected(self, sample):
    method get_prompt_and_chosen (line 366) | def get_prompt_and_chosen(self, sample):
    method get_prompt_and_rejected (line 373) | def get_prompt_and_rejected(self, sample):
  class Wangrui6ZhihuKOLDataset (line 382) | class Wangrui6ZhihuKOLDataset(PromptRawDataset):
    method __init__ (line 384) | def __init__(self, output_path, seed, local_rank):
    method get_train_data (line 390) | def get_train_data(self):
    method get_eval_data (line 400) | def get_eval_data(self):
    method get_prompt (line 410) | def get_prompt(self, sample):
    method get_chosen (line 415) | def get_chosen(self, sample):
    method get_rejected (line 420) | def get_rejected(self, sample):
    method get_prompt_and_chosen (line 426) | def get_prompt_and_chosen(self, sample):
    method get_prompt_and_rejected (line 432) | def get_prompt_and_rejected(self, sample):
  class CohereMiraclzhqueries2212Dataset (line 440) | class CohereMiraclzhqueries2212Dataset(PromptRawDataset):
    method __init__ (line 442) | def __init__(self, output_path, seed, local_rank):
    method get_train_data (line 448) | def get_train_data(self):
    method get_eval_data (line 451) | def get_eval_data(self):
    method get_prompt (line 454) | def get_prompt(self, sample):
    method get_chosen (line 457) | def get_chosen(self, sample):
    method get_rejected (line 460) | def get_rejected(self, sample):
    method get_prompt_and_chosen (line 463) | def get_prompt_and_chosen(self, sample):
    method get_prompt_and_rejected (line 467) | def get_prompt_and_rejected(self, sample):
  class HelloSimpleAIHC3ChineseDataset (line 473) | class HelloSimpleAIHC3ChineseDataset(PromptRawDataset):
    method __init__ (line 475) | def __init__(self, output_path, seed, local_rank):
    method get_train_data (line 481) | def get_train_data(self):
    method get_eval_data (line 491) | def get_eval_data(self):
    method get_prompt (line 501) | def get_prompt(self, sample):
    method get_chosen (line 506) | def get_chosen(self, sample):
    method get_rejected (line 511) | def get_rejected(self, sample):
    method get_prompt_and_chosen (line 517) | def get_prompt_and_chosen(self, sample):
    method get_prompt_and_rejected (line 524) | def get_prompt_and_rejected(self, sample):
  class MkqaChineseDataset (line 532) | class MkqaChineseDataset(PromptRawDataset):
    method __init__ (line 534) | def __init__(self, output_path, seed, local_rank):
    method get_train_data (line 540) | def get_train_data(self):
    method get_eval_data (line 550) | def get_eval_data(self):
    method get_prompt (line 560) | def get_prompt(self, sample):
    method get_chosen (line 565) | def get_chosen(self, sample):
    method get_rejected (line 570) | def get_rejected(self, sample):
    method get_prompt_and_chosen (line 576) | def get_prompt_and_chosen(self, sample):
    method get_prompt_and_rejected (line 584) | def get_prompt_and_rejected(self, sample):
  class MkqaJapaneseDataset (line 592) | class MkqaJapaneseDataset(PromptRawDataset):
    method __init__ (line 594) | def __init__(self, output_path, seed, local_rank):
    method get_train_data (line 600) | def get_train_data(self):
    method get_eval_data (line 610) | def get_eval_data(self):
    method get_prompt (line 620) | def get_prompt(self, sample):
    method get_chosen (line 625) | def get_chosen(self, sample):
    method get_rejected (line 630) | def get_rejected(self, sample):
    method get_prompt_and_chosen (line 636) | def get_prompt_and_chosen(self, sample):
    method get_prompt_and_rejected (line 643) | def get_prompt_and_rejected(self, sample):
  class CohereMiracljaqueries2212Dataset (line 651) | class CohereMiracljaqueries2212Dataset(PromptRawDataset):
    method __init__ (line 653) | def __init__(self, output_path, seed, local_rank):
    method get_train_data (line 659) | def get_train_data(self):
    method get_eval_data (line 662) | def get_eval_data(self):
    method get_prompt (line 665) | def get_prompt(self, sample):
    method get_chosen (line 668) | def get_chosen(self, sample):
    method get_rejected (line 671) | def get_rejected(self, sample):
    method get_prompt_and_chosen (line 674) | def get_prompt_and_chosen(self, sample):
    method get_prompt_and_rejected (line 678) | def get_prompt_and_rejected(self, sample):
  class LmqgQgjaquadDataset (line 684) | class LmqgQgjaquadDataset(PromptRawDataset):
    method __init__ (line 686) | def __init__(self, output_path, seed, local_rank):
    method get_train_data (line 692) | def get_train_data(self):
    method get_eval_data (line 695) | def get_eval_data(self):
    method get_prompt (line 698) | def get_prompt(self, sample):
    method get_chosen (line 701) | def get_chosen(self, sample):
    method get_rejected (line 704) | def get_rejected(self, sample):
    method get_prompt_and_chosen (line 710) | def get_prompt_and_chosen(self, sample):
    method get_prompt_and_rejected (line 714) | def get_prompt_and_rejected(self, sample):
  class LmqgQagjaquadDataset (line 722) | class LmqgQagjaquadDataset(PromptRawDataset):
    method __init__ (line 724) | def __init__(self, output_path, seed, local_rank):
    method get_train_data (line 730) | def get_train_data(self):
    method get_eval_data (line 733) | def get_eval_data(self):
    method get_prompt (line 736) | def get_prompt(self, sample):
    method get_chosen (line 739) | def get_chosen(self, sample):
    method get_rejected (line 742) | def get_rejected(self, sample):
    method get_prompt_and_chosen (line 748) | def get_prompt_and_chosen(self, sample):
    method get_prompt_and_rejected (line 752) | def get_prompt_and_rejected(self, sample):

FILE: fingpt/FinGPT_RAG/instruct-FinGPT/training/utils/ds_utils.py
  function get_train_ds_config (line 9) | def get_train_ds_config(offload,
  function get_eval_ds_config (line 53) | def get_eval_ds_config(offload, stage=0):

FILE: fingpt/FinGPT_RAG/instruct-FinGPT/training/utils/model/model_utils.py
  function create_hf_model (line 18) | def create_hf_model(model_class,
  function create_critic_model (line 49) | def create_critic_model(model_name_or_path,

FILE: fingpt/FinGPT_RAG/instruct-FinGPT/training/utils/model/reward_model.py
  class RewardModel (line 11) | class RewardModel(nn.Module):
    method __init__ (line 13) | def __init__(self, base_model, tokenizer, num_padding_at_beginning=0):
    method gradient_checkpointing_enable (line 31) | def gradient_checkpointing_enable(self):
    method gradient_checkpointing_disable (line 34) | def gradient_checkpointing_disable(self):
    method forward (line 37) | def forward(self,
    method forward_value (line 114) | def forward_value(self,

FILE: fingpt/FinGPT_RAG/instruct-FinGPT/training/utils/module/lora.py
  class LinearLayer_LoRA (line 13) | class LinearLayer_LoRA(nn.Module):
    method __init__ (line 16) | def __init__(self,
    method eval (line 53) | def eval(self):
    method train (line 58) | def train(self, mode=True):
    method reset_parameters (line 62) | def reset_parameters(self):
    method fuse_lora_weight (line 66) | def fuse_lora_weight(self):
    method unfuse_lora_weight (line 72) | def unfuse_lora_weight(self):
    method forward (line 78) | def forward(self, input):
  function convert_linear_layer_to_lora (line 89) | def convert_linear_layer_to_lora(model,
  function _z3_params_to_fetch (line 107) | def _z3_params_to_fetch(param_list):
  function convert_lora_to_linear_layer (line 116) | def convert_lora_to_linear_layer(model):
  function only_optimize_lora_parameters (line 134) | def only_optimize_lora_parameters(model):

FILE: fingpt/FinGPT_RAG/instruct-FinGPT/training/utils/utils.py
  function print_rank_0 (line 14) | def print_rank_0(msg, rank=0):
  function to_device (line 19) | def to_device(batch, device):
  class MovingAverage (line 29) | class MovingAverage:
    method __init__ (line 31) | def __init__(self):
    method update (line 36) | def update(self, num):
  function save_hf_format (line 44) | def save_hf_format(model, tokenizer, args, sub_folder=""):
  function set_random_seed (line 63) | def set_random_seed(seed):
  function get_all_reduce_mean (line 72) | def get_all_reduce_mean(tensor):
  function get_optimizer_grouped_parameters (line 78) | def get_optimizer_grouped_parameters(model,
  function _z3_params_to_fetch (line 106) | def _z3_params_to_fetch(param_list):
  function moving_average (line 113) | def moving_average(model, model_ema, beta=0.992, device=None, zero_stage...
  function save_zero_three_model (line 130) | def save_zero_three_model(model_ema, global_rank, save_dir, zero_stage=0):

FILE: fingpt/FinGPT_RAG/multisource_retrieval/count_contexts.py
  function find_different_rows (line 4) | def find_different_rows():

FILE: fingpt/FinGPT_RAG/multisource_retrieval/external_LLMs/chatGPT_tokenization.py
  function extract_keywords (line 9) | def extract_keywords(text):

FILE: fingpt/FinGPT_RAG/multisource_retrieval/external_LLMs/external_LLMs.py
  function extract_classification (line 9) | def extract_classification(text, classification_prompt):

FILE: fingpt/FinGPT_RAG/multisource_retrieval/format_checker.py
  function find_abnormal_rows (line 4) | def find_abnormal_rows():

FILE: fingpt/FinGPT_RAG/multisource_retrieval/gui/gui.py
  function ynbox (line 4) | def ynbox(title, message):
  function fileopenbox (line 8) | def fileopenbox(title, filetypes):
  function buttonbox (line 15) | def buttonbox(title, message, choices):
  function enterbox (line 33) | def enterbox(message, title, default):
  function msgbox (line 36) | def msgbox(message):
  function exceptionbox (line 39) | def exceptionbox(message):

FILE: fingpt/FinGPT_RAG/multisource_retrieval/manual_classification.py
  function classify_csv_file (line 5) | def classify_csv_file():

FILE: fingpt/FinGPT_RAG/multisource_retrieval/news_scraper.py
  function similarity_score (line 50) | def similarity_score(a, b):
  function scraping_by_url (line 64) | def scraping_by_url(link, subject):
  function scrape_bloomberg (line 131) | def scrape_bloomberg(subject):
  function scrape_bloomberg_article_page (line 149) | def scrape_bloomberg_article_page(url, subject):
  function scrape_reuters (line 183) | def scrape_reuters(subject):
  function scrape_market_watch_article_page (line 236) | def scrape_market_watch_article_page(url, subject):
  function scrape_business_wire_article_page (line 270) | def scrape_business_wire_article_page(url, subject):
  function scrape_wsj (line 295) | def scrape_wsj(subject):
  function scrape_seeking_alpha (line 348) | def scrape_seeking_alpha(subject):
  function scrape_seeking_alpha_article_page (line 395) | def scrape_seeking_alpha_article_page(url, subject):
  function scrape_cnbc_article_page (line 435) | def scrape_cnbc_article_page(url, subject):
  function scrape_twitter (line 481) | def scrape_twitter(url, subject):
  function get_tweet_id (line 506) | def get_tweet_id(url):
  function scrape_twitter_through_website (line 512) | def scrape_twitter_through_website(url, subject): # not feasible
  function webdrive_twitter (line 573) | def webdrive_twitter(url):
  function select_column_and_classify (line 591) | def select_column_and_classify():
  function process_row (line 659) | def process_row(row_index, row, sentence_column):

FILE: fingpt/FinGPT_RAG/multisource_retrieval/proxies/headers.py
  class Site (line 44) | class Site(Enum):
  function getFreeProxies (line 48) | def getFreeProxies():
  function getValidProxies (line 68) | def getValidProxies():
  function getProxy (line 117) | def getProxy():
  function getHeaders (line 131) | def getHeaders(siteEnum):

FILE: fingpt/FinGPT_RAG/multisource_retrieval/requests_url.py
  function requests_get (line 18) | def requests_get(url, proxy=None):
  function requests_get_for_seeking_alpha (line 50) | def requests_get_for_seeking_alpha(url, subject):
  function get_redirected_domain (line 88) | def get_redirected_domain(url):

FILE: fingpt/FinGPT_RAG/multisource_retrieval/scrapers/cnbc/scrape_cnbc.py
  function requests_get (line 10) | def requests_get(url):
  function similarity_score (line 17) | def similarity_score(a, b):
  function url_encode_string (line 31) | def url_encode_string(input_string):
  function scrape_cnbc_article_page (line 36) | def scrape_cnbc_article_page(url, subject):

FILE: fingpt/FinGPT_RAG/multisource_retrieval/scrapers/google/scrape_google.py
  function scrape_google (line 11) | def scrape_google(subject):

FILE: fingpt/FinGPT_RAG/multisource_retrieval/scrapers/market_screener/scrape_market_screener.py
  function requests_get (line 7) | def requests_get(url):
  function similarity_score (line 14) | def similarity_score(a, b):
  function scrape_market_screen_article_page (line 28) | def scrape_market_screen_article_page(url, subject):

FILE: fingpt/FinGPT_RAG/multisource_retrieval/scrapers/seeking_alpha/seeking_alpha_scraping.py
  function process_article (line 20) | def process_article(number):

FILE: fingpt/FinGPT_RAG/multisource_retrieval/scrapers/similarity_score.py
  function similarity_score (line 1) | def similarity_score(a, b):

FILE: fingpt/FinGPT_RAG/multisource_retrieval/scrapers/url_encode.py
  function url_encode_string (line 3) | def url_encode_string(input_string):

FILE: fingpt/FinGPT_RAG/multisource_retrieval/scrapers/yahoo/scrape_yahoo.py
  function requests_get (line 9) | def requests_get(url):
  function similarity_score (line 16) | def similarity_score(a, b):
  function url_encode_string (line 30) | def url_encode_string(input_string):
  function scrape_yahoo (line 34) | def scrape_yahoo(subject):
  function scrape_yahoo_finance_article_page (line 59) | def scrape_yahoo_finance_article_page(url, subject):

FILE: fingpt/FinGPT_RAG/multisource_retrieval/sentence_processing/split_sentence.py
  function get_redirected_domain (line 5) | def get_redirected_domain(url):
  function split_sentence (line 16) | def split_sentence(sentence):
  function main (line 49) | def main():

FILE: fingpt/FinGPT_RAG/multisource_retrieval/utils/count_contexts.py
  function find_different_rows (line 4) | def find_different_rows():

FILE: fingpt/FinGPT_RAG/multisource_retrieval/utils/format_checker.py
  function find_abnormal_rows (line 4) | def find_abnormal_rows():

FILE: fingpt/FinGPT_RAG/multisource_retrieval/utils/manual_classification.py
  function classify_csv_file (line 5) | def classify_csv_file():

FILE: fingpt/FinGPT_Sentiment_Analysis_v1/FinGPT_v1.0/data_preparations/add_labels.py
  function add_label (line 33) | def add_label(x, df_price, foward_days = 5, threshold = 0.02, threshold_...
  function process_label (line 57) | def process_label(file_name, foward_days = 5, threshold = 0.02, threshol...

FILE: fingpt/FinGPT_Sentiment_Analysis_v1/FinGPT_v1.0/data_preparations/download_contents.py
  function get_one_content (line 17) | def get_one_content(x):
  function get_content (line 50) | def get_content(file_name):

FILE: fingpt/FinGPT_Sentiment_Analysis_v1/FinGPT_v1.0/data_preparations/download_titles.py
  function get_news_data (line 17) | def get_news_data( stock ):

FILE: fingpt/FinGPT_Sentiment_Analysis_v1/FinGPT_v1.0/inferencing/cover_alpaca2jsonl.py
  function format_example (line 6) | def format_example(example: dict) -> dict:
  function main (line 15) | def main():

FILE: fingpt/FinGPT_Sentiment_Analysis_v1/FinGPT_v1.0/making_dataset/cover_alpaca2jsonl.py
  function format_example (line 6) | def format_example(example: dict) -> dict:
  function load_data (line 14) | def load_data(data_path: str) -> list:
  function save_data (line 26) | def save_data(save_path: str, examples: list) -> None:
  function main (line 32) | def main():

FILE: fingpt/FinGPT_Sentiment_Analysis_v1/FinGPT_v1.0/making_dataset/tokenize_dataset_rows.py
  function preprocess (line 9) | def preprocess(tokenizer, config, example, max_seq_length):
  function read_jsonl (line 21) | def read_jsonl(path, max_seq_length, skip_overlength=False):
  function main (line 40) | def main():

FILE: fingpt/FinGPT_Sentiment_Analysis_v1/FinGPT_v1.0/training/finetune.py
  class FinetuneArguments (line 19) | class FinetuneArguments:
  class CastOutputToFloat (line 25) | class CastOutputToFloat(nn.Sequential):
    method forward (line 26) | def forward(self, x):
  function data_collator (line 30) | def data_collator(features: list) -> dict:
  class ModifiedTrainer (line 54) | class ModifiedTrainer(Trainer):
    method compute_loss (line 55) | def compute_loss(self, model, inputs, return_outputs=False):
    method prediction_step (line 61) | def prediction_step(self, model: nn.Module, inputs, prediction_loss_on...
    method save_model (line 69) | def save_model(self, output_dir=None, _internal_call=False):
  function main (line 80) | def main():

FILE: fingpt/FinGPT_Sentiment_Analysis_v3/training_parallel/train_lora.py
  class ModifiedTrainer (line 26) | class ModifiedTrainer(Trainer):
    method compute_loss (line 27) | def compute_loss(self, model, inputs, return_outputs=False):
    method prediction_step (line 33) | def prediction_step(self, model: torch.nn.Module, inputs, prediction_l...
    method save_model (line 41) | def save_model(self, output_dir=None, _internal_call=False):
  function data_collator (line 51) | def data_collator(features: list) -> dict:
  class CastOutputToFloat (line 73) | class CastOutputToFloat(torch.nn.Sequential):
    method forward (line 74) | def forward(self, x):
  function main (line 77) | def main():

FILE: finogrid/agents/audit_governance/agent.py
  class AuditGovernanceAgent (line 36) | class AuditGovernanceAgent:
    method __init__ (line 42) | def __init__(self, db_session_factory, knowledge_base=None, llm_client...
    method audit_batch (line 47) | async def audit_batch(self, batch_id: str, question: Optional[str] = N...
    method check_config_drift (line 68) | async def check_config_drift(self) -> list[dict]:
    method answer_compliance_question (line 99) | async def answer_compliance_question(self, question: str) -> str:
    method _fetch_batch_events (line 119) | async def _fetch_batch_events(self, batch_id: str) -> list[dict]:
    method _generate_narrative (line 141) | async def _generate_narrative(self, events: list[dict], question: str)...

FILE: finogrid/agents/internal_support/agent.py
  class InternalSupportAgent (line 36) | class InternalSupportAgent:
    method __init__ (line 42) | def __init__(self, knowledge_base=None, llm_client=None):
    method answer (line 46) | async def answer(self, question: str, session_id: Optional[str] = None...
    method index_incident (line 81) | async def index_incident(self, incident_id: str, summary: str, resolut...

FILE: finogrid/agents/ops_oversight/agent.py
  class OpsOversightAgent (line 22) | class OpsOversightAgent:
    method __init__ (line 28) | def __init__(
    method run_health_check (line 40) | async def run_health_check(self) -> dict:
    method _check_sla_drift (line 110) | async def _check_sla_drift(self, db) -> list[dict]:
    method _check_retry_rates (line 137) | async def _check_retry_rates(self, db) -> list[dict]:
    method _count_held_tasks (line 161) | async def _count_held_tasks(self, db) -> int:

FILE: finogrid/agents/process_improvement/agent.py
  class ProcessImprovementAgent (line 22) | class ProcessImprovementAgent:
    method __init__ (line 27) | def __init__(
    method generate_weekly_report (line 39) | async def generate_weekly_report(self) -> dict:
    method _get_corridor_stats (line 85) | async def _get_corridor_stats(self, db) -> dict:
    method _get_partner_stats (line 117) | async def _get_partner_stats(self, db) -> dict:
    method _generate_recommendations (line 141) | def _generate_recommendations(

FILE: finogrid/agents/treasury_strategy/agent.py
  class TreasuryStrategyAgent (line 20) | class TreasuryStrategyAgent:
    method __init__ (line 26) | def __init__(self, corridor_forecaster=None, db_session_factory=None):
    method model_prefunding_scenario (line 30) | async def model_prefunding_scenario(
    method get_volume_forecast (line 70) | async def get_volume_forecast(self, corridor: str, weeks_ahead: int = ...

FILE: finogrid/corridors/__init__.py
  function get_adapter (line 24) | def get_adapter(corridor_code: str) -> CorridorAdapter:

FILE: finogrid/corridors/argentina/adapter.py
  class ArgentinaAdapter (line 13) | class ArgentinaAdapter(CorridorAdapter):
    method config (line 16) | def config(self) -> CorridorConfig:
    method validate_beneficiary (line 37) | def validate_beneficiary(self, beneficiary_data: dict) -> BeneficiaryV...
    method format_bank_payload (line 47) | def format_bank_payload(self, beneficiary_data: dict) -> dict:

FILE: finogrid/corridors/base.py
  class CorridorConfig (line 19) | class CorridorConfig:
  class BeneficiaryValidationResult (line 42) | class BeneficiaryValidationResult:
  class CorridorAdapter (line 48) | class CorridorAdapter(ABC):
    method config (line 53) | def config(self) -> CorridorConfig:
    method validate_beneficiary (line 57) | def validate_beneficiary(self, beneficiary_data: dict) -> BeneficiaryV...
    method get_chain_for_asset (line 63) | def get_chain_for_asset(self, asset: str) -> str:
    method format_bank_payload (line 67) | def format_bank_payload(self, beneficiary_data: dict) -> dict:
    method get_exception_policy (line 74) | def get_exception_policy(self) -> dict:

FILE: finogrid/corridors/brazil/adapter.py
  class BrazilAdapter (line 13) | class BrazilAdapter(CorridorAdapter):
    method config (line 16) | def config(self) -> CorridorConfig:
    method validate_beneficiary (line 37) | def validate_beneficiary(self, beneficiary_data: dict) -> BeneficiaryV...
    method format_bank_payload (line 54) | def format_bank_payload(self, beneficiary_data: dict) -> dict:

FILE: finogrid/corridors/india/adapter.py
  class IndiaAdapter (line 14) | class IndiaAdapter(CorridorAdapter):
    method config (line 17) | def config(self) -> CorridorConfig:
    method validate_beneficiary (line 38) | def validate_beneficiary(self, beneficiary_data: dict) -> BeneficiaryV...
    method format_bank_payload (line 46) | def format_bank_payload(self, beneficiary_data: dict) -> dict:

FILE: finogrid/corridors/indonesia/adapter.py
  class IndonesiaAdapter (line 5) | class IndonesiaAdapter(CorridorAdapter):
    method config (line 7) | def config(self) -> CorridorConfig:
    method validate_beneficiary (line 17) | def validate_beneficiary(self, beneficiary_data: dict) -> BeneficiaryV...
    method format_bank_payload (line 25) | def format_bank_payload(self, beneficiary_data: dict) -> dict:

FILE: finogrid/corridors/nigeria/adapter.py
  class NigeriaAdapter (line 15) | class NigeriaAdapter(CorridorAdapter):
    method config (line 18) | def config(self) -> CorridorConfig:
    method validate_beneficiary (line 40) | def validate_beneficiary(self, beneficiary_data: dict) -> BeneficiaryV...
    method format_bank_payload (line 53) | def format_bank_payload(self, beneficiary_data: dict) -> dict:
    method get_chain_for_asset (line 63) | def get_chain_for_asset(self, asset: str) -> str:

FILE: finogrid/corridors/philippines/adapter.py
  class PhilippinesAdapter (line 5) | class PhilippinesAdapter(CorridorAdapter):
    method config (line 7) | def config(self) -> CorridorConfig:
    method validate_beneficiary (line 17) | def validate_beneficiary(self, beneficiary_data: dict) -> BeneficiaryV...
    method format_bank_payload (line 25) | def format_bank_payload(self, beneficiary_data: dict) -> dict:

FILE: finogrid/corridors/uae/adapter.py
  class UAEAdapter (line 5) | class UAEAdapter(CorridorAdapter):
    method config (line 7) | def config(self) -> CorridorConfig:
    method validate_beneficiary (line 18) | def validate_beneficiary(self, beneficiary_data: dict) -> BeneficiaryV...
    method format_bank_payload (line 26) | def format_bank_payload(self, beneficiary_data: dict) -> dict:

FILE: finogrid/corridors/vietnam/adapter.py
  class VietnamAdapter (line 5) | class VietnamAdapter(CorridorAdapter):
    method config (line 7) | def config(self) -> CorridorConfig:
    method validate_beneficiary (line 17) | def validate_beneficiary(self, beneficiary_data: dict) -> BeneficiaryV...
    method format_bank_payload (line 25) | def format_bank_payload(self, beneficiary_data: dict) -> dict:
    method get_chain_for_asset (line 34) | def get_chain_for_asset(self, asset: str) -> str:

FILE: finogrid/database/migrations/001_initial_schema.sql
  type clients (line 8) | CREATE TABLE clients (
  type client_corridor_permissions (line 23) | CREATE TABLE client_corridor_permissions (
  type batches (line 38) | CREATE TABLE batches (
  type payout_tasks (line 52) | CREATE TABLE payout_tasks (
  type idx_payout_tasks_batch_id (line 76) | CREATE INDEX idx_payout_tasks_batch_id ON payout_tasks(batch_id)
  type idx_payout_tasks_status (line 77) | CREATE INDEX idx_payout_tasks_status ON payout_tasks(status)
  type idx_payout_tasks_corridor (line 78) | CREATE INDEX idx_payout_tasks_corridor ON payout_tasks(corridor_code)
  type execution_events (line 81) | CREATE TABLE execution_events (
  type idx_execution_events_task_id (line 93) | CREATE INDEX idx_execution_events_task_id ON execution_events(task_id)
  type audit_logs (line 96) | CREATE TABLE audit_logs (
  type idx_audit_logs_batch_id (line 116) | CREATE INDEX idx_audit_logs_batch_id ON audit_logs(batch_id)
  type idx_audit_logs_client_id (line 117) | CREATE INDEX idx_audit_logs_client_id ON audit_logs(client_id)
  type idx_audit_logs_action (line 118) | CREATE INDEX idx_audit_logs_action ON audit_logs(action)
  type routing_profiles (line 121) | CREATE TABLE routing_profiles (
  type compliance_profiles (line 145) | CREATE TABLE compliance_profiles (

FILE: finogrid/database/migrations/002_agent_ledger.sql
  type agent_accounts (line 9) | CREATE TABLE agent_accounts (
  type idx_agent_accounts_owner_client (line 24) | CREATE INDEX idx_agent_accounts_owner_client ON agent_accounts(owner_cli...
  type idx_agent_accounts_kya_status (line 25) | CREATE INDEX idx_agent_accounts_kya_status ON agent_accounts(kya_status)
  type agent_kya (line 35) | CREATE TABLE agent_kya (
  type agent_wallets (line 70) | CREATE TABLE agent_wallets (
  type idx_agent_wallets_agent_account (line 98) | CREATE INDEX idx_agent_wallets_agent_account ON agent_wallets(agent_acco...
  type idx_agent_wallets_wallet_address (line 99) | CREATE INDEX idx_agent_wallets_wallet_address ON agent_wallets(wallet_ad...
  type idx_agent_wallets_loop_type (line 100) | CREATE INDEX idx_agent_wallets_loop_type ON agent_wallets(loop_type)
  type payment_intents (line 115) | CREATE TABLE payment_intents (
  type idx_payment_intents_payer_wallet (line 138) | CREATE INDEX idx_payment_intents_payer_wallet ON payment_intents(payer_w...
  type idx_payment_intents_status (line 139) | CREATE INDEX idx_payment_intents_status ON payment_intents(status)
  type idx_payment_intents_expires_at (line 140) | CREATE INDEX idx_payment_intents_expires_at ON payment_intents(expires_at)
  type micro_transactions (line 149) | CREATE TABLE micro_transactions (
  type idx_micro_tx_payer_wallet (line 184) | CREATE INDEX idx_micro_tx_payer_wallet ON micro_transactions(payer_walle...
  type idx_micro_tx_status (line 185) | CREATE INDEX idx_micro_tx_status ON micro_transactions(status)
  type idx_micro_tx_payment_intent (line 186) | CREATE INDEX idx_micro_tx_payment_intent ON micro_transactions(payment_i...
  type idx_micro_tx_on_chain_tx (line 187) | CREATE INDEX idx_micro_tx_on_chain_tx ON micro_transactions(on_chain_tx_...
  type agent_ledger_entries (line 202) | CREATE TABLE agent_ledger_entries (
  type idx_ledger_agent_account (line 220) | CREATE INDEX idx_ledger_agent_account ON agent_ledger_entries(agent_acco...
  type idx_ledger_micro_tx (line 221) | CREATE INDEX idx_ledger_micro_tx ON agent_ledger_entries(micro_tx_id)
  type idx_ledger_payment_intent (line 222) | CREATE INDEX idx_ledger_payment_intent ON agent_ledger_entries(payment_i...

FILE: finogrid/database/migrations/003_mandate.sql
  type principals (line 39) | CREATE TABLE IF NOT EXISTS principals (
  type idx_principals_client_id (line 52) | CREATE INDEX IF NOT EXISTS idx_principals_client_id ON principals(client...
  type idx_principals_status (line 53) | CREATE INDEX IF NOT EXISTS idx_principals_status ON principals(status)
  type mandates (line 57) | CREATE TABLE IF NOT EXISTS mandates (
  type idx_mandates_principal (line 96) | CREATE INDEX IF NOT EXISTS idx_mandates_principal ON mandates(principal_id)
  type idx_mandates_agent (line 97) | CREATE INDEX IF NOT EXISTS idx_mandates_agent ON mandates(agent_account_id)
  type idx_mandates_status (line 98) | CREATE INDEX IF NOT EXISTS idx_mandates_status ON mandates(status)
  type idx_mandates_active (line 99) | CREATE INDEX IF NOT EXISTS idx_mandates_active ON mandates(agent_account...
  type mandate_events (line 104) | CREATE TABLE IF NOT EXISTS mandate_events (
  type idx_mandate_events_mandate (line 117) | CREATE INDEX IF NOT EXISTS idx_mandate_events_mandate ON mandate_events(...
  type idx_mandate_events_type (line 118) | CREATE INDEX IF NOT EXISTS idx_mandate_events_type ON mandate_events(eve...
  function update_updated_at_column (line 122) | CREATE OR REPLACE FUNCTION update_updated_at_column()

FILE: finogrid/database/models/agent_ledger.py
  class KYAStatus (line 27) | class KYAStatus(str, PyEnum):
  class AgentStatus (line 34) | class AgentStatus(str, PyEnum):
  class LoopType (line 40) | class LoopType(str, PyEnum):
  class IntentStatus (line 45) | class IntentStatus(str, PyEnum):
  class IntentCategory (line 53) | class IntentCategory(str, PyEnum):
  class MicroTxStatus (line 62) | class MicroTxStatus(str, PyEnum):
  class AgentAccount (line 72) | class AgentAccount(Base, UUIDMixin, TimestampMixin):
  class AgentKYA (line 118) | class AgentKYA(Base, UUIDMixin, TimestampMixin):
  class AgentWallet (line 170) | class AgentWallet(Base, UUIDMixin, TimestampMixin):
  class PaymentIntent (line 218) | class PaymentIntent(Base, UUIDMixin, TimestampMixin):
  class MicroTransaction (line 270) | class MicroTransaction(Base, UUIDMixin, TimestampMixin):
  class AgentLedgerEntry (line 324) | class AgentLedgerEntry(Base, UUIDMixin, TimestampMixin):

FILE: finogrid/database/models/audit.py
  class AuditLog (line 9) | class AuditLog(Base, UUIDMixin, TimestampMixin):

FILE: finogrid/database/models/base.py
  class Base (line 8) | class Base(DeclarativeBase):
  class TimestampMixin (line 12) | class TimestampMixin:
  class UUIDMixin (line 26) | class UUIDMixin:

FILE: finogrid/database/models/batch.py
  class BatchStatus (line 10) | class BatchStatus(str, PyEnum):
  class TaskStatus (line 21) | class TaskStatus(str, PyEnum):
  class AssetType (line 33) | class AssetType(str, PyEnum):
  class DeliveryMode (line 38) | class DeliveryMode(str, PyEnum):
  class Batch (line 43) | class Batch(Base, UUIDMixin, TimestampMixin):
  class PayoutTask (line 67) | class PayoutTask(Base, UUIDMixin, TimestampMixin):

FILE: finogrid/database/models/client.py
  class ClientStatus (line 10) | class ClientStatus(str, PyEnum):
  class KYBStatus (line 17) | class KYBStatus(str, PyEnum):
  class Client (line 25) | class Client(Base, UUIDMixin, TimestampMixin):
  class ClientCorridorPermission (line 50) | class ClientCorridorPermission(Base, UUIDMixin, TimestampMixin):

FILE: finogrid/database/models/execution.py
  class EventType (line 10) | class EventType(str, PyEnum):
  class ExecutionEvent (line 28) | class ExecutionEvent(Base, UUIDMixin, TimestampMixin):

FILE: finogrid/database/models/instruction.py
  class PayoutInstruction (line 9) | class PayoutInstruction(Base, UUIDMixin, TimestampMixin):

FILE: finogrid/database/models/mandate.py
  class MandateStatus (line 31) | class MandateStatus(str, PyEnum):
  class MandateScope (line 40) | class MandateScope(str, PyEnum):
  class ApprovalMode (line 48) | class ApprovalMode(str, PyEnum):
  class MandateEventType (line 54) | class MandateEventType(str, PyEnum):
  class Principal (line 67) | class Principal(Base, UUIDMixin, TimestampMixin):
  class Mandate (line 99) | class Mandate(Base, UUIDMixin, TimestampMixin):
  class MandateEvent (line 222) | class MandateEvent(Base, UUIDMixin, TimestampMixin):

FILE: finogrid/database/models/routing.py
  class RoutingProfile (line 8) | class RoutingProfile(Base, UUIDMixin, TimestampMixin):
  class ComplianceProfile (line 47) | class ComplianceProfile(Base, UUIDMixin, TimestampMixin):

FILE: finogrid/fingpt_integration/forecaster/corridor_forecaster.py
  class CorridorForecaster (line 40) | class CorridorForecaster:
    method __init__ (line 48) | def __init__(self, openai_client=None, fingpt_model=None):
    method get_fx_returns (line 52) | def get_fx_returns(self, corridor_code: str, weeks: int = 4) -> dict:
    method get_stablecoin_depeg_risk (line 78) | def get_stablecoin_depeg_risk(self, asset: str = "USDT") -> dict:
    method generate_corridor_risk_signal (line 106) | def generate_corridor_risk_signal(

FILE: finogrid/fingpt_integration/minimax_llm_client.py
  class MiniMaxLLMClient (line 21) | class MiniMaxLLMClient:
    method __init__ (line 36) | def __init__(
    method chat (line 58) | async def chat(self, prompt: str) -> str:

FILE: finogrid/fingpt_integration/rag/knowledge_base.py
  class FinoGridKnowledgeBase (line 29) | class FinoGridKnowledgeBase:
    method __init__ (line 42) | def __init__(
    method init (line 54) | def init(self):
    method index_document (line 70) | def index_document(self, doc_id: str, text: str, metadata: Optional[di...
    method index_directory (line 85) | def index_directory(self, directory: str, glob_pattern: str = "**/*.md"):
    method query (line 96) | def query(self, question: str, n_results: int = 5) -> list[dict]:
    method build_context (line 117) | def build_context(self, question: str, n_results: int = 5) -> str:
    method _chunk_text (line 126) | def _chunk_text(text: str, chunk_size: int = 500, overlap: int = 50) -...

FILE: finogrid/fingpt_integration/sentiment/crypto_sentiment.py
  class FinoGridSentimentAnalyzer (line 34) | class FinoGridSentimentAnalyzer:
    method __init__ (line 40) | def __init__(
    method load (line 52) | def load(self):
    method score (line 66) | def score(self, text: str) -> dict:
    method score_batch (line 97) | def score_batch(self, texts: list[str]) -> list[dict]:
    method score_corridor_news (line 101) | def score_corridor_news(self, news_items: list[dict], corridor_code: s...

FILE: finogrid/fingpt_integration/sentiment/minimax_provider.py
  class MiniMaxSentimentProvider (line 29) | class MiniMaxSentimentProvider:
    method __init__ (line 38) | def __init__(self, model: str = "MiniMax-M2.7"):
    method load (line 51) | def load(self):
    method score (line 54) | async def score(self, text: str) -> dict:
    method score_corridor_news (line 75) | async def score_corridor_news(self, news_items: list[dict], corridor_c...

FILE: finogrid/fingpt_integration/sentiment/openai_fallback.py
  class OpenAISentimentFallback (line 25) | class OpenAISentimentFallback:
    method __init__ (line 31) | def __init__(self, model: str = "gpt-3.5-turbo"):
    method load (line 35) | def load(self):
    method score (line 38) | async def score(self, text: str) -> dict:
    method score_corridor_news (line 58) | async def score_corridor_news(self, news_items: list[dict], corridor_c...
  function get_sentiment_analyzer (line 72) | def get_sentiment_analyzer():

FILE: finogrid/mcp/bridge/server.py
  function call_bridge (line 44) | async def call_bridge(tool: str, params: dict) -> dict:
  class MCPHandler (line 72) | class MCPHandler(BaseHTTPRequestHandler):
    method do_POST (line 73) | def do_POST(self):
    method log_message (line 84) | def log_message(self, *args):

FILE: finogrid/mcp/identity/server.py
  function call_identity (line 31) | async def call_identity(tool: str, params: dict) -> dict:
  class MCPHandler (line 44) | class MCPHandler(BaseHTTPRequestHandler):
    method do_POST (line 45) | def do_POST(self):
    method log_message (line 54) | def log_message(self, *args):

FILE: finogrid/mcp/kya_validator/server.py
  class KYAValidatorSettings (line 38) | class KYAValidatorSettings(BaseSettings):
  class SubmitKYARequest (line 56) | class SubmitKYARequest(BaseModel):
  class GetKYAStatusRequest (line 64) | class GetKYAStatusRequest(BaseModel):
  class VerifyKYATokenRequest (line 68) | class VerifyKYATokenRequest(BaseModel):
  class RenewKYARequest (line 73) | class RenewKYARequest(BaseModel):
  function _internal_validate (line 79) | def _internal_validate(submission: dict) -> tuple[str, str]:
  function _mint_validator_token (line 95) | def _mint_validator_token(agent_account_id: str, kya_level: str) -> tupl...
  function health (line 116) | async def health():
  function submit_kya (line 121) | async def submit_kya(request: SubmitKYARequest):
  function get_kya_status (line 174) | async def get_kya_status(request: GetKYAStatusRequest):
  function verify_kya_token (line 196) | async def verify_kya_token(request: VerifyKYATokenRequest):
  function renew_kya (line 219) | async def renew_kya(request: RenewKYARequest):

FILE: finogrid/mcp/kyt_aml/server.py
  function call_kyt (line 31) | async def call_kyt(tool: str, params: dict) -> dict:
  class MCPHandler (line 55) | class MCPHandler(BaseHTTPRequestHandler):
    method do_POST (line 56) | def do_POST(self):
    method log_message (line 65) | def log_message(self, *args):

FILE: finogrid/mcp/plaid/server.py
  class PlaidSettings (line 35) | class PlaidSettings(BaseSettings):
  class CreateLinkTokenRequest (line 53) | class CreateLinkTokenRequest(BaseModel):
  class ExchangePublicTokenRequest (line 59) | class ExchangePublicTokenRequest(BaseModel):
  class GetAccountInfoRequest (line 63) | class GetAccountInfoRequest(BaseModel):
  class InitiateAchPullRequest (line 66) | class InitiateAchPullRequest(BaseModel):
  class GetTransferStatusRequest (line 72) | class GetTransferStatusRequest(BaseModel):
  function _get_plaid_client (line 77) | def _get_plaid_client():
  function health (line 104) | async def health():
  function create_link_token (line 115) | async def create_link_token(request: CreateLinkTokenRequest):
  function exchange_public_token (line 161) | async def exchange_public_token(request: ExchangePublicTokenRequest):
  function get_account_info (line 197) | async def get_account_info(request: GetAccountInfoRequest):
  function initiate_ach_pull (line 243) | async def initiate_ach_pull(request: InitiateAchPullRequest):
  function get_transfer_status (line 310) | async def get_transfer_status(request: GetTransferStatusRequest):
  function handle_webhook (line 344) | async def handle_webhook(request: Request):

FILE: finogrid/mcp/wallet_factory/server.py
  class WalletFactorySettings (line 27) | class WalletFactorySettings(BaseSettings):
  class RegisterWalletRequest (line 65) | class RegisterWalletRequest(BaseModel):
  class VerifyOwnershipRequest (line 72) | class VerifyOwnershipRequest(BaseModel):
  class GetWalletBalanceRequest (line 78) | class GetWalletBalanceRequest(BaseModel):
  class CheckTxConfirmedRequest (line 83) | class CheckTxConfirmedRequest(BaseModel):
  function health (line 95) | async def health():
  function register_wallet (line 100) | async def register_wallet(request: RegisterWalletRequest):
  function verify_ownership (line 136) | async def verify_ownership(request: VerifyOwnershipRequest):
  function get_wallet_balance (line 167) | async def get_wallet_balance(request: GetWalletBalanceRequest):
  function check_tx_confirmed (line 202) | async def check_tx_confirmed(request: CheckTxConfirmedRequest):

FILE: finogrid/sdk/typescript/src/client.ts
  class BaseClient (line 58) | class BaseClient {
    method constructor (line 62) | constructor(config: FinogridClientConfig) {
    method request (line 74) | protected async request<T>(config: AxiosRequestConfig, attempt = 0): P...
  class AgentsClient (line 106) | class AgentsClient extends BaseClient {
    method create (line 107) | async create(req: AgentAccountCreateRequest): Promise<AgentAccountCrea...
    method getBalance (line 111) | async getBalance(agentAccountId: string): Promise<AgentBalanceResponse> {
    method topup (line 115) | async topup(agentAccountId: string, req: TopUpRequest): Promise<TopUpR...
  class KYAClient (line 120) | class KYAClient extends BaseClient {
    method submit (line 121) | async submit(agentAccountId: string, req: KYASubmitRequest): Promise<K...
    method getStatus (line 125) | async getStatus(agentAccountId: string): Promise<KYAStatusResponse> {
    method pollUntil (line 130) | async pollUntil(
  class WalletsClient (line 149) | class WalletsClient extends BaseClient {
    method create (line 150) | async create(agentAccountId: string, req: AgentWalletCreateRequest): P...
    method list (line 154) | async list(agentAccountId: string): Promise<{ agent_account_id: string...
  class PaymentIntentsClient (line 159) | class PaymentIntentsClient extends BaseClient {
    method create (line 160) | async create(req: PaymentIntentCreateRequest): Promise<PaymentIntentCr...
    method supersede (line 164) | async supersede(intentId: string, req: PaymentIntentSupersede): Promis...
  class MicropayClient (line 169) | class MicropayClient extends BaseClient {
    method pay (line 170) | async pay(req: MicroPayRequest): Promise<MicroPayResponse> {
  class MandatesClient (line 175) | class MandatesClient extends BaseClient {
    method create (line 176) | async create(req: MandateCreateRequest): Promise<MandateResponse> {
    method get (line 180) | async get(mandateId: string): Promise<MandateResponse> {
    method revoke (line 184) | async revoke(mandateId: string, reason: string): Promise<MandateRespon...
  class X402Helper (line 195) | class X402Helper {
    method buildPaymentSignature (line 201) | static buildPaymentSignature(
    method decodeRequirement (line 218) | static decodeRequirement(header: string): X402PaymentRequirement {
  class FinogridClient (line 225) | class FinogridClient {
    method constructor (line 234) | constructor(config: FinogridClientConfig) {
  class FinogridApiError (line 247) | class FinogridApiError extends Error {
    method constructor (line 248) | constructor(
  class X402PaymentRequiredError (line 258) | class X402PaymentRequiredError extends Error {
    method constructor (line 259) | constructor(
  function sleep (line 270) | function sleep(ms: number): Promise<void> {

FILE: finogrid/sdk/typescript/src/types.ts
  type KYAStatus (line 7) | type KYAStatus = "unverified" | "pending" | "basic" | "enhanced";
  type LoopType (line 8) | type LoopType = "open" | "closed";
  type IntentStatus (line 9) | type IntentStatus = "reserved" | "consumed" | "expired" | "refunded" | "...
  type IntentCategory (line 10) | type IntentCategory = "compute" | "data" | "agent_service" | "content" |...
  type MicroTxStatus (line 11) | type MicroTxStatus = "pending" | "settled_offchain" | "settled_onchain" ...
  type MandateStatus (line 12) | type MandateStatus = "draft" | "active" | "suspended" | "revoked" | "exp...
  type MandateScope (line 13) | type MandateScope = "payout" | "collect" | "topup" | "full" | "read_only";
  type ApprovalMode (line 14) | type ApprovalMode = "auto" | "manual" | "threshold";
  type AgentAccountCreateRequest (line 18) | interface AgentAccountCreateRequest {
  type AgentAccountCreateResponse (line 24) | interface AgentAccountCreateResponse {
  type AgentBalanceResponse (line 33) | interface AgentBalanceResponse {
  type LedgerEntry (line 43) | interface LedgerEntry {
  type KYASubmitRequest (line 55) | interface KYASubmitRequest {
  type KYAStatusResponse (line 62) | interface KYAStatusResponse {
  type AgentWalletCreateRequest (line 75) | interface AgentWalletCreateRequest {
  type AgentWalletCreateResponse (line 86) | interface AgentWalletCreateResponse {
  type AgentWallet (line 93) | interface AgentWallet {
  type PaymentIntentCreateRequest (line 109) | interface PaymentIntentCreateRequest {
  type PaymentIntentCreateResponse (line 117) | interface PaymentIntentCreateResponse {
  type PaymentIntentSupersede (line 126) | interface PaymentIntentSupersede {
  type MicroPayRequest (line 136) | interface MicroPayRequest {
  type MicroPayResponse (line 147) | interface MicroPayResponse {
  type TopUpRequest (line 162) | interface TopUpRequest {
  type TopUpResponse (line 166) | interface TopUpResponse {
  type MandateCreateRequest (line 175) | interface MandateCreateRequest {
  type MandateResponse (line 193) | interface MandateResponse {
  type X402PaymentRequirement (line 212) | interface X402PaymentRequirement {
  type X402PaymentSignature (line 223) | interface X402PaymentSignature {
  type FinogridClientConfig (line 235) | interface FinogridClientConfig {

FILE: finogrid/services/agent_ledger_api/chain_watcher.py
  function _get_web3 (line 47) | def _get_web3():
  function job_a_deposit_watcher (line 56) | async def job_a_deposit_watcher(last_block: int) -> int:
  function _credit_deposit (line 102) | async def _credit_deposit(db: AsyncSession, tx_hash: str, from_addr: str...
  function job_b_settlement_sweep (line 161) | async def job_b_settlement_sweep():
  function run_chain_watcher (line 191) | async def run_chain_watcher():

FILE: finogrid/services/agent_ledger_api/config.py
  class AgentLedgerSettings (line 5) | class AgentLedgerSettings(BaseSettings):

FILE: finogrid/services/agent_ledger_api/dependencies.py
  function get_db (line 19) | async def get_db():
  function get_current_agent_account (line 24) | async def get_current_agent_account(
  function assert_kya_status (line 47) | async def assert_kya_status(agent_account, required_level: str = "basic"):
  function kya_daily_limit (line 74) | def kya_daily_limit(kya_status: str) -> float:

FILE: finogrid/services/agent_ledger_api/intent_sweeper.py
  function sweep_expired_intents (line 33) | async def sweep_expired_intents(db: AsyncSession) -> int:
  function run_sweeper_loop (line 135) | async def run_sweeper_loop():

FILE: finogrid/services/agent_ledger_api/main.py
  function lifespan (line 36) | async def lifespan(app: FastAPI):

FILE: finogrid/services/agent_ledger_api/middleware/payment_required.py
  function _encode_requirement (line 40) | def _encode_requirement(path: str, amount_usdc: float = 0.001) -> str:
  function _decode_signature (line 61) | def _decode_signature(signature_b64: str) -> dict | None:
  function _validate_payment_signature (line 70) | def _validate_payment_signature(sig_data: dict, path: str) -> tuple[bool...
  class PaymentRequiredMiddleware (line 100) | class PaymentRequiredMiddleware(BaseHTTPMiddleware):
    method dispatch (line 109) | async def dispatch(self, request: Request, call_next):

FILE: finogrid/services/agent_ledger_api/routers/agent_accounts.py
  function register_agent_account (line 20) | async def register_agent_account(
  function get_balance (line 52) | async def get_balance(

FILE: finogrid/services/agent_ledger_api/routers/health.py
  function health (line 5) | async def health():

FILE: finogrid/services/agent_ledger_api/routers/kya.py
  function submit_kya (line 18) | async def submit_kya(
  function get_kya_status (line 95) | async def get_kya_status(

FILE: finogrid/services/agent_ledger_api/routers/micropay.py
  function micropay (line 23) | async def micropay(

FILE: finogrid/services/agent_ledger_api/routers/payment_intents.py
  function create_payment_intent (line 19) | async def create_payment_intent(
  function supersede_payment_intent (line 105) | async def supersede_payment_intent(

FILE: finogrid/services/agent_ledger_api/routers/topup.py
  function topup (line 17) | async def topup(

FILE: finogrid/services/agent_ledger_api/routers/wallets.py
  function create_wallet (line 18) | async def create_wallet(
  function list_wallets (line 103) | async def list_wallets(

FILE: finogrid/services/agent_ledger_api/schemas.py
  class AgentAccountCreateRequest (line 11) | class AgentAccountCreateRequest(BaseModel):
  class AgentAccountCreateResponse (line 18) | class AgentAccountCreateResponse(BaseModel):
  class AgentBalanceResponse (line 30) | class AgentBalanceResponse(BaseModel):
  class KYASubmitRequest (line 42) | class KYASubmitRequest(BaseModel):
  class KYAStatusResponse (line 58) | class KYAStatusResponse(BaseModel):
  class AgentWalletCreateRequest (line 71) | class AgentWalletCreateRequest(BaseModel):
    method validate_evm_address (line 90) | def validate_evm_address(cls, v: str) -> str:
  class AgentWalletCreateResponse (line 96) | class AgentWalletCreateResponse(BaseModel):
  class PaymentIntentCreateRequest (line 106) | class PaymentIntentCreateRequest(BaseModel):
  class PaymentIntentCreateResponse (line 121) | class PaymentIntentCreateResponse(BaseModel):
  class PaymentIntentSupersede (line 131) | class PaymentIntentSupersede(BaseModel):
  class MicroPayRequest (line 146) | class MicroPayRequest(BaseModel):
    method validate_payee (line 164) | def validate_payee(cls, v: str) -> str:
  class MicroPayResponse (line 170) | class MicroPayResponse(BaseModel):
  class TopUpRequest (line 185) | class TopUpRequest(BaseModel):
  class TopUpResponse (line 192) | class TopUpResponse(BaseModel):

FILE: finogrid/services/compliance_gate/gate.py
  class ComplianceOutcome (line 23) | class ComplianceOutcome(str, Enum):
  class ComplianceResult (line 30) | class ComplianceResult:
  class ComplianceGate (line 40) | class ComplianceGate:
    method __init__ (line 46) | def __init__(self, kyt_client, compliance_profile):
    method screen (line 50) | async def screen(

FILE: finogrid/services/ingress_api/config.py
  class IngressSettings (line 5) | class IngressSettings(BaseSettings):

FILE: finogrid/services/ingress_api/dependencies.py
  function _get_publisher (line 22) | def _get_publisher():
  function get_db (line 29) | async def get_db() -> AsyncGenerator[AsyncSession, None]:
  function get_current_client (line 37) | async def get_current_client(
  function verify_api_key (line 59) | async def verify_api_key(api_key: str = Security(api_key_header)):
  function publish_event (line 66) | async def publish_event(topic: str, payload: dict) -> None:

FILE: finogrid/services/ingress_api/main.py
  function lifespan (line 27) | async def lifespan(app: FastAPI):

FILE: finogrid/services/ingress_api/routers/batches.py
  function create_batch (line 16) | async def create_batch(
  function get_batch_status (line 94) | async def get_batch_status(

FILE: finogrid/services/ingress_api/routers/health.py
  function health (line 5) | async def health():

FILE: finogrid/services/ingress_api/routers/onboarding.py
  function register_client (line 14) | async def register_client(

FILE: finogrid/services/ingress_api/routers/webhooks.py
  function bridge_webhook (line 11) | async def bridge_webhook(request: Request, x_bridge_signature: Optional[...
  function kyt_webhook (line 20) | async def kyt_webhook(request: Request):

FILE: finogrid/services/ingress_api/schemas.py
  class PayoutItem (line 8) | class PayoutItem(BaseModel):
    method corridor_must_be_supported (line 25) | def corridor_must_be_supported(cls, v: str) -> str:
  class BatchCreateRequest (line 32) | class BatchCreateRequest(BaseModel):
  class BatchCreateResponse (line 39) | class BatchCreateResponse(BaseModel):
  class BatchStatusResponse (line 48) | class BatchStatusResponse(BaseModel):
  class OnboardingRequest (line 60) | class OnboardingRequest(BaseModel):
  class OnboardingResponse (line 70) | class OnboardingResponse(BaseModel):

FILE: finogrid/services/ops_console/config.py
  class OpsConsoleSettings (line 5) | class OpsConsoleSettings(BaseSettings):

FILE: finogrid/services/ops_console/dependencies.py
  function get_db (line 11) | async def get_db():
  function require_ops_key (line 16) | async def require_ops_key(x_ops_api_key: str = Header(...)):

FILE: finogrid/services/ops_console/main.py
  function lifespan (line 29) | async def lifespan(app: FastAPI):
  function health (line 60) | async def health():

FILE: finogrid/services/ops_console/routers/agents_explorer.py
  function list_agents (line 19) | async def list_agents(
  function get_agent_detail (line 63) | async def get_agent_detail(

FILE: finogrid/services/ops_console/routers/approvals.py
  class ApprovalDecisionRequest (line 23) | class ApprovalDecisionRequest(BaseModel):
  function list_pending_approvals (line 30) | async def list_pending_approvals(
  function decide_approval (line 65) | async def decide_approval(

FILE: finogrid/services/ops_console/routers/corridors.py
  function corridor_analytics (line 18) | async def corridor_analytics(

FILE: finogrid/services/ops_console/routers/exceptions.py
  function list_exceptions (line 19) | async def list_exceptions(

FILE: finogrid/services/ops_console/routers/ledger_explorer.py
  function query_ledger (line 17) | async def query_ledger(

FILE: finogrid/services/ops_console/routers/mandates_console.py
  class MandateActionRequest (line 18) | class MandateActionRequest(BaseModel):
  class MandateRevokeRequest (line 23) | class MandateRevokeRequest(MandateActionRequest):
  function list_mandates (line 28) | async def list_mandates(
  function activate_mandate (line 64) | async def activate_mandate(
  function suspend_mandate (line 85) | async def suspend_mandate(
  function resume_mandate (line 104) | async def resume_mandate(
  function revoke_mandate (line 123) | async def revoke_mandate(
  function _load_mandate (line 153) | async def _load_mandate(mandate_id: str, db: AsyncSession) -> Mandate:
  function _emit_event (line 166) | def _emit_event(
  function _mandate_to_dict (line 186) | def _mandate_to_dict(m: Mandate) -> dict:

FILE: finogrid/services/ops_console/routers/search.py
  function unified_search (line 21) | async def unified_search(

FILE: finogrid/services/partner_execution/bridge_client.py
  class BridgeError (line 23) | class BridgeError(Exception):
    method __init__ (line 24) | def __init__(self, status_code: int, detail: str):
  class BridgeClient (line 30) | class BridgeClient:
    method __init__ (line 33) | def __init__(self, api_key: str, base_url: str):
    method __aenter__ (line 38) | async def __aenter__(self):
    method __aexit__ (line 49) | async def __aexit__(self, *args):
    method create_transfer (line 53) | async def create_transfer(
    method get_transfer (line 108) | async def get_transfer(self, bridge_transfer_id: str) -> dict:
    method cancel_transfer (line 115) | async def cancel_transfer(self, bridge_transfer_id: str) -> dict:

FILE: finogrid/services/partner_execution/executor.py
  class ExecutionService (line 23) | class ExecutionService:
    method __init__ (line 25) | def __init__(self, bridge_client: BridgeClient, max_retries: int = 3):
    method execute_task (line 29) | async def execute_task(self, task, db) -> bool:
    method poll_task_status (line 89) | async def poll_task_status(self, task, db) -> Optional[str]:

FILE: finogrid/services/reconciliation/reconciler.py
  class ReconciliationService (line 24) | class ReconciliationService:
    method __init__ (line 26) | def __init__(self, bridge_client, publisher, pubsub_project: str, db_s...
    method reconcile_batch (line 32) | async def reconcile_batch(self, batch_id: str) -> dict:
    method _poll_task (line 92) | async def _poll_task(self, task) -> Optional[str]:
    method generate_report (line 102) | async def generate_report(self, batch_id: str, format: str = "json") -...
    method _publish_audit_event (line 143) | def _publish_audit_event(self, event_type: str, payload: dict):

FILE: finogrid/services/routing_engine/engine.py
  class RoutingError (line 24) | class RoutingError(Exception):
  class AssetType (line 28) | class AssetType(str, Enum):
  class DeliveryMode (line 33) | class DeliveryMode(str, Enum):
  class RoutingDecision (line 39) | class RoutingDecision:
  class RoutingEngine (line 51) | class RoutingEngine:
    method __init__ (line 57) | def __init__(self, routing_profile, compliance_profile):
    method decide (line 61) | def decide(
    method _resolve_asset (line 118) | def _resolve_asset(self, preferred: Optional[str], rp, notes: list) ->...
    method _resolve_mode (line 134) | def _resolve_mode(
    method _select_partner (line 164) | def _select_partner(self, mode: DeliveryMode, rp) -> tuple[str, Option...

FILE: finogrid/services/routing_engine/worker.py
  class RoutingWorker (line 18) | class RoutingWorker:
    method __init__ (line 19) | def __init__(self, settings):
    method process_batch (line 26) | async def process_batch(self, batch_id: str):
    method _route_task (line 42) | async def _route_task(self, db: AsyncSession, task: PayoutTask):
    method _publish (line 100) | def _publish(self, topic: str, payload: dict):
    method start (line 104) | def start(self, subscription: str):

FILE: finogrid/tests/integration/test_minimax_integration.py
  function test_minimax_sentiment_live (line 20) | async def test_minimax_sentiment_live():
  function test_minimax_sentiment_corridor_news_live (line 35) | async def test_minimax_sentiment_corridor_news_live():
  function test_minimax_llm_client_live (line 54) | async def test_minimax_llm_client_live():
  function test_minimax_llm_client_with_agent (line 67) | async def test_minimax_llm_client_with_agent():

FILE: finogrid/tests/unit/test_agent_ledger.py
  class TestKYAGate (line 25) | class TestKYAGate:
    method test_unverified_agent_blocked (line 29) | async def test_unverified_agent_blocked(self):
    method test_pending_agent_blocked_for_basic (line 41) | async def test_pending_agent_blocked_for_basic(self):
    method test_basic_agent_passes_basic_gate (line 53) | async def test_basic_agent_passes_basic_gate(self):
    method test_enhanced_agent_passes_basic_gate (line 64) | async def test_enhanced_agent_passes_basic_gate(self):
    method test_basic_agent_blocked_for_enhanced (line 74) | async def test_basic_agent_blocked_for_enhanced(self):
    method test_kya_daily_limit_basic (line 85) | def test_kya_daily_limit_basic(self):
    method test_kya_daily_limit_enhanced (line 90) | def test_kya_daily_limit_enhanced(self):
    method test_kya_daily_limit_unverified (line 95) | def test_kya_daily_limit_unverified(self):
  class TestClosedLoopIntents (line 103) | class TestClosedLoopIntents:
    method _make_wallet (line 106) | def _make_wallet(self, loop_type="closed", status="active"):
    method _make_intent (line 123) | def _make_intent(self, status="reserved", expired=False, amount=Decima...
    method test_closed_loop_wallet_type (line 135) | def test_closed_loop_wallet_type(self):
    method test_open_loop_wallet_type (line 140) | def test_open_loop_wallet_type(self):
    method test_intent_expired_detected (line 145) | def test_intent_expired_detected(self):
    method test_intent_not_expired (line 150) | def test_intent_not_expired(self):
    method test_intent_amount_mismatch (line 155) | def test_intent_amount_mismatch(self):
    method test_intent_amount_match (line 161) | def test_intent_amount_match(self):
    method test_intent_consumed_status_invalid (line 167) | def test_intent_consumed_status_invalid(self):
    method test_intent_superseded_status_invalid (line 172) | def test_intent_superseded_status_invalid(self):
  class TestSpendingRules (line 180) | class TestSpendingRules:
    method test_per_tx_cap_exceeded (line 183) | def test_per_tx_cap_exceeded(self):
    method test_per_tx_cap_not_exceeded (line 191) | def test_per_tx_cap_not_exceeded(self):
    method test_daily_cap_exceeded (line 199) | def test_daily_cap_exceeded(self):
    method test_daily_cap_not_exceeded (line 208) | def test_daily_cap_not_exceeded(self):
    method test_counterparty_allowlist_blocks (line 217) | def test_counterparty_allowlist_blocks(self):
    method test_counterparty_allowlist_passes (line 225) | def test_counterparty_allowlist_passes(self):
    method test_empty_allowlist_allows_any (line 234) | def test_empty_allowlist_allows_any(self):
    method test_available_balance_check (line 241) | def test_available_balance_check(self):
    method test_wallet_max_uses_reached (line 250) | def test_wallet_max_uses_reached(self):
    method test_wallet_not_expired (line 256) | def test_wallet_not_expired(self):
  class TestIdempotency (line 265) | class TestIdempotency:
    method test_idempotency_key_uniqueness (line 266) | def test_idempotency_key_uniqueness(self):
    method test_different_keys_are_different (line 272) | def test_different_keys_are_different(self):
  class TestIntentSweeper (line 280) | class TestIntentSweeper:
    method test_sweep_expired_intents_logic (line 282) | async def test_sweep_expired_intents_logic(self):
    method test_reserved_balance_release_calculation (line 303) | def test_reserved_balance_release_calculation(self):
    method test_reserved_balance_never_negative (line 311) | def test_reserved_balance_never_negative(self):
  class TestX402Middleware (line 321) | class TestX402Middleware:
    method _make_signature (line 322) | def _make_signature(self, path: str, amount: str = "0.001", offset_sec...
    method test_valid_signature_structure (line 336) | def test_valid_signature_structure(self):
    method test_expired_signature_rejected (line 342) | def test_expired_signature_rejected(self):
    method test_resource_mismatch_rejected (line 350) | def test_resource_mismatch_rejected(self):
    method test_encode_decode_requirement_roundtrip (line 358) | def test_encode_decode_requirement_roundtrip(self):
  class TestMandateModel (line 369) | class TestMandateModel:
    method test_mandate_status_values (line 370) | def test_mandate_status_values(self):
    method test_mandate_scope_values (line 377) | def test_mandate_scope_values(self):
    method test_approval_mode_values (line 383) | def test_approval_mode_values(self):
    method test_mandate_event_types (line 389) | def test_mandate_event_types(self):
    method test_mandate_allowed_corridors_constraint (line 395) | def test_mandate_allowed_corridors_constraint(self):
    method test_mandate_corridor_restriction (line 403) | def test_mandate_corridor_restriction(self):
    method test_threshold_approval_logic (line 410) | def test_threshold_approval_logic(self):
    method test_below_threshold_auto_approved (line 423) | def test_below_threshold_auto_approved(self):
  class TestKYAValidatorMCP (line 438) | class TestKYAValidatorMCP:
    method test_internal_validate_basic (line 439) | def test_internal_validate_basic(self):
    method test_internal_validate_enhanced (line 449) | def test_internal_validate_enhanced(self):
    method test_mint_validator_token_structure (line 459) | def test_mint_validator_token_structure(self):
    method test_token_not_expired (line 467) | def test_token_not_expired(self):
    method test_token_subject_matches_agent (line 474) | def test_token_subject_matches_agent(self):

FILE: finogrid/tests/unit/test_corridor_adapters.py
  function test_all_corridors_registered (line 7) | def test_all_corridors_registered(code):
  function test_brazil_fiat_requires_pix_key (line 13) | def test_brazil_fiat_requires_pix_key():
  function test_brazil_wallet_no_extra_fields (line 20) | def test_brazil_wallet_no_extra_fields():
  function test_nigeria_fiat_requires_bvn_above_threshold (line 26) | def test_nigeria_fiat_requires_bvn_above_threshold():
  function test_nigeria_uses_tron_for_usdt (line 39) | def test_nigeria_uses_tron_for_usdt():
  function test_india_fiat_requires_upi_id (line 45) | def test_india_fiat_requires_upi_id():
  function test_uae_has_higher_max_limit (line 52) | def test_uae_has_higher_max_limit():
  function test_unsupported_corridor_raises (line 57) | def test_unsupported_corridor_raises():

FILE: finogrid/tests/unit/test_minimax_provider.py
  class TestMiniMaxSentimentProvider (line 11) | class TestMiniMaxSentimentProvider:
    method test_init_with_api_key (line 15) | def test_init_with_api_key(self):
    method test_init_custom_model (line 22) | def test_init_custom_model(self):
    method test_init_missing_api_key (line 28) | def test_init_missing_api_key(self):
    method test_load_is_noop (line 36) | def test_load_is_noop(self):
    method test_score_positive (line 43) | async def test_score_positive(self):
    method test_score_negative (line 60) | async def test_score_negative(self):
    method test_score_neutral (line 76) | async def test_score_neutral(self):
    method test_score_api_error_returns_neutral (line 92) | async def test_score_api_error_returns_neutral(self):
    method test_score_temperature_is_low (line 105) | async def test_score_temperature_is_low(self):
    method test_score_corridor_news (line 123) | async def test_score_corridor_news(self):
    method test_score_truncates_long_text (line 147) | async def test_score_truncates_long_text(self):
    method test_base_url_is_minimax (line 165) | def test_base_url_is_minimax(self):
  class TestMiniMaxLLMClient (line 175) | class TestMiniMaxLLMClient:
    method test_init_defaults (line 179) | def test_init_defaults(self):
    method test_init_custom_params (line 187) | def test_init_custom_params(self):
    method test_temperature_clamped_to_min (line 199) | def test_temperature_clamped_to_min(self):
    method test_temperature_clamped_to_max (line 206) | def test_temperature_clamped_to_max(self):
    method test_init_missing_api_key (line 213) | def test_init_missing_api_key(self):
    method test_chat_returns_text (line 221) | async def test_chat_returns_text(self):
    method test_chat_strips_whitespace (line 236) | async def test_chat_strips_whitespace(self):
    method test_chat_api_error_raises (line 251) | async def test_chat_api_error_raises(self):
    method test_chat_passes_correct_params (line 262) | async def test_chat_passes_correct_params(self):
    method test_base_url_is_minimax (line 280) | def test_base_url_is_minimax(self):
  class TestGetSentimentAnalyzerFactory (line 290) | class TestGetSentimentAnalyzerFactory:
    method test_factory_returns_minimax_provider (line 298) | def test_factory_returns_minimax_provider(self):
    method test_factory_returns_openai_provider (line 314) | def test_factory_returns_openai_provider(self):

FILE: finogrid/tests/unit/test_routing_engine.py
  function make_profiles (line 9) | def make_profiles(
  function test_basic_routing_usdt_wallet (line 35) | def test_basic_routing_usdt_wallet():
  function test_fiat_mode_from_preferred (line 44) | def test_fiat_mode_from_preferred():
  function test_usdc_preferred (line 52) | def test_usdc_preferred():
  function test_amount_below_minimum_raises (line 59) | def test_amount_below_minimum_raises():
  function test_amount_above_maximum_raises (line 66) | def test_amount_above_maximum_raises():
  function test_disabled_corridor_raises (line 73) | def test_disabled_corridor_raises():
  function test_mode_inferred_from_wallet_address (line 81) | def test_mode_inferred_from_wallet_address():
  function test_mode_inferred_from_bank_account (line 91) | def test_mode_inferred_from_bank_account():
  function test_no_asset_available_raises (line 101) | def test_no_asset_available_raises():
Copy disabled (too large) Download .json
Condensed preview — 376 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (11,878K chars).
[
  {
    "path": ".github/FUNDING.yml",
    "chars": 640,
    "preview": "# These are supported funding model platforms\n\ngithub: [BruceYanghy]\nopen_collective: # Replace with a single Open Colle"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "chars": 595,
    "preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Is your fea"
  },
  {
    "path": ".gitignore",
    "chars": 2121,
    "preview": "# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packagi"
  },
  {
    "path": ".gitpod.yml",
    "chars": 416,
    "preview": "# This configuration file was automatically generated by Gitpod.\n# Please adjust to your needs (see https://www.gitpod.i"
  },
  {
    "path": ".idea/.gitignore",
    "chars": 47,
    "preview": "# Default ignored files\n/shelf/\n/workspace.xml\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 4412,
    "preview": "# Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as contributors and"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 3024,
    "preview": "# FinGPT Contribution Guidelines 🚀\n\nWelcome to the FinGPT project! We are thrilled to have you here 🌟. Your contribution"
  },
  {
    "path": "FinGPT_ Training with LoRA and Meta-Llama-3-8B.ipynb",
    "chars": 532907,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[],\"machine_shape\":\"hm\",\"toc_visible\":true,\"gpuType\":"
  },
  {
    "path": "FinGPT_Inference_Llama2_13B_falcon_7B_for_Beginners.ipynb",
    "chars": 228655,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"colab\": {\n      \"provenance\": [],\n      \"machine_shape\": "
  },
  {
    "path": "FinGPT_Training_LoRA_with_ChatGLM2_6B_for_Beginners.ipynb",
    "chars": 748136,
    "preview": "{\n  \"cells\": [\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"view-in-github\",\n        \"colab_t"
  },
  {
    "path": "FinGPT_Training_LoRA_with_ChatGLM2_6B_for_Beginners_v2-2.ipynb",
    "chars": 376173,
    "preview": "{\n  \"cells\": [\n    {\n      \"cell_type\": \"markdown\",\n      \"source\": [\n        \"# Getting Started with FinGPT\\n\",\n       "
  },
  {
    "path": "LICENSE",
    "chars": 1083,
    "preview": "MIT License\n\nCopyright (c) 2024 AI4Finance Foundation Inc.\n\nPermission is hereby granted, free of charge, to any person "
  },
  {
    "path": "MANIFEST.in",
    "chars": 67,
    "preview": "include fingpt/FinGPT_Benchmark/benchmarks/sentiment_templates.txt\n"
  },
  {
    "path": "README.md",
    "chars": 31796,
    "preview": "<div align=\"center\">\n<img align=\"center\" width=\"30%\" alt=\"image\" src=\"https://github.com/AI4Finance-Foundation/FinGPT/as"
  },
  {
    "path": "Use_Cases.md",
    "chars": 10986,
    "preview": "# FinGPT: Corporate FX Exposure Management Use Cases\n\n> Applying FinGPT to the real cost problem in corporate treasury: "
  },
  {
    "path": "figs/README.md",
    "chars": 8,
    "preview": "figures\n"
  },
  {
    "path": "fingpt/FinGPT_Benchmark/__init__.py",
    "chars": 82,
    "preview": "from .data.download import download as download_datasets\nfrom . import benchmarks\n"
  },
  {
    "path": "fingpt/FinGPT_Benchmark/benchmarks/__init__.py",
    "chars": 157,
    "preview": "from . import fpb, fiqa, finred, fineval, convfinqa, headline, ner, nwgi, tfns\n\n__all__ = [fpb, fiqa, finred, fineval, c"
  },
  {
    "path": "fingpt/FinGPT_Benchmark/benchmarks/benchmarks.py",
    "chars": 3993,
    "preview": "from transformers import AutoTokenizer, AutoModelForCausalLM\nfrom peft import PeftModel, get_peft_model, LoraConfig, Tas"
  },
  {
    "path": "fingpt/FinGPT_Benchmark/benchmarks/convfinqa.py",
    "chars": 2406,
    "preview": "from seqeval.metrics import accuracy_score\nfrom datasets import load_dataset, load_from_disk\nfrom tqdm import tqdm\nimpor"
  },
  {
    "path": "fingpt/FinGPT_Benchmark/benchmarks/evaluate.sh",
    "chars": 10144,
    "preview": "# export TRANSFORMERS_NO_ADVISORY_WARNINGS=1\n# export TOKENIZERS_PARALLELISM=0\n\n\n\n\n#---- Relation Extraction ----\n\npytho"
  },
  {
    "path": "fingpt/FinGPT_Benchmark/benchmarks/fineval.py",
    "chars": 2274,
    "preview": "from seqeval.metrics import accuracy_score\nfrom datasets import load_dataset, load_from_disk\nfrom tqdm import tqdm\nimpor"
  },
  {
    "path": "fingpt/FinGPT_Benchmark/benchmarks/finred.py",
    "chars": 4720,
    "preview": "from seqeval.metrics import classification_report\nfrom datasets import load_dataset, load_from_disk\nfrom tqdm import tqd"
  },
  {
    "path": "fingpt/FinGPT_Benchmark/benchmarks/fiqa.py",
    "chars": 7625,
    "preview": "import warnings\nwarnings.filterwarnings(\"ignore\")\n\nfrom sklearn.metrics import accuracy_score,f1_score\nfrom datasets imp"
  },
  {
    "path": "fingpt/FinGPT_Benchmark/benchmarks/fpb.py",
    "chars": 7180,
    "preview": "import warnings\nwarnings.filterwarnings(\"ignore\")\n\nfrom sklearn.metrics import accuracy_score,f1_score\nfrom datasets imp"
  },
  {
    "path": "fingpt/FinGPT_Benchmark/benchmarks/headline.py",
    "chars": 3095,
    "preview": "from sklearn.metrics import accuracy_score, f1_score, classification_report\nfrom datasets import load_dataset, load_from"
  },
  {
    "path": "fingpt/FinGPT_Benchmark/benchmarks/ner.py",
    "chars": 3114,
    "preview": "from seqeval.metrics import classification_report\nfrom datasets import load_dataset, load_from_disk\nfrom tqdm import tqd"
  },
  {
    "path": "fingpt/FinGPT_Benchmark/benchmarks/nwgi.py",
    "chars": 3519,
    "preview": "import warnings\nwarnings.filterwarnings(\"ignore\")\n\nfrom sklearn.metrics import accuracy_score,f1_score\nfrom datasets imp"
  },
  {
    "path": "fingpt/FinGPT_Benchmark/benchmarks/sentiment_templates.txt",
    "chars": 345,
    "preview": "What is the sentiment of the input {type} from financial perspective?\nAssign a sentiment category to this {type} related"
  },
  {
    "path": "fingpt/FinGPT_Benchmark/benchmarks/tfns.py",
    "chars": 3160,
    "preview": "import warnings\nwarnings.filterwarnings(\"ignore\")\n\nfrom sklearn.metrics import accuracy_score,f1_score\nfrom datasets imp"
  },
  {
    "path": "fingpt/FinGPT_Benchmark/config.json",
    "chars": 784,
    "preview": "{\n    \"train_micro_batch_size_per_gpu\": \"auto\",\n    \"train_batch_size\": \"auto\",\n    \"gradient_accumulation_steps\": \"auto"
  },
  {
    "path": "fingpt/FinGPT_Benchmark/config_hf.json",
    "chars": 222,
    "preview": "{\n    \"train_micro_batch_size_per_gpu\": \"auto\",\n    \"train_batch_size\": \"auto\",\n    \"gradient_accumulation_steps\": \"auto"
  },
  {
    "path": "fingpt/FinGPT_Benchmark/config_new.json",
    "chars": 810,
    "preview": "{\n    \"train_micro_batch_size_per_gpu\": \"auto\",\n    \"train_batch_size\": \"auto\",\n    \"gradient_accumulation_steps\": \"auto"
  },
  {
    "path": "fingpt/FinGPT_Benchmark/data/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "fingpt/FinGPT_Benchmark/data/download.py",
    "chars": 1835,
    "preview": "import datasets\nfrom pathlib import Path\nimport argparse\n\nDATASETS = [\n    # source, destination\n    (('pauri32/fiqa-201"
  },
  {
    "path": "fingpt/FinGPT_Benchmark/data/prepare_data.ipynb",
    "chars": 113116,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 20,\n   \"id\": \"f4ff218d-f4eb-4e4b-9f4c-205351349fd2\",\n   "
  },
  {
    "path": "fingpt/FinGPT_Benchmark/demo.ipynb",
    "chars": 34710,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Read before you start:\\n\",\n    \"\\"
  },
  {
    "path": "fingpt/FinGPT_Benchmark/readme.md",
    "chars": 5842,
    "preview": "# FinGPT's Benchmark\n\n[FinGPT: Instruction Tuning Benchmark for Open-Source Large Language Models in Financial Datasets\n"
  },
  {
    "path": "fingpt/FinGPT_Benchmark/train.sh",
    "chars": 12933,
    "preview": "export CUDA_VISIBLE_DEVICES=0,1,2,3\nexport NCCL_IGNORE_DISABLED_P2P=1\nexport TRANSFORMERS_NO_ADVISORY_WARNINGS=1\nexport "
  },
  {
    "path": "fingpt/FinGPT_Benchmark/train_lora.py",
    "chars": 7497,
    "preview": "import os\nimport sys\nimport argparse\nfrom datetime import datetime\nfrom functools import partial\nimport datasets\nimport "
  },
  {
    "path": "fingpt/FinGPT_Benchmark/utils.py",
    "chars": 8220,
    "preview": "import os\nimport datasets\n\n# A dictionary to store various prompt templates.\ntemplate_dict = {\n    'default': 'Instructi"
  },
  {
    "path": "fingpt/FinGPT_FinancialReportAnalysis/README.md",
    "chars": 2470,
    "preview": "# Financial Report Analysis Project\n\n## Overview\n\nThis project provides tools for analyzing financial reports, specifica"
  },
  {
    "path": "fingpt/FinGPT_FinancialReportAnalysis/reportanalysis.ipynb",
    "chars": 71455,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 253,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name"
  },
  {
    "path": "fingpt/FinGPT_FinancialReportAnalysis/utils/__init__.py",
    "chars": 102,
    "preview": "from utils.earning_calls import get_earnings_transcript, extract_speakers\nfrom utils.rag import Raptor"
  },
  {
    "path": "fingpt/FinGPT_FinancialReportAnalysis/utils/earning_calls.py",
    "chars": 1691,
    "preview": "from tenacity import retry, stop_after_attempt, wait_random_exponential\nimport requests\nimport json\nfrom datetime import"
  },
  {
    "path": "fingpt/FinGPT_FinancialReportAnalysis/utils/format_pdf.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "fingpt/FinGPT_FinancialReportAnalysis/utils/rag.py",
    "chars": 16667,
    "preview": "from typing import Dict, List, Optional, Tuple\n\nimport numpy as np\nimport pandas as pd\nimport umap\nfrom langchain.prompt"
  },
  {
    "path": "fingpt/FinGPT_Forecaster/AAAI-Good-Data/README.md",
    "chars": 5348,
    "preview": "\n## What is FinGPT-Forecaster?\n- FinGPT-Forecaster takes market news and optional basic financials related to the specif"
  },
  {
    "path": "fingpt/FinGPT_Forecaster/AAAI-Good-Data/Testing.ipynb",
    "chars": 229961,
    "preview": "{\"cells\":[{\"cell_type\":\"markdown\",\"source\":[\"# 1.Preparation\"],\"metadata\":{\"id\":\"jnIUUoqSJfcR\"}},{\"cell_type\":\"code\",\"ex"
  },
  {
    "path": "fingpt/FinGPT_Forecaster/AAAI-Good-Data/Training.ipynb",
    "chars": 274554,
    "preview": "{\"cells\":[{\"cell_type\":\"markdown\",\"source\":[\"# 1.Preparation\"],\"metadata\":{\"id\":\"Ll08ZcPICXjy\"}},{\"cell_type\":\"markdown\""
  },
  {
    "path": "fingpt/FinGPT_Forecaster/AAAI-Good-Data/config.json",
    "chars": 867,
    "preview": "{\n    \"train_micro_batch_size_per_gpu\": 2,\n    \"train_batch_size\": 16,\n    \"gradient_accumulation_steps\": 8,\n    \"optimi"
  },
  {
    "path": "fingpt/FinGPT_Forecaster/AAAI-Good-Data/train.sh",
    "chars": 708,
    "preview": "export NCCL_IGNORE_DISABLED_P2P=1\nexport TRANSFORMERS_NO_ADVISORY_WARNINGS=1\nexport TOKENIZERS_PARALLELISM=0\n\ndeepspeed "
  },
  {
    "path": "fingpt/FinGPT_Forecaster/AAAI-Good-Data/train_lora.py",
    "chars": 7697,
    "preview": "from transformers.integrations import TensorBoardCallback\nfrom transformers import AutoTokenizer, AutoModelForCausalLM\nf"
  },
  {
    "path": "fingpt/FinGPT_Forecaster/AAAI-Good-Data/utils.py",
    "chars": 5852,
    "preview": "import re\nimport os\nimport datasets\nfrom sklearn.metrics import accuracy_score, mean_squared_error\nfrom collections impo"
  },
  {
    "path": "fingpt/FinGPT_Forecaster/AAAI-Good-Data/yes.gitkeep",
    "chars": 1,
    "preview": "\n"
  },
  {
    "path": "fingpt/FinGPT_Forecaster/FinGPT-Forecaster-Chinese/Ashare_data.py",
    "chars": 11599,
    "preview": "import akshare as ak\nimport pandas as pd\nimport os\nimport csv\nimport re\nimport time\nimport math\nimport json\nimport rando"
  },
  {
    "path": "fingpt/FinGPT_Forecaster/FinGPT-Forecaster-Chinese/Formulate_training_data.ipynb",
    "chars": 10625,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Formulate Instruct-Tuning Data\"\n "
  },
  {
    "path": "fingpt/FinGPT_Forecaster/FinGPT-Forecaster-Chinese/Inference_datapipe.py",
    "chars": 7099,
    "preview": "# Inference Data\n# get company news online\nfrom datetime import date, datetime, timedelta\nfrom Ashare_data import *\nimpo"
  },
  {
    "path": "fingpt/FinGPT_Forecaster/FinGPT-Forecaster-Chinese/requirement.txt",
    "chars": 102,
    "preview": "torch==2.2.1\ntransformers==4.38.2\npeft==0.10.0\naccelerate==0.29.3\nbitsandbytes==0.43.1\n\npandas\nakshare"
  },
  {
    "path": "fingpt/FinGPT_Forecaster/FinGPT-Forecaster-Chinese/train_lora.py",
    "chars": 7791,
    "preview": "from transformers.integrations import TensorBoardCallback\nfrom transformers import AutoTokenizer, AutoModel, AutoModelFo"
  },
  {
    "path": "fingpt/FinGPT_Forecaster/FinGPT-Forecaster-Chinese/utils.py",
    "chars": 5526,
    "preview": "import re\nimport os\nimport datasets\nfrom sklearn.metrics import accuracy_score, mean_squared_error\nfrom collections impo"
  },
  {
    "path": "fingpt/FinGPT_Forecaster/README.md",
    "chars": 5373,
    "preview": "![title](figs/title.png)\n\n## What is FinGPT-Forecaster?\n- FinGPT-Forecaster takes market news and optional basic financi"
  },
  {
    "path": "fingpt/FinGPT_Forecaster/app.py",
    "chars": 11956,
    "preview": "import os\nimport re\nimport time\nimport json\nimport random\nimport finnhub\nimport torch\nimport gradio as gr\nimport pandas "
  },
  {
    "path": "fingpt/FinGPT_Forecaster/config.json",
    "chars": 784,
    "preview": "{\n    \"train_micro_batch_size_per_gpu\": \"auto\",\n    \"train_batch_size\": \"auto\",\n    \"gradient_accumulation_steps\": \"auto"
  },
  {
    "path": "fingpt/FinGPT_Forecaster/data.py",
    "chars": 11026,
    "preview": "import os\nimport re\nimport csv\nimport math\nimport time\nimport json\nimport finnhub\nfrom tqdm import tqdm\nimport pandas as"
  },
  {
    "path": "fingpt/FinGPT_Forecaster/data_infererence_fetch.py",
    "chars": 3835,
    "preview": "import os\nimport finnhub\nimport yfinance as yf\nimport pandas as pd\nfrom datetime import date, datetime, timedelta\nfrom c"
  },
  {
    "path": "fingpt/FinGPT_Forecaster/data_pipeline.py",
    "chars": 2442,
    "preview": "import os \nimport json\nfrom tqdm import tqdm\nimport argparse\n\nfrom indices import *\nfrom data import  prepare_data_for_s"
  },
  {
    "path": "fingpt/FinGPT_Forecaster/demo.ipynb",
    "chars": 154463,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"id\": \"16172382-ba5f-4051-bbe7-93b32d958e09\",\n   \""
  },
  {
    "path": "fingpt/FinGPT_Forecaster/indices.py",
    "chars": 938,
    "preview": "DOW_30 = [\n    \"AXP\", \"AMGN\", \"AAPL\", \"BA\", \"CAT\", \"CSCO\", \"CVX\", \"GS\", \"HD\", \"HON\",\n    \"IBM\", \"INTC\", \"JNJ\", \"KO\", \"JP"
  },
  {
    "path": "fingpt/FinGPT_Forecaster/prepare_data.ipynb",
    "chars": 65063,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 30,\n   \"id\": \"3c4d096e\",\n   \"metadata\": {},\n   \"outputs\""
  },
  {
    "path": "fingpt/FinGPT_Forecaster/prompt.py",
    "chars": 7154,
    "preview": "import os\nimport json\nimport random\nimport finnhub\nimport yfinance as yf\nimport pandas as pd\nfrom openai import OpenAI\n\n"
  },
  {
    "path": "fingpt/FinGPT_Forecaster/requirements.txt",
    "chars": 90,
    "preview": "torch==2.0.1\ntransformers==4.32.0\npeft==0.5.0\npandas\nyfinance\nfinnhub-python\nnvidia-ml-py3"
  },
  {
    "path": "fingpt/FinGPT_Forecaster/train.sh",
    "chars": 574,
    "preview": "export NCCL_IGNORE_DISABLED_P2P=1\nexport TRANSFORMERS_NO_ADVISORY_WARNINGS=1\nexport TOKENIZERS_PARALLELISM=0\n\n\ndeepspeed"
  },
  {
    "path": "fingpt/FinGPT_Forecaster/train_lora.py",
    "chars": 8166,
    "preview": "from transformers.integrations import TensorBoardCallback\nfrom transformers import AutoTokenizer, AutoModel, AutoModelFo"
  },
  {
    "path": "fingpt/FinGPT_Forecaster/utils.py",
    "chars": 5685,
    "preview": "import re\nimport os\nimport datasets\nfrom sklearn.metrics import accuracy_score, mean_squared_error\nfrom collections impo"
  },
  {
    "path": "fingpt/FinGPT_MultiAgentsRAG/Evaluation_methods/HaluEval/evaluate.py",
    "chars": 14389,
    "preview": "import random\nimport openai\nimport time\nimport json\nimport argparse\nimport tiktoken\n\n# START: COPIED FROM <https://githu"
  },
  {
    "path": "fingpt/FinGPT_MultiAgentsRAG/Evaluation_methods/HaluEval/filtering.py",
    "chars": 13393,
    "preview": "import random\nimport openai\nimport time\nimport json\nimport argparse\n\n# START: COPIED FROM <https://github.com/RUCAIBox/H"
  },
  {
    "path": "fingpt/FinGPT_MultiAgentsRAG/Evaluation_methods/HaluEval/generate.py",
    "chars": 11634,
    "preview": "import openai\nimport time\nimport json\nimport argparse\nimport csv\n\n\n# START: COPIED FROM <https://github.com/RUCAIBox/Hal"
  },
  {
    "path": "fingpt/FinGPT_MultiAgentsRAG/Evaluation_methods/HaluEval/halueval",
    "chars": 1,
    "preview": "\n"
  },
  {
    "path": "fingpt/FinGPT_MultiAgentsRAG/Evaluation_methods/MMLU/eval_mmlu.py",
    "chars": 3434,
    "preview": "import json\nimport openai\nimport numpy as np\nimport time\nimport re\n\n# START : COPIED FROM <https://github.com/composable"
  },
  {
    "path": "fingpt/FinGPT_MultiAgentsRAG/Evaluation_methods/MMLU/gen_mmlu.py",
    "chars": 3336,
    "preview": "from glob import glob\nimport pandas as pd\nimport json\nimport time\nimport random\nimport openai\n\n# START: COPIED FROM <htt"
  },
  {
    "path": "fingpt/FinGPT_MultiAgentsRAG/Evaluation_methods/MMLU/mmlu",
    "chars": 1,
    "preview": "\n"
  },
  {
    "path": "fingpt/FinGPT_MultiAgentsRAG/Evaluation_methods/TruthfulQA/evaluate.py",
    "chars": 8275,
    "preview": "import argparse\nfrom . import models\nfrom . import metrics\nfrom . import utilities\nimport openai\nfrom .configs import EN"
  },
  {
    "path": "fingpt/FinGPT_MultiAgentsRAG/Evaluation_methods/TruthfulQA/truthfulqa",
    "chars": 1,
    "preview": "\n"
  },
  {
    "path": "fingpt/FinGPT_MultiAgentsRAG/Evaluation_methods/TruthfulQA/utilities.py",
    "chars": 3903,
    "preview": "from .presets import preset_map, COMPARE_PRIMER\nimport pandas as pd\n\n# START: COPIED FROM <https://github.com/sylinrl/Tr"
  },
  {
    "path": "fingpt/FinGPT_MultiAgentsRAG/Evaluation_methods/new_evaluation",
    "chars": 1,
    "preview": "\n"
  },
  {
    "path": "fingpt/FinGPT_MultiAgentsRAG/Fine_tune_model/fine_tune_GLM2.ipynb",
    "chars": 285741,
    "preview": "{\"cells\":[{\"cell_type\":\"code\",\"source\":[\"!pip install datasets transformers torch tqdm pandas huggingface_hub\\n\",\"!pip i"
  },
  {
    "path": "fingpt/FinGPT_MultiAgentsRAG/Fine_tune_model/fine_tune_Llama2.ipynb",
    "chars": 258286,
    "preview": "{\"cells\":[{\"cell_type\":\"code\",\"execution_count\":null,\"metadata\":{\"id\":\"x0LKogzSjJeN\"},\"outputs\":[],\"source\":[\"# install "
  },
  {
    "path": "fingpt/FinGPT_MultiAgentsRAG/Fine_tune_model/newFTmodels",
    "chars": 1,
    "preview": "\n"
  },
  {
    "path": "fingpt/FinGPT_MultiAgentsRAG/MultiAgents/inference_mmlu_Llama2.ipynb",
    "chars": 189182,
    "preview": "{\n  \"cells\": [\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": 1,\n      \"metadata\": {\n        \"colab\": {\n     "
  },
  {
    "path": "fingpt/FinGPT_MultiAgentsRAG/MultiAgents/inference_mmlu_Llama2_cleaned.ipynb",
    "chars": 461336,
    "preview": "{\n  \"cells\": [\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": 1,\n      \"metadata\": {\n        \"colab\": {\n     "
  },
  {
    "path": "fingpt/FinGPT_MultiAgentsRAG/MultiAgents/inference_mmlu_Llama2_v2.ipynb",
    "chars": 575340,
    "preview": "{\n  \"cells\": [\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": 1,\n      \"metadata\": {\n        \"colab\": {\n     "
  },
  {
    "path": "fingpt/FinGPT_MultiAgentsRAG/MultiAgents/new_file_multiagents",
    "chars": 1,
    "preview": "\n"
  },
  {
    "path": "fingpt/FinGPT_MultiAgentsRAG/RAG/RAG_part.ipynb",
    "chars": 19794,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"colab\": {\n      \"provenance\": [],\n      \"machine_shape\": "
  },
  {
    "path": "fingpt/FinGPT_MultiAgentsRAG/RAG/new_file_rag",
    "chars": 1,
    "preview": "\n"
  },
  {
    "path": "fingpt/FinGPT_MultiAgentsRAG/README.md",
    "chars": 1326,
    "preview": "# Financial Language Models for Reducing Hallucinations 💡\n\n## Introduction 🚀\n\nWelcome to our project repository, where w"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Low_Code_Development/chatgpt-low-code-development-v1/main.ipynb",
    "chars": 19662,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Low_Code_Development/chatgpt-low-code-development-v1/readme.md",
    "chars": 3794,
    "preview": "# ChatGPT Low Code Development V1: Factors Development\n\nIn financial companies, software development is an indispensable"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Low_Code_Development/chatgpt-low-code-development-v2/main.ipynb",
    "chars": 18190,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Low_Code_Development/chatgpt-low-code-development-v2/readme.md",
    "chars": 4656,
    "preview": "# ChatGPT Low Code Development V2: Finding New Factors\n\nIn addition to factor development, the quest for identifying eff"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Robo_Advisor/chatgpt-robo-advisor-v1/ChatGPT_Robo_Advisor.ipynb",
    "chars": 18779,
    "preview": "{\n \"cells\": [\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## A demo to "
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Robo_Advisor/chatgpt-robo-advisor-v1/ChatGPT_Robo_Advisor_Results.csv",
    "chars": 30657,
    "preview": "date,headlines,respond\n2023-03-01,\"Apple supplier Foxlink says working to resume production after India fire\nUPDATE 3-Ap"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Robo_Advisor/chatgpt-robo-advisor-v1/README.md",
    "chars": 193,
    "preview": "## A demo to show how we can use ChatGPT to build a Robo-advisor\n\nCodes can be found [here](./ChatGPT_Robo_Advisor.ipynb"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Robo_Advisor/chatgpt-robo-advisor-v1/requirements.txt",
    "chars": 11,
    "preview": "pandas\ntqdm"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Robo_Advisor/chatgpt-robo-advisor-v2/ChatGPT_Robo_Advisor_v2.ipynb",
    "chars": 59381,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Robo_Advisor/chatgpt-robo-advisor-v2/ChatGPT_Robo_Advisor_v2_Results.csv",
    "chars": 169763,
    "preview": "Time,Content,Open_change,ChatGPT_response\n2023-02-11,\"1 证券简称: 贵州茅台        证券代码:600519        编号: 临2023-001  贵州茅台酒股份有限公司 "
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Robo_Advisor/chatgpt-robo-advisor-v2/README.md",
    "chars": 199,
    "preview": "## A demo to show how we can use ChatGPT to build a Robo-advisor\n\nCodes can be found [here](./ChatGPT_Robo_Advisor_v2.ip"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Robo_Advisor/chatgpt-robo-advisor-v2/data/dataset.csv",
    "chars": 7665,
    "preview": "tic,time,open,high,low,close,volume,day\n600519.SH,2022-09-01,1912.15,1916.0,1880.89,1880.89,26845,3\n600519.SH,2022-09-02"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Robo_Advisor/chatgpt-robo-advisor-v2/requirements.txt",
    "chars": 22,
    "preview": "pandas\nmatplotlib\ntqdm"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v1/README.md",
    "chars": 3840,
    "preview": "# ChatGPT Trading Bot V1.\n\n[ChatGPT for FinTech](https://github.com/AI4Finance-Foundation/ChatGPT-for-FinTech): a list o"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v1/data/dataset.csv",
    "chars": 11485,
    "preview": "tic,time,open,high,low,close,volume,day\n600519.SH,2021-01-07,2097.0,2140.0,2075.0,2140.0,37931,3\n600519.SH,2021-01-08,21"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v1/data/maotai.csv",
    "chars": 35064,
    "preview": "CODE,NAME,DATE,CREATED_DATE,text_a,DESCRIPTION,READ,MARKET,CHANGE,FIRST_DAY,SECOND_DAY,original_price,open1,close1,day1,"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v1/data/maotai_another.csv",
    "chars": 32812,
    "preview": "CODE,NAME,DATE,CREATED_DATE,text_a,DESCRIPTION,READ,MARKET,CHANGE,FIRST_DAY,SECOND_DAY,original_price,open1,close1,day1,"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v1/get_chatgpt_results.ipynb",
    "chars": 29567,
    "preview": "{\n  \"cells\": [\n    {\n      \"attachments\": {},\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"w5NdTROC"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v1/requirements.txt",
    "chars": 29,
    "preview": "revChatGPT\npandas\nmatplotlib\n"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v1/trade_with_chatgpt.ipynb",
    "chars": 53048,
    "preview": "{\n \"cells\": [\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Trade with"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/README.md",
    "chars": 3129,
    "preview": "# ChatGPT Trading Bot V2.\n\n[ChatGPT for FinTech](https://github.com/AI4Finance-Foundation/ChatGPT-for-FinTech): a list o"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/get_gpt_sentiment_results/df.csv",
    "chars": 2426210,
    "preview": ",text,date,time,user_id\n0,rt AT_USER summary of yesterday's webcast featuring $ aapl $ wynn $ goog $ lgf tradereducation"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/get_gpt_sentiment_results/get_gpt_res.py",
    "chars": 1512,
    "preview": "\nimport pandas as pd\nfrom tqdm import tqdm\nimport openai\nimport pickle\nimport time\nfrom token_ import OPEN_AI_TOKEN\n\nope"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/get_gpt_sentiment_results/run.sh",
    "chars": 39,
    "preview": "python3 get_gpt_res.py > train.log 2>&1"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/openai_token/token_.py",
    "chars": 33,
    "preview": "\nOPEN_AI_TOKEN = \"your-api-token\""
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/__init__.py",
    "chars": 481,
    "preview": "from . import utils\nfrom . import timeseries\nfrom . import pos\nfrom . import txn\nfrom . import interesting_periods\nfrom "
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/_seaborn.py",
    "chars": 446,
    "preview": "\"\"\"Wrapper module around seaborn to suppress warnings on import.\n\nThis should be removed when seaborn stops raising:\n\nUs"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/_version.py",
    "chars": 483,
    "preview": "\n# This file was generated by 'versioneer.py' (0.15) from\n# revision-control system data, or from the parent directory n"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/capacity.py",
    "chars": 9616,
    "preview": "from __future__ import division\n\nimport empyrical as ep\nimport numpy as np\nimport pandas as pd\n\nfrom . import pos\n\n\ndef "
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/deprecate.py",
    "chars": 1499,
    "preview": "\"\"\"Utilities for marking deprecated functions.\"\"\"\n# Copyright 2018 Quantopian, Inc.\n#\n# Licensed under the Apache Licens"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/interesting_periods.py",
    "chars": 2904,
    "preview": "#\n# Copyright 2016 Quantopian, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/ipycompat.py",
    "chars": 581,
    "preview": "import IPython\n\nIPY_MAJOR = IPython.version_info[0]\nif IPY_MAJOR < 3:\n    raise ImportError(\"IPython version %d is not s"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/perf_attrib.py",
    "chars": 22416,
    "preview": "#\n# Copyright 2017 Quantopian, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/plotting.py",
    "chars": 63276,
    "preview": "#\n# Copyright 2018 Quantopian, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/pos.py",
    "chars": 7172,
    "preview": "#\n# Copyright 2016 Quantopian, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/round_trips.py",
    "chars": 15178,
    "preview": "#\n# Copyright 2016 Quantopian, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/tears.py",
    "chars": 47386,
    "preview": "#\n# Copyright 2019 Quantopian, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/tests/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/tests/test_capacity.py",
    "chars": 5477,
    "preview": "from __future__ import division\nfrom unittest import TestCase\nfrom nose_parameterized import parameterized\n\nfrom pandas "
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/tests/test_nbs.py",
    "chars": 666,
    "preview": "#!/usr/bin/env python\n\"\"\"\nsimple example script for running notebooks and reporting exceptions.\nUsage: `checkipnb.py foo"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/tests/test_perf_attrib.py",
    "chars": 18611,
    "preview": "import numpy as np\nimport pandas as pd\nimport unittest\nimport warnings\n\nimport empyrical as ep\nfrom pyfolio.perf_attrib "
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/tests/test_pos.py",
    "chars": 6850,
    "preview": "from unittest import TestCase\nfrom nose_parameterized import parameterized\nfrom collections import OrderedDict\nimport os"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/tests/test_round_trips.py",
    "chars": 7911,
    "preview": "from nose_parameterized import parameterized\n\nfrom unittest import TestCase\n\nfrom pandas import (\n    Series,\n    DataFr"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/tests/test_tears.py",
    "chars": 4911,
    "preview": "from matplotlib.testing.decorators import cleanup\n\nfrom unittest import TestCase\nfrom nose_parameterized import paramete"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/tests/test_timeseries.py",
    "chars": 12272,
    "preview": "from __future__ import division\n\nimport os\nfrom unittest import TestCase\nfrom nose_parameterized import parameterized\nfr"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/tests/test_txn.py",
    "chars": 3215,
    "preview": "from unittest import TestCase\n\nfrom pandas import (\n    Series,\n    DataFrame,\n    date_range\n)\nfrom pandas.util.testing"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/timeseries.py",
    "chars": 37350,
    "preview": "#\n# Copyright 2018 Quantopian, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/txn.py",
    "chars": 6457,
    "preview": "#\n# Copyright 2016 Quantopian, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/pyfolio/utils.py",
    "chars": 16144,
    "preview": "#\n# Copyright 2018 Quantopian, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/requirements.txt",
    "chars": 27,
    "preview": "pandas\ntqdm\nopenai>=0.27.0\n"
  },
  {
    "path": "fingpt/FinGPT_Others/FinGPT_Trading/chatgpt-trading-v2/trade_with_gpt3.ipynb",
    "chars": 682144,
    "preview": "{\n \"cells\": [\n  {\n   \"attachments\": {},\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Proxy (To"
  },
  {
    "path": "fingpt/FinGPT_Others/shares_news_sentiment_classify.py",
    "chars": 4191,
    "preview": "import os.path\nimport json\n\nimport http.client\nimport urllib.parse\n\nimport pandas as pd\nimport tushare as ts\n\nimport os\n"
  },
  {
    "path": "fingpt/FinGPT_RAG/README.md",
    "chars": 4836,
    "preview": "# Enhancing Financial Sentiment Analysis via Retrieval Augmented Large Language Models: Open Source Code\n\n[Our Paper](ht"
  },
  {
    "path": "fingpt/FinGPT_RAG/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/README.md",
    "chars": 1945,
    "preview": "\nA fast, affordable, scalable and open system framework for enabling end-to-end Instruction Tuning experience to generat"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/chat.py",
    "chars": 1020,
    "preview": "# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\n\nimport argparse\nimport s"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/convert_llama_weights_to_hf.py",
    "chars": 12245,
    "preview": "# Copyright 2022 EleutherAI and The HuggingFace Inc. team. All rights reserved.\n#\n# Licensed under the Apache License, V"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/infer.sh",
    "chars": 1040,
    "preview": "#!/usr/bin/env bash\n\n# export HF_HOME=/mnt/boyu.muzhe/model/huggingface/\n\n# facebook/opt-1.3b\n# python chat.py --phase=i"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/inference/batchbot.py",
    "chars": 7702,
    "preview": "# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\n\nimport argparse\nimport r"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/inference/batchbot_torch.py",
    "chars": 5293,
    "preview": "# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\n\nimport argparse\nimport r"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/inference/chatbot.py",
    "chars": 4777,
    "preview": "# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\n\nimport argparse\nimport r"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/inference/f1fromcm.py",
    "chars": 876,
    "preview": "import numpy as np\ndef f1_score(confusion_matrix):\n    num_classes = confusion_matrix.shape[0]\n    f1_scores = np.zeros("
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/load_data.ipynb",
    "chars": 157928,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/nohup.out",
    "chars": 6647,
    "preview": "usage: train.py [-h]\n                [--actor-model {1.3b,6.7b,13b,66b,llama-13b,sent-1.3b,sent-llama-7b,sent-llama2-7b}"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/train.py",
    "chars": 4826,
    "preview": "# Acknowledgement\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n# DeepSpeed Team\n\"\"\"\nRun "
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/train.sh",
    "chars": 167,
    "preview": "#!/usr/bin/env bash\n\n# export HF_HOME=/path/to/huggingface/\n\npython train.py --actor-model facebook/opt-sent-1.3b --depl"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/README.md",
    "chars": 13862,
    "preview": "# 🐕 Supervised finetuning (SFT)\nSupervised finetuning (SFT) is very similar to standard language model finetuning on cas"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/evaluation_scripts/run_prompt.sh",
    "chars": 336,
    "preview": "#!/bin/bash\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\n\n# You can pr"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/main.py",
    "chars": 13841,
    "preview": "#!/usr/bin/env python\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nimp"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/main_data.py",
    "chars": 9809,
    "preview": "#!/usr/bin/env python\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nimp"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/prompt_eval.py",
    "chars": 9679,
    "preview": "# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nimport argparse\nimport lo"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/training_scripts/README.md",
    "chars": 357,
    "preview": "### 💁For each folder, the bash scripts are examples of \"facebook/opt\" family.\n\nIf you want to change your model such as "
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/training_scripts/multi_node/run_66b.sh",
    "chars": 983,
    "preview": "#!/bin/bash\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nOUTPUT=$1\nZER"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/training_scripts/multi_node/run_sent-1.3b.sh",
    "chars": 828,
    "preview": "#!/bin/bash\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nOUTPUT=$1\nZER"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/training_scripts/multi_node/run_sent-llama-7b.sh",
    "chars": 1133,
    "preview": "#!/bin/bash\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nOUTPUT=$1\nZER"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/training_scripts/other_language/run_chinese.sh",
    "chars": 904,
    "preview": "#!/bin/bash\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nMODEL=bigscie"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/training_scripts/other_language/run_japanese.sh",
    "chars": 887,
    "preview": "#!/bin/bash\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nMODEL=sberban"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/training_scripts/single_gpu/run_1.3b.sh",
    "chars": 560,
    "preview": "#!/bin/bash\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\n\n# Note that "
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/training_scripts/single_gpu/run_6.7b_lora.sh",
    "chars": 954,
    "preview": "#!/bin/bash\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\n\n# Note that "
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/training_scripts/single_gpu/run_sent-1.3b.sh",
    "chars": 743,
    "preview": "#!/bin/bash\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nOUTPUT=$1\nif "
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/training_scripts/single_node/run_1.3b.sh",
    "chars": 896,
    "preview": "#!/bin/bash\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nOUTPUT=$1\nZER"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/training_scripts/single_node/run_1.3b_lora.sh",
    "chars": 936,
    "preview": "#!/bin/bash\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\n\n# Note that "
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/training_scripts/single_node/run_13b.sh",
    "chars": 983,
    "preview": "#!/bin/bash\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nOUTPUT=$1\nZER"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/training_scripts/single_node/run_30b_lora.sh",
    "chars": 843,
    "preview": "#!/bin/bash\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nOUTPUT_PATH=."
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/training_scripts/single_node/run_6.7b.sh",
    "chars": 927,
    "preview": "#!/bin/bash\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nOUTPUT=$1\nZER"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/training_scripts/single_node/run_llama-13b.sh",
    "chars": 1000,
    "preview": "#!/bin/bash\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nOUTPUT=$1\nZER"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/training_scripts/single_node/run_sent-1.3b.sh",
    "chars": 827,
    "preview": "#!/bin/bash\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nOUTPUT=$1\nZER"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/training_scripts/single_node/run_sent-llama-7b.sh",
    "chars": 931,
    "preview": "#!/bin/bash\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nOUTPUT=$1\nZER"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/supervised_finetuning/training_scripts/single_node/run_sent-llama2-7b.sh",
    "chars": 947,
    "preview": "#!/bin/bash\n# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nOUTPUT=$1\nZER"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/utils/data/data_utils.py",
    "chars": 21804,
    "preview": "# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\n\"\"\"\nPart of the code was "
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/utils/data/raw_datasets.py",
    "chars": 27091,
    "preview": "# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nfrom datasets import load"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/utils/ds_utils.py",
    "chars": 2249,
    "preview": "# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nGLOBAL_BATCH_SIZE = 32\nMI"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/utils/model/model_utils.py",
    "chars": 2521,
    "preview": "# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nimport os\nimport math\nimp"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/utils/model/reward_model.py",
    "chars": 6590,
    "preview": "# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nimport torch\nfrom torch i"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/utils/module/lora.py",
    "chars": 4836,
    "preview": "# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nimport math\nimport torch\n"
  },
  {
    "path": "fingpt/FinGPT_RAG/instruct-FinGPT/training/utils/utils.py",
    "chars": 5088,
    "preview": "# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\nimport os\nimport torch\nim"
  },
  {
    "path": "fingpt/FinGPT_RAG/multisource_retrieval/ChatGPT_sentiment_analysis_benchmark.ipynb",
    "chars": 8078,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"id\": \"2c7601bd\",\n   \"metadata\": {},\n   \"outputs\":"
  },
  {
    "path": "fingpt/FinGPT_RAG/multisource_retrieval/README.md",
    "chars": 1461,
    "preview": "## FinGPT Sentiment Analysis\n\n## Motivations:\n* Classify financial statements to help traders aggregate and digest finan"
  },
  {
    "path": "fingpt/FinGPT_RAG/multisource_retrieval/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "fingpt/FinGPT_RAG/multisource_retrieval/count_contexts.py",
    "chars": 1743,
    "preview": "import pandas as pd\nimport easygui as gui\n\ndef find_different_rows():\n    # Prompt user to select CSV file\n    file_path"
  },
  {
    "path": "fingpt/FinGPT_RAG/multisource_retrieval/data/sent_valid.csv",
    "chars": 215909,
    "preview": "text,label\n$ALLY - Ally Financial pulls outlook https://t.co/G9Zdi1boy5,0\n\"$DELL $HPE - Dell, HPE targets trimmed on com"
  },
  {
    "path": "fingpt/FinGPT_RAG/multisource_retrieval/data/sent_valid_penultimate_run.csv",
    "chars": 236866,
    "preview": "text,label,classification,link,contextualized_sentence\n$ALLY - Ally Financial pulls outlook https://t.co/G9Zdi1boy5,0,Se"
  },
  {
    "path": "fingpt/FinGPT_RAG/multisource_retrieval/data/sent_valid_penultimate_run_classified.csv",
    "chars": 236697,
    "preview": "text,label,classification,link,contextualized_sentence,openai_inferred_sentiment\n$ALLY - Ally Financial pulls outlook ht"
  },
  {
    "path": "fingpt/FinGPT_RAG/multisource_retrieval/data/sent_valid_penultimate_run_classified_classified.csv",
    "chars": 237797,
    "preview": "text,label,classification,link,contextualized_sentence,openai_inferred_sentiment,openai_inferred_sentiment_from_RAG\n$ALL"
  }
]

// ... and 176 more files (download for full content)

About this extraction

This page contains the full source code of the AI4Finance-Foundation/FinGPT GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 376 files (10.8 MB), approximately 2.8M tokens, and a symbol index with 1264 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!