change versioning to pyproject.toml, README changes for poetry

This commit is contained in:
Justin Guese
2024-05-24 15:04:15 +02:00
parent 7881de2235
commit f82e9343e4
3 changed files with 32 additions and 4 deletions
+4 -3
View File
@@ -20,9 +20,10 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Set Version number
run: |
poetry version 0.0.${{ github.run_number }}
# use the hardcoded version number for now
# - name: Set Version number
# run: |
# poetry version 0.0.${{ github.run_number }}
- name: Build and Publish to PyPI
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
+27
View File
@@ -30,6 +30,27 @@ Please look into the README files in the respective benchmark directories within
## Installation
### Installation as a package
To install the CPU version of TimesFM as a package, you can run the following command without cloning this repo:
`pip install timesfm`
The package is currently using https://pypi.org/project/timesfm/.
### Poetry (CPU) installation
To install the CPU environment using Poetry, you can run the following command:
```
pip install poetry # optional
poetry install
```
This will install the environment in the local .venv folder (depends on the configuration) and matches the python command to the poetry environment. If this is not the case, you can use `poetry run python` to use the local environment.
### Conda / GPU installation
For calling TimesFM, We have two environment files. Inside `timesfm`, for
GPU installation (assuming CUDA 12 has been setup), you can create a conda
environment `tfm_env` from the base folder through:
@@ -60,6 +81,12 @@ Please use the environment files under `experiments` instead.
2. The dependency `lingvo` does not support ARM architectures, and the code is not working for machines with Apple silicon. We are aware of this issue and are working on a solution. Stay tuned.
#### Building the package and publishing to PyPI
The package can be built using the command `poetry build`.
To build and publish it to PyPI, the command `poetry publish` can be used. This command will require the user to have the necessary permissions to publish to the PyPI repository.
## Usage
### Initialize the model and load a checkpoint.
+1 -1
View File
@@ -3,7 +3,7 @@ name = "timesfm"
packages = [
{ include = "*", from = "src" },
]
version = "0.0.2"
version = "0.0.1"
description = "Open weights time-series foundation model from Google Research."
authors = [
"Rajat Sen <senrajat@google.com>",