Giter Club home page Giter Club logo

Comments (11)

nmasnadithya avatar nmasnadithya commented on May 22, 2024 1

Thanks. Let us check this and get back to you.

from labml.

nmasnadithya avatar nmasnadithya commented on May 22, 2024

Thanks for trying out labml. Seems like you're the first to try this on Windows. We haven't tested our library on windows, because we are a small team and it wasn't a priority for us up until now.

We'll check this and get back as soon as possible. If possible, try using Linux or macOS for the time being?

from labml.

shetsecure avatar shetsecure commented on May 22, 2024

Hi, thanks for the fast response.

Yes, as you said it does not work on Windows, and I tried it using Linux.
It works only when using a python script but not with a jupyter notebook

image
image
image
image

I tried to convert the path into str and created a locally empty git repo, but it still didn't work. ( I'm testing with the same notebook as I mentioned above). Then I suspected that it doesn't have the writing privilege and I run the notebook as root but it gave the same error.
Nevertheless, saving the notebook as a .py file and running it works like a charm.

[INFO]
image

Also, do you have any idea why it doesn't work on Windows ?

from labml.

nmasnadithya avatar nmasnadithya commented on May 22, 2024

Glad you could get it working under Linux. Let us have a look on local jupiter notebooks issue.

Did you run the same jupiter notebook to get this error or was it some other notebook?

from labml.

shetsecure avatar shetsecure commented on May 22, 2024

Yes it was the same notebook, though you can simply run this to replicate the issue:

from labml import experiment
experiment.create(name='test')

from labml.

vpj avatar vpj commented on May 22, 2024

@adrien1018 's pull fixes both problems

from labml.

nmasnadithya avatar nmasnadithya commented on May 22, 2024

@shetsecure the library update with the fix was published. Let us know whether it resolves your problems. It works perfectly on my system.

from labml.

shetsecure avatar shetsecure commented on May 22, 2024

@nmasnadithya Unfortunately the error still persists on my system...

image

but in colab it works fine
image

from labml.

vpj avatar vpj commented on May 22, 2024

LABML WARNING are just warning messages. It says your working directory C:\Users\Amine is not a git repository.

InvalidGitRepositoryError is an error that's caught. Thats why you don't see it in the python REPL. No idea why it gets thrown in the notebook. Can you share a screenshot that shows the full output on the notebook?

from labml.

shetsecure avatar shetsecure commented on May 22, 2024
HTML(value='<pre  style="overflow-x: scroll;"><span style="color: #C5C1B4"></span>\n<span style="color: #C5C1B…
---------------------------------------------------------------------------
InvalidGitRepositoryError                 Traceback (most recent call last)
c:\users\amine\appdata\local\programs\python\python39\lib\site-packages\labml\internal\experiment\__init__.py in __init__(self, uuid, name, python_file, comment, writers, ignore_callers, tags, is_evaluate)
    222         try:
--> 223             repo = git.Repo(lab_singleton().path)
    224 

c:\users\amine\appdata\local\programs\python\python39\lib\site-packages\git\repo\base.py in __init__(self, path, odbt, search_parent_directories, expand_vars)
    180         if self.git_dir is None:
--> 181             raise InvalidGitRepositoryError(epath)
    182 

InvalidGitRepositoryError: C:\Users\Amine\Downloads

During handling of the above exception, another exception occurred:

AttributeError                            Traceback (most recent call last)
<ipython-input-2-c4c1b9931e54> in <module>
      1 from labml import experiment
----> 2 experiment.create(name='test')

c:\users\amine\appdata\local\programs\python\python39\lib\site-packages\labml\experiment.py in create(uuid, name, python_file, comment, writers, ignore_callers, tags, disable_screen)
     84 
     85     monitor().clear()
---> 86     _create_experiment(uuid=uuid,
     87                        name=name,
     88                        python_file=python_file,

c:\users\amine\appdata\local\programs\python\python39\lib\site-packages\labml\internal\experiment\__init__.py in create_experiment(uuid, name, python_file, comment, writers, ignore_callers, tags, is_evaluate)
    512     global _internal
    513 
--> 514     _internal = Experiment(uuid=uuid,
    515                            name=name,
    516                            python_file=python_file,

c:\users\amine\appdata\local\programs\python\python39\lib\site-packages\labml\internal\experiment\__init__.py in __init__(self, uuid, name, python_file, comment, writers, ignore_callers, tags, is_evaluate)
    230         except git.InvalidGitRepositoryError:
    231             if not is_colab() and not is_kaggle():
--> 232                 labml_notice(["Not a valid git repository: ",
    233                               (lab_singleton().path, Text.value)])
    234             self.run.commit = 'unknown'

c:\users\amine\appdata\local\programs\python\python39\lib\site-packages\labml\utils\notice.py in labml_notice(message, is_danger, is_warn)
     21 
     22     log.append(('\n' + '-' * 50, Text.subtle))
---> 23     logger.log(log)

c:\users\amine\appdata\local\programs\python\python39\lib\site-packages\labml\logger.py in log(is_new_line, is_reset, *args)
    133             _internal().log([(message, None)], is_new_line=is_new_line, is_reset=is_reset)
    134         elif isinstance(message, list):
--> 135             _internal().log(message, is_new_line=is_new_line, is_reset=is_reset)
    136         else:
    137             raise TypeError(f'Unrecognized type: {type(message)}', message)

c:\users\amine\appdata\local\programs\python\python39\lib\site-packages\labml\internal\logger\__init__.py in log(self, parts, is_new_line, is_reset)
     22             is_reset: bool = True):
     23         for d in self.__destinations:
---> 24             d.log(parts, is_new_line=is_new_line, is_reset=is_reset)
     25 
     26     def info(self, *args, **kwargs):

c:\users\amine\appdata\local\programs\python\python39\lib\site-packages\labml\internal\logger\destinations\ipynb_pycharm.py in log(self, parts, is_new_line, is_reset)
     43             else:
     44                 text, style = p
---> 45             lines = text.split('\n')
     46             for line in lines[:-1]:
     47                 tuple_parts.append((line, style))

AttributeError: 'WindowsPath' object has no attribute 'split'

from labml.

vpj avatar vpj commented on May 22, 2024

@adrien1018 fixed it

from labml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.