pykeen
pykeen copied to clipboard
Update Neptune integration to support `neptune>=1.0`
Describe the bug
The neptune integration doesn't work on using neptune>1.0
or neptune-client<1.0
with the below error on trying to initialize a pipeline:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
[<ipython-input-18-f3b9df909e4f>](https://localhost:8080/#) in <cell line: 1>()
----> 1 pipeline_result = pipeline(dataset='Nations',model='TransE',result_tracker='neptune',
2 result_tracker_kwargs=dict(
3 project_qualified_name='sandbox',
4 experiment_name='Tutorial Training of RotatE on Kinships',
5 ),)
5 frames
[/usr/local/lib/python3.10/dist-packages/pykeen/trackers/neptune.py](https://localhost:8080/#) in __init__(self, project_qualified_name, api_token, offline, experiment_id, experiment_name, tags)
63 self.session = neptune.Session(backend=neptune.OfflineBackend())
64 else:
---> 65 self.session = neptune.Session.with_default_backend(api_token=api_token)
66
67 self.project = self.session.get_project(project_qualified_name)
AttributeError: module 'neptune' has no attribute 'Session'```
How to reproduce
Initialize a pipeline following the Using neptune tutorial
Environment
Key | Value |
---|---|
OS | posix |
Platform | Linux |
Release | 5.15.109+ |
Time | Thu Jul 27 15:37:33 2023 |
Python | 3.10.6 |
PyKEEN | 1.10.1 |
PyKEEN Hash | UNHASHED |
PyKEEN Branch | |
PyTorch | 2.0.1+cu118 |
CUDA Available? | false |
CUDA Version | 11.8 |
cuDNN Version | 8700 |
Additional information
I am a DevRel at neptune.ai. Once this is fixed, we can add the PyKeen + Neptune integration to our Community integrations page.
Issue Template Checks
- [X] This is not a feature request (use a different issue template if it is)
- [X] This is not a question (use the discussions forum instead)
- [X] I've read the text explaining why including environment information is important and understand if I omit this information that my issue will be dismissed
Hi @SiddhantSadangi , since you seem to be familiar with Neptune, does increasing the requirement to neptune-client>=1.0
already fix the issue? Would you be interested in submitting a PR for this?
Hey @mberr
The current neptune methods pykeen uses are very dated and no longer supported in neptune>1.0
.
I could submit a PR to make it just work, but since you are more familiar with pykeen, it would be better if you could have a look at our v1.0 upgrade guide and make the relevant changes in the NeptuneResultTracker
class.
The upgrade would also enable pykeen users to log a lot more than just metrics and parameters!
Lemme know if you need any help from our side.
Hey @mberr Just checking if this is still on the radar