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

New/sindy eq discovery #111

Merged
merged 4 commits into from
May 11, 2023

Conversation

IamShubhamGupto
Copy link
Member

@IamShubhamGupto IamShubhamGupto commented May 5, 2023

  • sindy L96 equation discovery notebook
  • update conda-lock file
  • update index to show sindy notebook under Equation discovery with Lorenz96
  • new requirements.txt file to install pip dependencies
    • conda-lock does not seem to like pip dependencies:
    •   (L96M2lines) shubham@Shubhams-MBP L96_demo % conda-lock lock --mamba -f environment.yaml -p linux-64 --kind explicit
      Locking dependencies for ['linux-64']...
      INFO:conda_lock.conda_solver:linux-64 using specs ['python 3.9.*', 'matplotlib', 'numba', 'pytorch', 'torchvision', 'scikit-learn', 'jupyter-book', 'jupyterlab', 'pre-commit', 'ffmpeg', 'tabulate', 'torch-lr-finder', 'pandas', 'conda-lock', 'pip *']
      Traceback (most recent call last):
        File "/Users/shubham/opt/anaconda3/envs/L96M2lines/lib/python3.9/site-packages/conda_lock/src_parser/__init__.py", line 488, in seperator_munge_get
          return d[key]
      KeyError: 'matplotlib-base'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/Users/shubham/opt/anaconda3/envs/L96M2lines/lib/python3.9/site-packages/conda_lock/src_parser/__init__.py", line 491, in seperator_munge_get
          return d[key.replace("-", "_")]
      KeyError: 'matplotlib_base'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/Users/shubham/opt/anaconda3/envs/L96M2lines/bin/conda-lock", line 10, in <module>
          sys.exit(main())
        File "/Users/shubham/opt/anaconda3/envs/L96M2lines/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
          return self.main(*args, **kwargs)
        File "/Users/shubham/opt/anaconda3/envs/L96M2lines/lib/python3.9/site-packages/click/core.py", line 1053, in main
          rv = self.invoke(ctx)
        File "/Users/shubham/opt/anaconda3/envs/L96M2lines/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
          return _process_result(sub_ctx.command.invoke(sub_ctx))
        File "/Users/shubham/opt/anaconda3/envs/L96M2lines/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
          return ctx.invoke(self.callback, **ctx.params)
        File "/Users/shubham/opt/anaconda3/envs/L96M2lines/lib/python3.9/site-packages/click/core.py", line 754, in invoke
          return __callback(*args, **kwargs)
        File "/Users/shubham/opt/anaconda3/envs/L96M2lines/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
          return f(get_current_context(), *args, **kwargs)
        File "/Users/shubham/opt/anaconda3/envs/L96M2lines/lib/python3.9/site-packages/conda_lock/conda_lock.py", line 1353, in lock
          lock_func(
        File "/Users/shubham/opt/anaconda3/envs/L96M2lines/lib/python3.9/site-packages/conda_lock/conda_lock.py", line 1083, in run_lock
          make_lock_files(
        File "/Users/shubham/opt/anaconda3/envs/L96M2lines/lib/python3.9/site-packages/conda_lock/conda_lock.py", line 408, in make_lock_files
          lock_content = lock_content | create_lockfile_from_spec(
        File "/Users/shubham/opt/anaconda3/envs/L96M2lines/lib/python3.9/site-packages/conda_lock/conda_lock.py", line 801, in create_lockfile_from_spec
          deps = _solve_for_arch(
        File "/Users/shubham/opt/anaconda3/envs/L96M2lines/lib/python3.9/site-packages/conda_lock/conda_lock.py", line 737, in _solve_for_arch
          pip_deps = solve_pypi(
        File "/Users/shubham/opt/anaconda3/envs/L96M2lines/lib/python3.9/site-packages/conda_lock/pypi_solver.py", line 327, in solve_pypi
          src_parser._apply_categories(requested=pip_specs, planned=planned)
        File "/Users/shubham/opt/anaconda3/envs/L96M2lines/lib/python3.9/site-packages/conda_lock/src_parser/__init__.py", line 502, in _apply_categories
          for dep in seperator_munge_get(planned, item).dependencies
        File "/Users/shubham/opt/anaconda3/envs/L96M2lines/lib/python3.9/site-packages/conda_lock/src_parser/__init__.py", line 493, in seperator_munge_get
          return d[key.replace("_", "-")]
      KeyError: 'matplotlib-base'
      
  • Updated deploy.yml and preview.yml to install from conda-lock and requirements.txt, might fail due to permission issues / cannot handle pip
  • Updated deploy.yml to install from conda-lock and requirements.txt

Update:

  • build seems to have passed and installed all dependencies from both conda-lock and requirements.txt
  • build fails near deploying pr-preview
  • removed preview.yml based on our discussion below

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@dhruvbalwada
Copy link
Collaborator

Looks like this failed because of the same problem as #109 (which we tried to fix in #110). I hope the author can given us some useful advice.

@IamShubhamGupto
Copy link
Member Author

@dhruvbalwada

it failed again for the same error, PRs from forks cannot get a preview, Im asking the authors if there's a way to go around this

Error: Resource not accessible by integration

@dhruvbalwada
Copy link
Collaborator

One easy solution is to give you higher level permissions on repo, would that be fine?

@IamShubhamGupto
Copy link
Member Author

Hey @dhruvbalwada

Based on the reply here - rossjrw/pr-preview-action#48 (reply in thread)

The fork and pull method which we are using is not supported, I did not think of this when I was suggesting the idea.

We could:

  1. Continue going without pr-previews until a solution shows up in the future
  2. We get write access directly to the repository, our PRs will originate from other branches within m2lines/L96demo rather than our forks
  3. As the author suggested, we use external apps like Netlify which I tried setting up for my personal project but could not figure out how to get pr-previews working, if anyone else knows, maybe they could join in and help

@dhruvbalwada
Copy link
Collaborator

Let's go with 1 for now, and we can figure something better out for the summer in June.

@IamShubhamGupto
Copy link
Member Author

@dhruvbalwada
Sure, I am going to remove preview.yml in this branch and we should be back to how things were going before

I will be keeping requirements.txt as we now have pip dependencies

@LaureZanna LaureZanna merged commit 16f29b5 into m2lines:main May 11, 2023
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