From 84cd19f839b3c31d1dd5964612acee3b2e3a52c1 Mon Sep 17 00:00:00 2001 From: Joshuaclymer Date: Sat, 11 Nov 2023 23:01:53 +0000 Subject: [PATCH] added data downloading --- .gitignore | 4 +- README.md | 4 +- __pycache__/download_data.cpython-310.pyc | Bin 1341 -> 1215 bytes download_data.py | 43 +++ requirements.txt | 274 ++++++++---------- setup.py | 19 +- src/fig_benchmark.egg-info/PKG-INFO | 52 ++++ src/fig_benchmark.egg-info/SOURCES.txt | 15 + .../dependency_links.txt | 1 + src/fig_benchmark.egg-info/requires.txt | 203 +++++++++++++ src/fig_benchmark.egg-info/top_level.txt | 1 + src/genies_benchmark.egg-info/PKG-INFO | 52 ++++ src/genies_benchmark.egg-info/SOURCES.txt | 15 + .../dependency_links.txt | 1 + src/genies_benchmark.egg-info/requires.txt | 203 +++++++++++++ src/genies_benchmark.egg-info/top_level.txt | 1 + upload_data.py | 29 ++ 17 files changed, 757 insertions(+), 160 deletions(-) create mode 100644 download_data.py create mode 100644 src/fig_benchmark.egg-info/PKG-INFO create mode 100644 src/fig_benchmark.egg-info/SOURCES.txt create mode 100644 src/fig_benchmark.egg-info/dependency_links.txt create mode 100644 src/fig_benchmark.egg-info/requires.txt create mode 100644 src/fig_benchmark.egg-info/top_level.txt create mode 100644 src/genies_benchmark.egg-info/PKG-INFO create mode 100644 src/genies_benchmark.egg-info/SOURCES.txt create mode 100644 src/genies_benchmark.egg-info/dependency_links.txt create mode 100644 src/genies_benchmark.egg-info/requires.txt create mode 100644 src/genies_benchmark.egg-info/top_level.txt create mode 100644 upload_data.py diff --git a/.gitignore b/.gitignore index 96eaa4a..8f6b929 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ models/ configs/credentials.json build/ -env/ \ No newline at end of file +env/ +upload_data.py +genies-datasets.tar diff --git a/README.md b/README.md index 7826fa2..309ed57 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ As AI systems become more capable and are deployed in complex environments, it m ## Quickstart This repository contains: -- Our datasets (`./distributions`) along with pairing specifications (`./distribution_shifts`). +- Our datasets (`./distributions`) along with pairing specifications (`./distribution_shifts`). Download our datasets [here](https://genies-data.s3.us-east-2.amazonaws.com/genies-datasets.tar) or run the setup command after cloning the repo. - Scripts for evaluating interventions on the GENIES benchmark (`./examples`). - Our results (`./results`). - Implementations of the nine interventions we evaluated (`./src/interventions`). @@ -18,7 +18,7 @@ All of the models we fine-tuned with Lora can be found on [huggingface](https:// **Setup:** ``` conda create --name env python=3.10 -pip install -e . +pip install . python download_model_from_hf.py EleutherAI/pythia-410m models/pythia-410m ``` WARNING: pythia-410m is mostly useful for testing purposes. Most tuning interventions perform poorly with this model. diff --git a/__pycache__/download_data.cpython-310.pyc b/__pycache__/download_data.cpython-310.pyc index 111b23304a7906de3332dd668b3be431e04cde85..d694dc90880b10f6ed361df13c272a87011f6b62 100644 GIT binary patch delta 152 zcmdnXwV#tOpO=@50SG>^2Bhv{-N-kMkzYTfq@1hQW%>V85v3#Q(`gzbH)lH}Zo^%+#mQv_(ApbHSF+si@f$wBrknwzPuf;% zwkYb?Mi_cOf0!=3.10 +Description-Content-Type: text/markdown + +# Generalization Analogies: A Testbed for Generalizing AI Oversight to Hard-To-Measure Domains +Read our paper [here](TODO). Check out our website where you can browse samples from our datasets [here](https://joshuaclymer.github.io/generalization-analogies-website/). + +![Hero](assets/hero_horizontal.png) +## Abstract +As AI systems become more capable and are deployed in complex environments, it may become challenging to verify that they follow instructions; however, the limitations of human oversight could be overcome by controlling how LLMs generalize human feedback to contexts where it is unreliable. To better understand how Reward Models generalize human feedback, we craft 69 distribution shifts spanning 8 different categories. We find that Reward Models do not learn to evaluate instruction-following by default and instead favor personas that resemble internet text. Techniques for interpreting Reward Model’s internal representations achieve better generalization, but still frequently fail to distinguish instruction-following from conflated behaviors. We consolidate the 15 most challenging distribution shifts into the \textbf{GEN}aralization analog\textbf{IES} (\textsc{GENIES}) benchmark, which we hope will enable progress toward controlling Reward Model generalization. + +## Quickstart + +This repository contains: +- Our datasets (`./distributions`) along with pairing specifications (`./distribution_shifts`). +- Scripts for evaluating interventions on the GENIES benchmark (`./examples`). +- Our results (`./results`). +- Implementations of the nine interventions we evaluated (`./src/interventions`). + +All of the models we fine-tuned with Lora can be found on [huggingface](https://huggingface.co/genies-models). + +**Setup:** +``` +conda create --name env python=3.10 +pip install -e . +python download_model_from_hf.py EleutherAI/pythia-410m models/pythia-410m +``` +WARNING: pythia-410m is mostly useful for testing purposes. Most tuning interventions perform poorly with this model. + +## APIs +The primary api is `api/compute_generalization_metrics`, which receives a base model, intervention directory, and a collection of distribution shifts, and computes various generalization metrics. See `examples/compute_generalization_metrics.sh` for example usage. + +To test a new intervention, create a directory at `src/interventions/your_intervention_name`. This directory must contain a `train.py` file and an `eval.py` file. + +`src/interventions/your_intervention_name/train.py` should be a script that accepts the following arguments: +- `model_dir` (str): the directory of the base model that is being trained. +- `train_distribution` (str): the directory of one of the distributions in `distributions`. For example: `distributions/alpaca_mmlu`. +- `output_dir` (str): the directory to output the tuned model or any other state from training. + +`src/interventions/your_intervention_name/eval.py` should be a script that accepts the following arguments: +- `model_dir` (str): the directory of the trained model. +- `distribution_dirs` (List\[str\]): a list of subdirectories of `distributions`. +- `output_paths` (List\[str\]): where to save the results. The results should be json files. The only required key is `eval_accuracy`. Evaluation results are stored in `results/evaluations`.# GENIES diff --git a/src/fig_benchmark.egg-info/SOURCES.txt b/src/fig_benchmark.egg-info/SOURCES.txt new file mode 100644 index 0000000..551722d --- /dev/null +++ b/src/fig_benchmark.egg-info/SOURCES.txt @@ -0,0 +1,15 @@ +README.md +setup.py +src/api/__init__.py +src/api/compute_generalization_metrics.py +src/api/data_classes.py +src/api/evaluate.py +src/api/hyperparameter_sweep.py +src/api/model.py +src/api/train.py +src/api/util.py +src/fig_benchmark.egg-info/PKG-INFO +src/fig_benchmark.egg-info/SOURCES.txt +src/fig_benchmark.egg-info/dependency_links.txt +src/fig_benchmark.egg-info/requires.txt +src/fig_benchmark.egg-info/top_level.txt \ No newline at end of file diff --git a/src/fig_benchmark.egg-info/dependency_links.txt b/src/fig_benchmark.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/fig_benchmark.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/src/fig_benchmark.egg-info/requires.txt b/src/fig_benchmark.egg-info/requires.txt new file mode 100644 index 0000000..791b1e7 --- /dev/null +++ b/src/fig_benchmark.egg-info/requires.txt @@ -0,0 +1,203 @@ +absl-py==2.0.0 +accelerate==0.24.1 +aiohttp==3.8.6 +aiosignal==1.3.1 +annotated-types==0.6.0 +anyio==3.7.1 +appdirs==1.4.4 +argon2-cffi==23.1.0 +argon2-cffi-bindings==21.2.0 +arrow==1.3.0 +asttokens==2.4.1 +async-lru==2.0.4 +async-timeout==4.0.3 +attrs==23.1.0 +Babel==2.13.1 +bcrypt==4.0.1 +beautifulsoup4==4.12.2 +bitsandbytes==0.41.2.post2 +bleach==6.1.0 +boto3==1.28.84 +botocore==1.31.84 +certifi==2023.7.22 +cffi==1.16.0 +charset-normalizer==3.3.2 +click==8.1.7 +comm==0.2.0 +contourpy==1.2.0 +cryptography==41.0.5 +cycler==0.12.1 +Cython==0.29.36 +datasets==2.14.6 +debugpy==1.8.0 +decorator==5.1.1 +deepspeed==0.12.2 +defusedxml==0.7.1 +dill==0.3.7 +distro==1.8.0 +docker-pycreds==0.4.0 +docopt==0.6.2 +docstring-parser==0.15 +einops==0.7.0 +entrypoints==0.4 +exceptiongroup==1.1.3 +executing==2.0.1 +fastjsonschema==2.18.1 +filelock==3.13.1 +fire==0.5.0 +fonttools==4.44.0 +fqdn==1.5.1 +frozenlist==1.4.0 +fsspec==2023.10.0 +gitdb==4.0.11 +GitPython==3.1.40 +h11==0.14.0 +hjson==3.1.0 +httpcore==1.0.2 +httpx==0.25.1 +huggingface-hub==0.17.3 +idna==3.4 +ipykernel==6.26.0 +ipython==8.17.2 +ipywidgets==8.1.1 +isoduration==20.11.0 +jedi==0.19.1 +Jinja2==3.1.2 +jmespath==1.0.1 +joblib==1.3.2 +json5==0.9.14 +jsonpointer==2.4 +jsonschema==4.19.2 +jsonschema-specifications==2023.7.1 +jupyter==1.0.0 +jupyter-console==6.6.3 +jupyter-events==0.9.0 +jupyter-lsp==2.2.0 +jupyter_client==8.6.0 +jupyter_core==5.5.0 +jupyter_server==2.10.0 +jupyter_server_terminals==0.4.4 +jupyterlab==4.0.8 +jupyterlab-pygments==0.2.2 +jupyterlab-widgets==3.0.9 +jupyterlab_server==2.25.1 +kiwisolver==1.4.5 +markdown-it-py==3.0.0 +MarkupSafe==2.1.3 +matplotlib==3.8.1 +matplotlib-inline==0.1.6 +mdurl==0.1.2 +mistune==3.0.2 +mpmath==1.3.0 +multidict==6.0.4 +multiprocess==0.70.15 +nbclient==0.9.0 +nbconvert==7.11.0 +nbformat==5.9.2 +nest-asyncio==1.5.8 +networkx==3.2.1 +ninja==1.11.1.1 +nltk==3.8.1 +notebook==7.0.6 +notebook_shim==0.2.3 +numpy==1.26.1 +nvidia-cublas-cu12==12.1.3.1 +nvidia-cuda-cupti-cu12==12.1.105 +nvidia-cuda-nvrtc-cu12==12.1.105 +nvidia-cuda-runtime-cu12==12.1.105 +nvidia-cudnn-cu12==8.9.2.26 +nvidia-cufft-cu12==11.0.2.54 +nvidia-curand-cu12==10.3.2.106 +nvidia-cusolver-cu12==11.4.5.107 +nvidia-cusparse-cu12==12.1.0.106 +nvidia-nccl-cu12==2.18.1 +nvidia-nvjitlink-cu12==12.3.52 +nvidia-nvtx-cu12==12.1.105 +openai==1.2.3 +overrides==7.4.0 +packaging==23.2 +pandas==2.1.3 +pandocfilters==1.5.0 +papermill==2.5.0 +paramiko==3.3.1 +parso==0.8.3 +peft==0.6.1 +pexpect==4.8.0 +Pillow==10.1.0 +pipreqs==0.4.13 +platformdirs==4.0.0 +prometheus-client==0.18.0 +prompt-toolkit==3.0.40 +protobuf==3.20.3 +psutil==5.9.6 +ptyprocess==0.7.0 +pure-eval==0.2.2 +py-cpuinfo==9.0.0 +pyarrow==14.0.1 +pycparser==2.21 +pydantic==2.4.2 +pydantic_core==2.10.1 +Pygments==2.16.1 +PyNaCl==1.5.0 +pynvml==11.5.0 +pyparsing==3.1.1 +python-dateutil==2.8.2 +python-json-logger==2.0.7 +pytz==2023.3.post1 +PyYAML==6.0.1 +pyzmq==25.1.1 +qtconsole==5.5.0 +QtPy==2.4.1 +referencing==0.30.2 +regex==2023.10.3 +requests==2.31.0 +rfc3339-validator==0.1.4 +rfc3986-validator==0.1.1 +rich==13.6.0 +rouge-score==0.1.2 +rpds-py==0.12.0 +s3transfer==0.7.0 +safetensors==0.4.0 +scikit-learn==1.3.2 +scipy==1.11.3 +seaborn==0.13.0 +Send2Trash==1.8.2 +sentencepiece==0.1.99 +sentry-sdk==1.34.0 +setproctitle==1.3.3 +shtab==1.6.4 +six==1.16.0 +smmap==5.0.1 +sniffio==1.3.0 +soupsieve==2.5 +stack-data==0.6.3 +sympy==1.12 +tenacity==8.2.3 +termcolor==2.3.0 +terminado==0.18.0 +threadpoolctl==3.2.0 +tinycss2==1.2.1 +tokenizers==0.14.1 +tomli==2.0.1 +torch==2.1.0 +tornado==6.3.3 +tqdm==4.66.1 +traitlets==5.13.0 +transformers==4.35.0 +triton==2.1.0 +trl==0.7.4 +types-python-dateutil==2.8.19.14 +typing_extensions==4.8.0 +tyro==0.5.12 +tzdata==2023.3 +uri-template==1.3.0 +urllib3==2.0.7 +wandb==0.16.0 +wcwidth==0.2.9 +webcolors==1.13 +webencodings==0.5.1 +websocket-client==1.6.4 +widgetsnbextension==4.0.9 +xxhash==3.4.1 +yarg==0.1.9 +yarl==1.9.2 diff --git a/src/fig_benchmark.egg-info/top_level.txt b/src/fig_benchmark.egg-info/top_level.txt new file mode 100644 index 0000000..eedd89b --- /dev/null +++ b/src/fig_benchmark.egg-info/top_level.txt @@ -0,0 +1 @@ +api diff --git a/src/genies_benchmark.egg-info/PKG-INFO b/src/genies_benchmark.egg-info/PKG-INFO new file mode 100644 index 0000000..2dd1ec9 --- /dev/null +++ b/src/genies_benchmark.egg-info/PKG-INFO @@ -0,0 +1,52 @@ +Metadata-Version: 2.1 +Name: genies-benchmark +Version: 0.0.1 +Summary: The fig benchmark repository contains datasets and tooling for evaluating the generalization of preferrence models. +Home-page: https://github.com/Joshuaclymer/GENIES +Author: Joshua Clymer, Garrett Baker, Rohan Subramani, and Sam Wang +Author-email: joshuamclymer@gmail.com +Classifier: Programming Language :: Python :: 3 +Classifier: License :: MIT License +Classifier: Operating System :: OS Independent +Requires-Python: >=3.10 +Description-Content-Type: text/markdown + +# Generalization Analogies: A Testbed for Generalizing AI Oversight to Hard-To-Measure Domains +Read our paper [here](TODO). Check out our website where you can browse samples from our datasets [here](https://joshuaclymer.github.io/generalization-analogies-website/). + +![Hero](assets/hero_horizontal.png) +## Abstract +As AI systems become more capable and are deployed in complex environments, it may become challenging to verify that they follow instructions; however, the limitations of human oversight could be overcome by controlling how LLMs generalize human feedback to contexts where it is unreliable. To better understand how Reward Models generalize human feedback, we craft 69 distribution shifts spanning 8 different categories. We find that Reward Models do not learn to evaluate instruction-following by default and instead favor personas that resemble internet text. Techniques for interpreting Reward Model’s internal representations achieve better generalization, but still frequently fail to distinguish instruction-following from conflated behaviors. We consolidate the 15 most challenging distribution shifts into the \textbf{GEN}aralization analog\textbf{IES} (\textsc{GENIES}) benchmark, which we hope will enable progress toward controlling Reward Model generalization. + +## Quickstart + +This repository contains: +- Our datasets (`./distributions`) along with pairing specifications (`./distribution_shifts`). Download our datasets [here](https://genies-data.s3.us-east-2.amazonaws.com/genies-datasets.tar) or run the setup command after cloning the repo. +- Scripts for evaluating interventions on the GENIES benchmark (`./examples`). +- Our results (`./results`). +- Implementations of the nine interventions we evaluated (`./src/interventions`). + +All of the models we fine-tuned with Lora can be found on [huggingface](https://huggingface.co/genies-models). + +**Setup:** +``` +conda create --name env python=3.10 +pip install . +python download_model_from_hf.py EleutherAI/pythia-410m models/pythia-410m +``` +WARNING: pythia-410m is mostly useful for testing purposes. Most tuning interventions perform poorly with this model. + +## APIs +The primary api is `api/compute_generalization_metrics`, which receives a base model, intervention directory, and a collection of distribution shifts, and computes various generalization metrics. See `examples/compute_generalization_metrics.sh` for example usage. + +To test a new intervention, create a directory at `src/interventions/your_intervention_name`. This directory must contain a `train.py` file and an `eval.py` file. + +`src/interventions/your_intervention_name/train.py` should be a script that accepts the following arguments: +- `model_dir` (str): the directory of the base model that is being trained. +- `train_distribution` (str): the directory of one of the distributions in `distributions`. For example: `distributions/alpaca_mmlu`. +- `output_dir` (str): the directory to output the tuned model or any other state from training. + +`src/interventions/your_intervention_name/eval.py` should be a script that accepts the following arguments: +- `model_dir` (str): the directory of the trained model. +- `distribution_dirs` (List\[str\]): a list of subdirectories of `distributions`. +- `output_paths` (List\[str\]): where to save the results. The results should be json files. The only required key is `eval_accuracy`. Evaluation results are stored in `results/evaluations`.# GENIES diff --git a/src/genies_benchmark.egg-info/SOURCES.txt b/src/genies_benchmark.egg-info/SOURCES.txt new file mode 100644 index 0000000..83ff776 --- /dev/null +++ b/src/genies_benchmark.egg-info/SOURCES.txt @@ -0,0 +1,15 @@ +README.md +setup.py +src/api/__init__.py +src/api/compute_generalization_metrics.py +src/api/data_classes.py +src/api/evaluate.py +src/api/hyperparameter_sweep.py +src/api/model.py +src/api/train.py +src/api/util.py +src/genies_benchmark.egg-info/PKG-INFO +src/genies_benchmark.egg-info/SOURCES.txt +src/genies_benchmark.egg-info/dependency_links.txt +src/genies_benchmark.egg-info/requires.txt +src/genies_benchmark.egg-info/top_level.txt \ No newline at end of file diff --git a/src/genies_benchmark.egg-info/dependency_links.txt b/src/genies_benchmark.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/genies_benchmark.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/src/genies_benchmark.egg-info/requires.txt b/src/genies_benchmark.egg-info/requires.txt new file mode 100644 index 0000000..791b1e7 --- /dev/null +++ b/src/genies_benchmark.egg-info/requires.txt @@ -0,0 +1,203 @@ +absl-py==2.0.0 +accelerate==0.24.1 +aiohttp==3.8.6 +aiosignal==1.3.1 +annotated-types==0.6.0 +anyio==3.7.1 +appdirs==1.4.4 +argon2-cffi==23.1.0 +argon2-cffi-bindings==21.2.0 +arrow==1.3.0 +asttokens==2.4.1 +async-lru==2.0.4 +async-timeout==4.0.3 +attrs==23.1.0 +Babel==2.13.1 +bcrypt==4.0.1 +beautifulsoup4==4.12.2 +bitsandbytes==0.41.2.post2 +bleach==6.1.0 +boto3==1.28.84 +botocore==1.31.84 +certifi==2023.7.22 +cffi==1.16.0 +charset-normalizer==3.3.2 +click==8.1.7 +comm==0.2.0 +contourpy==1.2.0 +cryptography==41.0.5 +cycler==0.12.1 +Cython==0.29.36 +datasets==2.14.6 +debugpy==1.8.0 +decorator==5.1.1 +deepspeed==0.12.2 +defusedxml==0.7.1 +dill==0.3.7 +distro==1.8.0 +docker-pycreds==0.4.0 +docopt==0.6.2 +docstring-parser==0.15 +einops==0.7.0 +entrypoints==0.4 +exceptiongroup==1.1.3 +executing==2.0.1 +fastjsonschema==2.18.1 +filelock==3.13.1 +fire==0.5.0 +fonttools==4.44.0 +fqdn==1.5.1 +frozenlist==1.4.0 +fsspec==2023.10.0 +gitdb==4.0.11 +GitPython==3.1.40 +h11==0.14.0 +hjson==3.1.0 +httpcore==1.0.2 +httpx==0.25.1 +huggingface-hub==0.17.3 +idna==3.4 +ipykernel==6.26.0 +ipython==8.17.2 +ipywidgets==8.1.1 +isoduration==20.11.0 +jedi==0.19.1 +Jinja2==3.1.2 +jmespath==1.0.1 +joblib==1.3.2 +json5==0.9.14 +jsonpointer==2.4 +jsonschema==4.19.2 +jsonschema-specifications==2023.7.1 +jupyter==1.0.0 +jupyter-console==6.6.3 +jupyter-events==0.9.0 +jupyter-lsp==2.2.0 +jupyter_client==8.6.0 +jupyter_core==5.5.0 +jupyter_server==2.10.0 +jupyter_server_terminals==0.4.4 +jupyterlab==4.0.8 +jupyterlab-pygments==0.2.2 +jupyterlab-widgets==3.0.9 +jupyterlab_server==2.25.1 +kiwisolver==1.4.5 +markdown-it-py==3.0.0 +MarkupSafe==2.1.3 +matplotlib==3.8.1 +matplotlib-inline==0.1.6 +mdurl==0.1.2 +mistune==3.0.2 +mpmath==1.3.0 +multidict==6.0.4 +multiprocess==0.70.15 +nbclient==0.9.0 +nbconvert==7.11.0 +nbformat==5.9.2 +nest-asyncio==1.5.8 +networkx==3.2.1 +ninja==1.11.1.1 +nltk==3.8.1 +notebook==7.0.6 +notebook_shim==0.2.3 +numpy==1.26.1 +nvidia-cublas-cu12==12.1.3.1 +nvidia-cuda-cupti-cu12==12.1.105 +nvidia-cuda-nvrtc-cu12==12.1.105 +nvidia-cuda-runtime-cu12==12.1.105 +nvidia-cudnn-cu12==8.9.2.26 +nvidia-cufft-cu12==11.0.2.54 +nvidia-curand-cu12==10.3.2.106 +nvidia-cusolver-cu12==11.4.5.107 +nvidia-cusparse-cu12==12.1.0.106 +nvidia-nccl-cu12==2.18.1 +nvidia-nvjitlink-cu12==12.3.52 +nvidia-nvtx-cu12==12.1.105 +openai==1.2.3 +overrides==7.4.0 +packaging==23.2 +pandas==2.1.3 +pandocfilters==1.5.0 +papermill==2.5.0 +paramiko==3.3.1 +parso==0.8.3 +peft==0.6.1 +pexpect==4.8.0 +Pillow==10.1.0 +pipreqs==0.4.13 +platformdirs==4.0.0 +prometheus-client==0.18.0 +prompt-toolkit==3.0.40 +protobuf==3.20.3 +psutil==5.9.6 +ptyprocess==0.7.0 +pure-eval==0.2.2 +py-cpuinfo==9.0.0 +pyarrow==14.0.1 +pycparser==2.21 +pydantic==2.4.2 +pydantic_core==2.10.1 +Pygments==2.16.1 +PyNaCl==1.5.0 +pynvml==11.5.0 +pyparsing==3.1.1 +python-dateutil==2.8.2 +python-json-logger==2.0.7 +pytz==2023.3.post1 +PyYAML==6.0.1 +pyzmq==25.1.1 +qtconsole==5.5.0 +QtPy==2.4.1 +referencing==0.30.2 +regex==2023.10.3 +requests==2.31.0 +rfc3339-validator==0.1.4 +rfc3986-validator==0.1.1 +rich==13.6.0 +rouge-score==0.1.2 +rpds-py==0.12.0 +s3transfer==0.7.0 +safetensors==0.4.0 +scikit-learn==1.3.2 +scipy==1.11.3 +seaborn==0.13.0 +Send2Trash==1.8.2 +sentencepiece==0.1.99 +sentry-sdk==1.34.0 +setproctitle==1.3.3 +shtab==1.6.4 +six==1.16.0 +smmap==5.0.1 +sniffio==1.3.0 +soupsieve==2.5 +stack-data==0.6.3 +sympy==1.12 +tenacity==8.2.3 +termcolor==2.3.0 +terminado==0.18.0 +threadpoolctl==3.2.0 +tinycss2==1.2.1 +tokenizers==0.14.1 +tomli==2.0.1 +torch==2.1.0 +tornado==6.3.3 +tqdm==4.66.1 +traitlets==5.13.0 +transformers==4.35.0 +triton==2.1.0 +trl==0.7.4 +types-python-dateutil==2.8.19.14 +typing_extensions==4.8.0 +tyro==0.5.12 +tzdata==2023.3 +uri-template==1.3.0 +urllib3==2.0.7 +wandb==0.16.0 +wcwidth==0.2.9 +webcolors==1.13 +webencodings==0.5.1 +websocket-client==1.6.4 +widgetsnbextension==4.0.9 +xxhash==3.4.1 +yarg==0.1.9 +yarl==1.9.2 diff --git a/src/genies_benchmark.egg-info/top_level.txt b/src/genies_benchmark.egg-info/top_level.txt new file mode 100644 index 0000000..eedd89b --- /dev/null +++ b/src/genies_benchmark.egg-info/top_level.txt @@ -0,0 +1 @@ +api diff --git a/upload_data.py b/upload_data.py new file mode 100644 index 0000000..e112e81 --- /dev/null +++ b/upload_data.py @@ -0,0 +1,29 @@ +import fire +import os +import api.util as util +import json +import boto3 +import os +import tarfile + +def make_tar(directory_path, output_filename): + """Compresses directory into a tar file.""" + with tarfile.open(output_filename, "w") as tar: + tar.add(directory_path, arcname=os.path.basename(directory_path)) + +def upload_directory_to_s3(directory_path, bucket_name, tar_name): + make_tar(directory_path, tar_name) + + # Upload to S3 + s3 = boto3.client('s3') + s3.upload_file(tar_name, bucket_name, tar_name) + + print(f"Uploaded {tar_name} to {bucket_name}") + print("The link is: ", f"https://genies-data.s3.us-east-2.amazonaws.com/genies-datasets.tar") + + +def upload_data(): + upload_directory_to_s3(f"distributions", "genies-data", f"genies-datasets.tar") + +if __name__ == "__main__": + fire.Fire(upload_data) \ No newline at end of file