Skip to content

Commit

Permalink
Remove torchao_nightly package (#661)
Browse files Browse the repository at this point in the history
* Remove torchao_nightly package

* test

* test
  • Loading branch information
atalman authored Aug 16, 2024
1 parent 8c6b4f9 commit 4082008
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_wheels_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
paths:
- build/packaging/**
- .github/workflows/build_wheels_linux.yml
- setup.py
push:
branches:
- nightly
Expand Down
12 changes: 5 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from setuptools import find_packages, setup

current_date = datetime.now().strftime("%Y.%m.%d")
current_date = datetime.now().strftime("%Y%m%d")


def get_git_commit_id():
Expand All @@ -27,8 +27,6 @@ def read_version(file_path="version.txt"):
with open(file_path, "r") as file:
return file.readline().strip()

# Determine the package name based on the presence of an environment variable
package_name = "torchao-nightly" if os.environ.get("TORCHAO_NIGHTLY") else "torchao"

# Use Git commit ID if VERSION_SUFFIX is not set
version_suffix = os.getenv("VERSION_SUFFIX")
Expand All @@ -37,9 +35,9 @@ def read_version(file_path="version.txt"):

use_cpp = os.getenv('USE_CPP')


# Version is year.month.date if using nightlies
version = current_date if package_name == "torchao-nightly" else read_version()
version_prefix = read_version()
# Version is version.dev year month date if using nightlies and version if not
version = f"{version_prefix}.dev{current_date}" if os.environ.get("TORCHAO_NIGHTLY") else version_prefix

import torch

Expand Down Expand Up @@ -124,7 +122,7 @@ def get_extensions():
return ext_modules

setup(
name=package_name,
name="torchao",
version=version+version_suffix,
packages=find_packages(),
include_package_data=True,
Expand Down

0 comments on commit 4082008

Please sign in to comment.