Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fork and fix tsfm_public/version.py #67

Merged
merged 2 commits into from
Jun 11, 2024
Merged

Conversation

cs1070166
Copy link
Contributor

@cs1070166 cs1070166 commented Jun 11, 2024

On cloning the repo and importing TimeSeriesPreprocessor at tsfm_public using
from tsfm_public.toolkit.time_series_preprocessor import TimeSeriesPreprocessor
to create a new data loader, I got the following error

Traceback (most recent call last):
File "/dccstor/iloum-la/expts_notebooks/tsfm/data/new_datasets.py", line 11, in
from tsfm_public.toolkit.time_series_preprocessor import TimeSeriesPreprocessor
File "/dccstor/iloum-la/expts_notebooks/granite-tsfm/tsfm_public/init.py", line 4, in
from .version import version, version_tuple
ImportError: cannot import name 'version_tuple' from 'tsfm_public.version' (/dccstor/iloum-la/expts_notebooks/granite-tsfm/tsfm_public/version.py)

Looks like there is a bug in version.py. Changing the version.py in the below manner resolved the error.

try:
    # Local
    from ._version import __version__, __version_tuple__  # noqa: F401 # unused import
except ImportError:
    __version__ = "unknown"
    version_tuple = (0, 0, __version__) ##### earlier line 
    __version_tuple__ = (0, 0, __version__) #### our change

On cloning the repo and importing TimeSeriesPreprocessor at tsfm_public using
from tsfm_public.toolkit.time_series_preprocessor import TimeSeriesPreprocessor
to create a new data loader, I got the following error

Traceback (most recent call last):
File "/dccstor/iloum-la/expts_notebooks/tsfm/data/new_datasets.py", line 11, in
from tsfm_public.toolkit.time_series_preprocessor import TimeSeriesPreprocessor
File "/dccstor/iloum-la/expts_notebooks/granite-tsfm/tsfm_public/init.py", line 4, in
from .version import version, version_tuple
ImportError: cannot import name 'version_tuple' from 'tsfm_public.version' (/dccstor/iloum-la/expts_notebooks/granite-tsfm/tsfm_public/version.py)

Looks like there is a bug in version.py. Changing the version.py in the below manner resolved the error.

try:
    # Local
    from ._version import __version__, __version_tuple__  # noqa: F401 # unused import
except ImportError:
    __version__ = "unknown"
    version_tuple = (0, 0, __version__) ##### earlier line 
    __version_tuple__ = (0, 0, __version__) #### our change
fixes to tsfm_public/version.py
@wgifford wgifford self-requested a review June 11, 2024 14:38
@wgifford wgifford merged commit f52ebf9 into ibm-granite:main Jun 11, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants