keisen / tf-keras-vis

Neural network visualization toolkit for tf.keras
https://keisen.github.io/tf-keras-vis-docs/
MIT License
313 stars 45 forks source link

Anaconda recipe for tf-keras-viz #54

Open amizeranschi opened 3 years ago

amizeranschi commented 3 years ago

Hello and many thanks for this library!

By any chance, could you set up an Anaconda recipe for installing tf-keras-viz, as an alternative to pip? People recommend against mixing pip and conda packages in the same environment and I use conda for managing all of my deep learning libraries.

keisen commented 3 years ago

@amizeranschi , Thank you for your request! I believe, as you said, we should publish tf-keras-vis to both pip and conda repositories for all users.

I will do it in v0.7.0 or higher. Of course, I'm so happy if you submit PullRequest that add GIthub Actions to publish to conda (i.e., .github/workflows/*.yml) !

Thanks!

amizeranschi commented 3 years ago

@keisen thank you for considering to publish to Anaconda. I have found two examples of GitHub actions created by other users, here and here.

And here is some info regarding how to set up meta.yaml, the metadata file for conda.

Perhaps these could be of help.

keisen commented 3 years ago

I failed, so reopen this issue and am going to investigate the cause.

amizeranschi commented 3 years ago

@keisen thank you for looking into this. What kind of trouble are you having?

If it helps, I found a tutorial for creating a Conda package from a pre-existing PyPI package: https://docs.conda.io/projects/conda-build/en/stable/user-guide/tutorials/build-pkgs-skeleton.html

Make sure to check the Prerequisites, as well: https://docs.conda.io/projects/conda-build/en/stable/user-guide/getting-started.html#prereqs

keisen commented 3 years ago

@amizeranschi , Thank you for your response and the information! I'll read them.

What kind of trouble are you having?

I forgot to append the link below:

https://github.com/keisen/tf-keras-vis/runs/2919754030?check_suite_focus=true

I've attempted the GithubActions recipe you suggested, but the result was failed as above. I believe that my meta.yaml has any problem, but I don't know what it is so far.

Thanks!

amizeranschi commented 3 years ago

Honestly that error is a bit confusing to me as well, I'm not skilled enough in Python development.

My guess is that the problem is with the configuration of conda channels, as mentioned here:

Traceback (most recent call last):
  File "/root/miniconda3/lib/python3.8/site-packages/conda/core/subdir_data.py", line 698, in fetch_repodata_remote_request
    resp.raise_for_status()
  File "/root/miniconda3/lib/python3.8/site-packages/requests/models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: None for url: file:///github/workspace/noarch/repodata.json

and

conda.exceptions.UnavailableInvalidChannel: The channel is not accessible or is invalid.
  channel name: workspace
  channel url: file:///github/workspace
  error code: 404

You might want to check your Conda channel configuration and adjust it somehow, using your personal Anaconda channel.

You will need to adjust your conda configuration to proceed.
Use `conda config --show channels` to view your configuration's current state,
and use `conda config --show-sources` to view config file locations.

Have a look at the following pages, which show the steps of creating and uploading a package to Anaconda and/or Conda-forge:

https://giswqs.medium.com/building-a-conda-package-and-uploading-it-to-anaconda-cloud-6a3abd1c5c52

https://levelup.gitconnected.com/publishing-your-python-package-on-conda-and-conda-forge-309a405740cf

keisen commented 3 years ago

@amizeranschi , Thank you for pointing out and information! I've never used anaconda so far, so your comments are very helpful for me.

I'm going to read the articles and to tackle to manually publish without github actions at first. Thank you so much!

amizeranschi commented 3 years ago

I'm glad I could help. Thanks again for working on this and please let me know if I can bring any further assistance.

amizeranschi commented 3 years ago

Hi, is there any update on this issue?